Skip to content

Commit

Permalink
Merge branch 'dev' into FEAT_FasterWhisper
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejgray authored Jun 14, 2024
2 parents 81bb1d5 + 823b3c9 commit e73bb2c
Show file tree
Hide file tree
Showing 41 changed files with 107 additions and 42 deletions.
38 changes: 35 additions & 3 deletions neon_diana_utils/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def make_keys_config(write_config: bool,
openai_key = click.prompt("OpenAI API Key", type=str,
default=chatgpt_config.get('key'))
model = click.prompt("Anthropic Model", type=str,
default="claude-2")
default="claude-2")
role = click.prompt("Role", type=str,
default="You are trying to give a short "
"answer in less than 40 words.")
Expand Down Expand Up @@ -405,6 +405,34 @@ def generate_mq_auth_config(rmq_config: dict) -> dict:
return mq_config


def generate_hana_config() -> dict:
"""
Generate HANA config based on user inputs.
:returns: Configuration for HANA frontend
"""
click.echo("Configuring HANA (HTTP API for Neon AI)")
email = click.confirm("Enable endpoint to send email?")
node_user, node_pass = None, None
if click.confirm("Enable node websocket connections?"):
node_user = click.prompt("Node username", type=str, default="neon")
node_pass = click.prompt("Node password", type=str, default="neon")
rpm = click.prompt("Client maximum requests per limit", type=int,
default=60)
auth_rpm = click.prompt("Client maximum auth requests per limit",
type=int, default=6)

hana_config = {"enable_email": email,
"node_username": node_user,
"node_password": node_pass,
"access_token_secret": secrets.token_hex(32),
"refresh_token_secret": secrets.token_hex(32),
"requests_per_minute": rpm,
"auth_requests_per_minute": auth_rpm
}
LOG.debug(pformat(hana_config))
return {"hana": hana_config}


