Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle user profile updates from Neon (#36) #38

Closed
wants to merge 35 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
7cd49c7
Update automation to shared repository (#15)
NeonDaniel Feb 17, 2023
eb0c9ab
Increment Version
NeonDaniel Feb 17, 2023
3d87426
Remove invalid release Docker action (#17)
NeonDaniel Feb 17, 2023
6c9b78a
Increment Version
NeonDaniel Feb 17, 2023
b16399c
Update to use shared version_bump.py script (#18)
NeonDaniel Feb 23, 2023
283a4c3
Update build automation to default branch (#19)
NeonDaniel Feb 23, 2023
4b62743
Increment Version
NeonDaniel Feb 23, 2023
c25bce9
Specify `setup.py` path explicitly (#20)
NeonDaniel Feb 23, 2023
337f5f6
Increment Version
NeonDaniel Feb 23, 2023
dee278b
Add CLI endpoints to interact with API and LLM endpoints (#21)
NeonDaniel Jul 25, 2023
fd16e40
Increment Version to 0.0.5a4
NeonDaniel Jul 25, 2023
c9897b7
Add methods and entrypoints to get STT and TTS responses (#12)
NeonDaniel Aug 2, 2023
87fc013
Increment Version to 0.0.5a5
NeonDaniel Aug 2, 2023
46ff16c
Update routing context and MQ client version for compat. (#22)
NeonDaniel Aug 11, 2023
a83adac
Increment Version to 0.0.5a6
NeonDaniel Aug 11, 2023
326f5fe
Add NeonVoiceClient class for minimal remote audio client (#23)
NeonDaniel Nov 3, 2023
f00d6c9
Increment Version to 0.0.5a7
NeonDaniel Nov 3, 2023
65eaf62
Add Gradio web UI with Docker Container (#24)
NeonDaniel Nov 7, 2023
1f13ed1
Increment Version to 0.0.5a8
NeonDaniel Nov 7, 2023
37bf01f
Threaded input handling and multi-session support (#31)
NeonDaniel Nov 8, 2023
ea9ce3e
Increment Version to 0.0.5a9
NeonDaniel Nov 8, 2023
49e5012
Fix web_client language handling to respect configured input language…
NeonDaniel Nov 9, 2023
68378bd
Increment Version to 0.0.5a10
NeonDaniel Nov 9, 2023
0e93afe
Handle user profile updates from Neon (#36)
NeonDaniel Nov 21, 2023
de0f606
Increment Version to 0.0.5a11
NeonDaniel Nov 21, 2023
f14f71c
Remove audio resampling and add timing context support (#33)
NeonDaniel Nov 21, 2023
9d62d03
Increment Version to 0.0.5a12
NeonDaniel Nov 21, 2023
f3ece7b
Refactor GradIO UI to use Chatbot class directly (#34)
NeonDaniel Nov 21, 2023
86665be
Increment Version to 0.0.5a13
NeonDaniel Nov 21, 2023
45aea9c
Add audio responses to chat history and auto-play them (#40)
NeonDaniel Nov 22, 2023
c566fd9
Increment Version to 0.0.5a14
NeonDaniel Nov 22, 2023
94c87c2
Add `neon_should_respond` context to all emitted Messages (#42)
NeonDaniel Nov 27, 2023
d57a07a
Increment Version to 0.0.5a15
NeonDaniel Nov 27, 2023
aa85548
Get Language Support from Core (#37)
NeonDaniel Dec 7, 2023
1c08d60
Increment Version to 0.0.5a16
NeonDaniel Dec 7, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/license_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Run License Tests
on:
push:
workflow_dispatch:

jobs:
license_tests:
uses: neongeckocom/.github/.github/workflows/license_tests.yml@master
with:
packages-exclude: '^(precise-runner|fann2|tqdm|bs4|ovos-phal-plugin|ovos-skill|neon-core|nvidia|neon-phal-plugin|bitstruct|audioread).*'
38 changes: 7 additions & 31 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,10 @@ on:
- master

jobs:
tag_release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get Version
run: |
VERSION=$(python setup.py --version)
echo "VERSION=${VERSION}" >> $GITHUB_ENV
- uses: ncipollo/release-action@v1
with:
token: ${{secrets.GITHUB_TOKEN}}
tag: ${{env.VERSION}}
build_and_publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install Build Tools
run: |
python -m pip install build wheel

- name: Build Distribution Packages
run: |
python setup.py bdist_wheel
- name: Publish to Test PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{secrets.PYPI_TOKEN}}
build_and_publish_pypi_and_release:
uses: neongeckocom/.github/.github/workflows/publish_stable_release.yml@master
secrets: inherit
build_and_publish_docker:
needs: build_and_publish_pypi_and_release
uses: neongeckocom/.github/.github/workflows/publish_docker.yml@master
secrets: inherit
38 changes: 10 additions & 28 deletions .github/workflows/publish_test_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,13 @@ on:
- 'neon_iris/version.py'

jobs:
build_and_publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install Build Tools
run: |
python -m pip install build wheel
- name: Increment Version
run: |
VER=$(python setup.py --version)
python version_bump.py
- name: Push Version Change
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Increment Version
- name: Build Distribution Packages
run: |
python setup.py bdist_wheel
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{secrets.PYPI_TOKEN}}
publish_alpha_release:
uses: neongeckocom/.github/.github/workflows/publish_alpha_release.yml@master
secrets: inherit
with:
version_file: "neon_iris/version.py"
setup_py: "setup.py"
build_and_publish_docker:
needs: publish_alpha_release
uses: neongeckocom/.github/.github/workflows/publish_docker.yml@master
secrets: inherit
15 changes: 4 additions & 11 deletions .github/workflows/pull_master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,10 @@ on:
push:
branches:
- dev
workflow_dispatch:

jobs:
pull_changes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: pull-request-action
uses: repo-sync/pull-request@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
pr_reviewer: 'neonreviewers'
pr_assignee: 'neondaniel'
pr_draft: true
uses: neongeckocom/.github/.github/workflows/pull_master.yml@master
with:
pr_reviewer: neonreviewers
pr_assignee: neondaniel
16 changes: 2 additions & 14 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,8 @@ on:
workflow_dispatch:

jobs:
build_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install Build Tools
run: |
python -m pip install build wheel
- name: Build Distribution Packages
run: |
python setup.py bdist_wheel
py_build_tests:
uses: neongeckocom/.github/.github/workflows/python_build_tests.yml@master
unit_tests:
strategy:
matrix:
Expand Down
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM python:3.8-slim

LABEL vendor=neon.ai \
ai.neon.name="neon-iris"

ENV OVOS_CONFIG_BASE_FOLDER neon
ENV OVOS_CONFIG_FILENAME neon.yaml
ENV XDG_CONFIG_HOME /config

RUN apt update && \
apt install -y ffmpeg

ADD . /neon_iris
WORKDIR /neon_iris

RUN pip install wheel && \
pip install .[gradio]

COPY docker_overlay/ /

CMD ["iris", "start-gradio"]
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,40 @@ interacting with Neon systems remotely, via [MQ](https://github.com/NeonGeckoCom

Install the Iris Python package with: `pip install neon-iris`
The `iris` entrypoint is available to interact with a bus via CLI. Help is available via `iris --help`.

## Configuration
Configuration files can be specified via environment variables. By default,
`Iris` will read configuration from `~/.config/neon/diana.yaml` where
`XDG_CONFIG_HOME` is set to the default `~/.config`.
More information about configuration handling can be found
[in the docs](https://neongeckocom.github.io/neon-docs/quick_reference/configuration/).

A default configuration might look like:
```yaml
MQ:
server: neonaialpha.com
port: 25672
users:
mq_handler:
user: neon_api_utils
password: Klatchat2021
iris:
default_lang: en-us
languages:
- en-us
- uk-ua
webui_chatbot_label: "Neon AI"
webui_mic_label: "Speak with Neon"
webui_input_placeholder: "Chat with Neon"
```

### Language Support
For Neon Core deployments that support language support queries via MQ, `languages`
may be removed and `enable_lang_api: True` added to configuration. This will use
the reported STT/TTS supported languages in place of any `iris` configuration.

## Interfacing with a Diana installation
The `iris` CLI includes utilities for interacting with a `Diana` backend.



37 changes: 37 additions & 0 deletions docker_overlay/etc/neon/neon.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
MQ:
server: neon-rabbitmq
port: 5672
users:
mq_handler:
user: neon_api_utils
password: Klatchat2021
iris:
webui_title: Neon AI
webui_description: Chat with Neon
webui_input_placeholder: Ask me something
webui_chatbot_label: Chat History
webui_mic_label: Speak to Neon
webui_text_label: Text with Neon
server_address: "0.0.0.0"
server_port: 7860
default_lang: en-us
enable_lang_api: True

location:
city:
code: Renton
name: Renton
state:
code: WA
name: Washington
country:
code: US
name: United States
coordinate:
latitude: 47.482880
longitude: -122.217064
timezone:
code: America/Los_Angeles
name: Pacific Standard Time
dstOffset: 3600000
offset: -28800000
Loading