Skip to content

Commit

Permalink
feat: worker mgmt optimizaiton (#253)
Browse files Browse the repository at this point in the history
* feat: worker mgmt optimizaiton
- ensure worker subprocess is properly killed by SIGKILL
- clean up config.go
- UI style fix

* feat: worker mgmt optimizaiton
- ensure worker subprocess is properly killed by SIGKILL
- clean up config.go
- UI style fix
- remove property.json.example

* feat: worker mgmt optimizaiton
- ensure worker subprocess is properly killed by SIGKILL
- clean up config.go
- UI style fix
- remove property.json.example
- use frontend to override graph options for different languages instead of configuring multiple graphs

* feat: worker mgmt optimizaiton
- ensure worker subprocess is properly killed by SIGKILL
- clean up config.go
- UI style fix
- remove property.json.example
- use frontend to override graph options for different languages instead of configuring multiple graphs
  • Loading branch information
plutoless authored Aug 27, 2024
1 parent a28d58c commit 9a72676
Show file tree
Hide file tree
Showing 15 changed files with 85 additions and 2,817 deletions.
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ ARG SESSION_CONTROL_CONF=session_control.conf
WORKDIR /app

COPY . .
COPY agents/property.json.example agents/property.json
COPY agents/${SESSION_CONTROL_CONF} agents/session_control.conf

RUN make clean && make build && \
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,11 @@ You will need to uncheck "Use Rosetta for x86_64/amd64 emulation on Apple Silico
### Next step

#### 1. Modify config files
In the root of the project, use the following command to create `.env` and `./agents/property.json` from the examples.
In the root of the project, use the following command to create `.env` from the examples.

They will be used to store information for `docker compose` later.
```bash
cp ./.env.example ./.env
cp ./agents/property.json.example ./agents/property.json
```

#### 2. Setup API keys
Expand Down
218 changes: 2 additions & 216 deletions agents/property.json
Original file line number Diff line number Diff line change
Expand Up @@ -1372,221 +1372,7 @@
]
},
{
"name": "camera.va.openai.azure.cn",
"auto_start": true,
"nodes": [
{
"type": "extension",
"extension_group": "default",
"addon": "agora_rtc",
"name": "agora_rtc",
"property": {
"app_id": "$AGORA_APP_ID",
"token": "<agora_token>",
"channel": "astra_agents_test",
"stream_id": 1234,
"remote_stream_id": 123,
"subscribe_audio": true,
"subscribe_video": true,
"publish_audio": true,
"publish_data": true,
"enable_agora_asr": true,
"agora_asr_vendor_name": "microsoft",
"agora_asr_language": "zh-CN",
"agora_asr_vendor_key": "$AZURE_STT_KEY",
"agora_asr_vendor_region": "$AZURE_STT_REGION",
"agora_asr_session_control_file_path": "session_control.conf",
"subscribe_video_pix_fmt": 4
}
},
{
"type": "extension",
"extension_group": "default",
"addon": "interrupt_detector",
"name": "interrupt_detector"
},
{
"type": "extension",
"extension_group": "chatgpt",
"addon": "openai_chatgpt_python",
"name": "openai_chatgpt",
"property": {
"base_url": "",
"api_key": "$OPENAI_API_KEY",
"frequency_penalty": 0.9,
"model": "gpt-4o",
"max_tokens": 512,
"prompt": "",
"proxy_url": "$OPENAI_PROXY_URL",
"greeting": "Astra已连接,需要我为您提供什么帮助?",
"checking_vision_text_items": "[\"让我看看你的摄像头...\",\"让我看一下...\",\"我看一下,请稍候...\"]",
"max_memory_length": 10,
"enable_tools": true
}
},
{
"type": "extension",
"extension_group": "tts",
"addon": "azure_tts",
"name": "azure_tts",
"property": {
"azure_subscription_key": "$AZURE_TTS_KEY",
"azure_subscription_region": "$AZURE_TTS_REGION",
"azure_synthesis_voice_name": "en-US-JaneNeural"
}
},
{
"type": "extension",
"extension_group": "transcriber",
"addon": "message_collector",
"name": "message_collector"
},
{
"type": "extension_group",
"addon": "default_extension_group",
"name": "default"
},
{
"type": "extension_group",
"addon": "default_extension_group",
"name": "chatgpt"
},
{
"type": "extension_group",
"addon": "default_extension_group",
"name": "tts"
},
{
"type": "extension_group",
"addon": "default_extension_group",
"name": "transcriber"
}
],
"connections": [
{
"extension_group": "default",
"extension": "agora_rtc",
"data": [
{
"name": "text_data",
"dest": [
{
"extension_group": "default",
"extension": "interrupt_detector"
},
{
"extension_group": "chatgpt",
"extension": "openai_chatgpt"
},
{
"extension_group": "transcriber",
"extension": "message_collector"
}
]
}
],
"video_frame": [
{
"name": "video_frame",
"dest": [
{
"extension_group": "chatgpt",
"extension": "openai_chatgpt"
}
]
}
]
},
{
"extension_group": "chatgpt",
"extension": "openai_chatgpt",
"data": [
{
"name": "text_data",
"dest": [
{
"extension_group": "tts",
"extension": "azure_tts"
},
{
"extension_group": "transcriber",
"extension": "message_collector"
}
]
}
],
"cmd": [
{
"name": "flush",
"dest": [
{
"extension_group": "tts",
"extension": "azure_tts"
}
]
}
]
},
{
"extension_group": "tts",
"extension": "azure_tts",
"audio_frame": [
{
"name": "pcm_frame",
"dest": [
{
"extension_group": "default",
"extension": "agora_rtc"
}
]
}
],
"cmd": [
{
"name": "flush",
"dest": [
{
"extension_group": "default",
"extension": "agora_rtc"
}
]
}
]
},
{
"extension_group": "transcriber",
"extension": "message_collector",
"data": [
{
"name": "data",
"dest": [
{
"extension_group": "default",
"extension": "agora_rtc"
}
]
}
]
},
{
"extension_group": "default",
"extension": "interrupt_detector",
"cmd": [
{
"name": "flush",
"dest": [
{
"extension_group": "chatgpt",
"extension": "openai_chatgpt"
}
]
}
]
}
]
},
{
"name": "camera.va.openai.azure.en",
"name": "camera.va.openai.azure",
"auto_start": true,
"nodes": [
{
Expand Down Expand Up @@ -1628,7 +1414,7 @@
"base_url": "",
"api_key": "$OPENAI_API_KEY",
"frequency_penalty": 0.9,
"model": "gpt-4o-mini",
"model": "gpt-4o",
"max_tokens": 512,
"prompt": "",
"proxy_url": "$OPENAI_PROXY_URL",
Expand Down
Loading

0 comments on commit 9a72676

Please sign in to comment.