def update_env_file(env_file: str):
"""
Update a .env file with absolute paths for `docker compose` compat.
Expand Down Expand Up @@ -675,6 +703,9 @@ def configure_backend(username: str = None,
mq_auth_config = generate_mq_auth_config(rmq_config)
click.echo(f"Generated auth for services: {set(mq_auth_config.keys())}")

# Generate HANA frontend config
hana_config = generate_hana_config()

# Generate `diana.yaml` output
if keys_config.get("LLM_CHAT_GPT"):
llm_config = make_llm_bot_config()
Expand All @@ -696,7 +727,8 @@ def configure_backend(username: str = None,
"server": "neon-rabbitmq",
"port": 5672}},
**keys_config,
**llm_config}
**llm_config,
**hana_config}
click.echo(f"Writing configuration to {diana_config}")
with open(diana_config, 'w+') as f:
yaml.dump(config, f)
Expand Down Expand Up @@ -936,7 +968,7 @@ def configure_klat_chat(external_url: str = None,
confirmed = False
while not confirmed:
libretranslate_url = click.prompt("Libretranslate API URL", type=str,
default=libretranslate_url)
default=libretranslate_url)
confirmed = click.confirm(f"Is '{libretranslate_url}' correct?")

# Validate https URL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ version: 0.1.26
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.0.1a23"
appVersion: "1.0.1a24"

dependencies:
# nginx needs to deploy to its own namespace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Deploy DIANA MQ Services

type: application
version: 0.0.17
appVersion: "1.0.1a23"
appVersion: "1.0.1a24"
dependencies:
- name: neon-api-proxy
alias: neon-api-proxy
Expand Down
2 changes: 1 addition & 1 deletion neon_diana_utils/helm_charts/base/base-mq/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ description: Library chart for basic MQ Services

type: library
version: 0.0.10
appVersion: "1.0.1a23"
appVersion: "1.0.1a24"
2 changes: 1 addition & 1 deletion neon_diana_utils/helm_charts/base/base-neon/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ description: Library chart for basic Neon Core Services

type: library
version: 0.0.5
appVersion: "1.0.1a23"
appVersion: "1.0.1a24"
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Installs common ingress and certificate components

type: application
version: 0.0.1
appVersion: "1.0.1a23"
appVersion: "1.0.1a24"

dependencies:
- name: ingress-nginx
Expand Down
2 changes: 1 addition & 1 deletion neon_diana_utils/helm_charts/base/neon-rabbitmq/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: A Helm chart for deploying RabbitMQ for the Diana Backend

type: application
version: 0.1.0
appVersion: "1.0.1a23"
appVersion: "1.0.1a24"

dependencies:
- name: rabbitmq
Expand Down
2 changes: 1 addition & 1 deletion neon_diana_utils/helm_charts/chatbots/chatbots/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Deploy Chatbots

type: application
version: 0.0.10
appVersion: "1.0.1a23"
appVersion: "1.0.1a24"
dependencies:
- name: cbf-facilitators
alias: cbf-facilitators
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ description: Chatbotsforum facilitators

type: application
version: 0.0.6
appVersion: "1.0.1a23"
appVersion: "1.0.1a24"
2 changes: 1 addition & 1 deletion neon_diana_utils/helm_charts/chatbots/subminds/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ description: Chatbotsforum default subminds

type: application
version: 0.0.5
appVersion: "1.0.1a23"
appVersion: "1.0.1a24"
2 changes: 1 addition & 1 deletion neon_diana_utils/helm_charts/http/hana/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Deploy the HANA application

type: application
version: 0.0.1
appVersion: "1.0.1a23"
appVersion: "1.0.1a24"

dependencies:
- name: base-http
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Deploy a Libretranslate Server

type: application
version: 0.0.5
appVersion: "1.0.1a23"
appVersion: "1.0.1a24"

dependencies:
- name: base-http
Expand Down
2 changes: 1 addition & 1 deletion neon_diana_utils/helm_charts/http/stt-nemo/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Deploy a Nemo STT Server

type: application
version: 0.0.2
appVersion: "1.0.1a23"
appVersion: "1.0.1a24"

dependencies:
- name: base-http
Expand Down
2 changes: 1 addition & 1 deletion neon_diana_utils/helm_charts/http/tts-coqui/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Deploy a Coqui TTS Server

type: application
version: 0.0.5
appVersion: "1.0.1a23"
appVersion: "1.0.1a24"

dependencies:
- name: base-http
Expand Down
2 changes: 1 addition & 1 deletion neon_diana_utils/helm_charts/http/tts-glados/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Deploy a Glados TTS Server

type: application
version: 0.0.4
appVersion: "1.0.1a23"
appVersion: "1.0.1a24"

dependencies:
- name: base-http
Expand Down
2 changes: 1 addition & 1 deletion neon_diana_utils/helm_charts/http/tts-larynx/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Deploy a Larynx TTS Server

type: application
version: 0.0.5
appVersion: "1.0.1a23"
appVersion: "1.0.1a24"

dependencies:
- name: base-http
Expand Down
2 changes: 1 addition & 1 deletion neon_diana_utils/helm_charts/http/tts-ljspeech/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Deploy a LJSpeech TTS Server

type: application
version: 0.0.5
appVersion: "1.0.1a23"
appVersion: "1.0.1a24"

dependencies:
- name: base-http
Expand Down
2 changes: 1 addition & 1 deletion neon_diana_utils/helm_charts/http/tts-mozilla/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Deploy a Mozilla TTS Server

type: application
version: 0.0.5
appVersion: "1.0.1a23"
appVersion: "1.0.1a24"

dependencies:
- name: base-http
Expand Down
2 changes: 1 addition & 1 deletion neon_diana_utils/helm_charts/http/tts-nancy/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Deploy a Nancy TTS Server

type: application
version: 0.0.6
appVersion: "1.0.1a23"
appVersion: "1.0.1a24"

dependencies:
- name: base-http
Expand Down
2 changes: 1 addition & 1 deletion neon_diana_utils/helm_charts/http/ww-snowboy/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Deploy Snowboy Wake Word Trainer

type: application
version: 0.0.5
appVersion: "1.0.1a23"
appVersion: "1.0.1a24"

dependencies:
- name: base-http
Expand Down
2 changes: 1 addition & 1 deletion neon_diana_utils/helm_charts/klat/klat-chat/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ description: Deploy Klat Services

type: application
version: 0.0.8
appVersion: "1.0.1a23"
appVersion: "1.0.1a24"
2 changes: 1 addition & 1 deletion neon_diana_utils/helm_charts/mq/neon-api-proxy/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Deploy an MQ API Proxy

type: application
version: 0.0.6
appVersion: "1.0.1a23"
appVersion: "1.0.1a24"

dependencies:
- name: base-mq
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Deploy an MQ Brands Service

type: application
version: 0.0.6
appVersion: "1.0.1a23"
appVersion: "1.0.1a24"

dependencies:
- name: base-mq
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Deploy an Email Proxy Service

type: application
version: 0.0.6
appVersion: "1.0.1a23"
appVersion: "1.0.1a24"

dependencies:
- name: base-mq
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Deploy an LLM proxy for Chat GPT

type: application
version: 0.0.7
appVersion: "1.0.1a23"
appVersion: "1.0.1a24"

dependencies:
- name: base-mq
Expand Down
2 changes: 1 addition & 1 deletion neon_diana_utils/helm_charts/mq/neon-llm-claude/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Deploy an LLM proxy for Claude by Anthropic

type: application
version: 0.0.2
appVersion: "1.0.1a23"
appVersion: "1.0.1a24"

dependencies:
- name: base-mq
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Deploy an LLM proxy for FastChat

type: application
version: 0.0.6
appVersion: "1.0.1a23"
appVersion: "1.0.1a24"

dependencies:
- name: base-mq
Expand Down
2 changes: 1 addition & 1 deletion neon_diana_utils/helm_charts/mq/neon-llm-gemini/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Deploy an LLM proxy for Gemini by Google

type: application
version: 0.0.2
appVersion: "1.0.1a23"
appVersion: "1.0.1a24"

dependencies:
- name: base-mq
Expand Down
2 changes: 1 addition & 1 deletion neon_diana_utils/helm_charts/mq/neon-llm-palm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Deploy an LLM proxy for Palm2 by Google

type: application
version: 0.0.6
appVersion: "1.0.1a23"
appVersion: "1.0.1a24"

dependencies:
- name: base-mq
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Deploy a Metrics Collector Service

type: application
version: 0.0.7
appVersion: "1.0.1a23"
appVersion: "1.0.1a24"

dependencies:
- name: base-mq
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Deploy an MQ CCL Script Parser Service

type: application
version: 0.0.6
appVersion: "1.0.1a23"
appVersion: "1.0.1a24"

dependencies:
- name: base-mq
Expand Down
2 changes: 1 addition & 1 deletion neon_diana_utils/helm_charts/neon/core/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Deploy Neon Core Services

type: application
version: 0.0.9
appVersion: "1.0.1a23"
appVersion: "1.0.1a24"
dependencies:
- name: neon-messagebus
alias: neon-messagebus
Expand Down
2 changes: 1 addition & 1 deletion neon_diana_utils/helm_charts/neon/neon-audio/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Deploy Neon Core Audio Service

type: application
version: 0.0.7
appVersion: "1.0.1a23"
appVersion: "1.0.1a24"

dependencies:
- name: base-neon
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Deploy Neon Core Enclosure Service

type: application
version: 0.0.6
appVersion: "1.0.1a23"
appVersion: "1.0.1a24"

dependencies:
- name: base-neon
Expand Down
2 changes: 1 addition & 1 deletion neon_diana_utils/helm_charts/neon/neon-gui/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Deploy Neon Core GUI Service

type: application
version: 0.0.6
appVersion: "1.0.1a23"
appVersion: "1.0.1a24"

dependencies:
- name: base-neon
Expand Down
2 changes: 1 addition & 1 deletion neon_diana_utils/helm_charts/neon/neon-iris/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Deploy Neon IRIS Web UI

type: application
version: 0.0.5
appVersion: "1.0.1a23"
appVersion: "1.0.1a24"

dependencies:
- name: base-neon
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Deploy Neon Core Messagebus

type: application
version: 0.0.7
appVersion: "1.0.1a23"
appVersion: "1.0.1a24"

dependencies:
- name: base-neon
Expand Down
2 changes: 1 addition & 1 deletion neon_diana_utils/helm_charts/neon/neon-skills/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Deploy Neon Core Skills Service

type: application
version: 0.0.7
appVersion: "1.0.1a23"
appVersion: "1.0.1a24"

dependencies:
- name: base-neon
Expand Down
2 changes: 1 addition & 1 deletion neon_diana_utils/helm_charts/neon/neon-speech/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Deploy Neon Core Speech (Voice) Service

type: application
version: 0.0.6
appVersion: "1.0.1a23"
appVersion: "1.0.1a24"

dependencies:
- name: base-neon
Expand Down
Loading

0 comments on commit e73bb2c

Please sign in to comment.