Skip to content

Commit

Permalink
Merge pull request #459 from TEN-framework/fix_docker_build
Browse files Browse the repository at this point in the history
fix(): use agents/examples/demo for building agents
  • Loading branch information
sunshinexcode authored Dec 4, 2024
2 parents cafc9d1 + 041456a commit 4eba8b7
Show file tree
Hide file tree
Showing 3 changed files with 198 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ WORKDIR /app
COPY . .
COPY agents/${SESSION_CONTROL_CONF} agents/session_control.conf

RUN task clean && task use && \
RUN task clean && task use AGENT=agents/examples/demo && \
cd agents && ./scripts/package.sh

FROM ubuntu:22.04
Expand Down
4 changes: 2 additions & 2 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ tasks:
- task: build-server

use:
desc: use agent, default 'agents/examples/demo'
desc: use agent, default 'agents/examples/default'
vars:
AGENT: '{{.AGENT| default "agents/examples/default"}}'
cmds:
Expand Down Expand Up @@ -64,4 +64,4 @@ tasks:
dir: ./server
internal: true
cmds:
- rm -rf bin
- rm -rf bin
195 changes: 195 additions & 0 deletions agents/examples/demo/property.json
Original file line number Diff line number Diff line change
Expand Up @@ -1278,6 +1278,201 @@
]
}
]
},
{
"name": "va_coze_azure",
"auto_start": false,
"nodes": [
{
"type": "extension",
"extension_group": "default",
"addon": "agora_rtc",
"name": "agora_rtc",
"property": {
"app_id": "${env:AGORA_APP_ID}",
"token": "<agora_token>",
"channel": "ten_agent_test",
"stream_id": 1234,
"remote_stream_id": 123,
"subscribe_audio": true,
"publish_audio": true,
"publish_data": true,
"enable_agora_asr": true,
"agora_asr_vendor_name": "microsoft",
"agora_asr_language": "en-US",
"agora_asr_vendor_key": "${env:AZURE_STT_KEY}",
"agora_asr_vendor_region": "${env:AZURE_STT_REGION}",
"agora_asr_session_control_file_path": "session_control.conf"
}
},
{
"type": "extension",
"extension_group": "default",
"addon": "interrupt_detector",
"name": "interrupt_detector"
},
{
"type": "extension",
"extension_group": "glue",
"addon": "coze_python_async",
"name": "coze_python_async",
"property": {
"token": "<coze_token>",
"bot_id": "<coze_bot_id>",
"base_url": "https://api.coze.cn",
"prompt": "",
"greeting": "TEN Agent connected. How can I help you today?"
}
},
{
"type": "extension",
"extension_group": "tts",
"addon": "azure_tts",
"name": "azure_tts",
"property": {
"azure_subscription_key": "${env:AZURE_TTS_KEY}",
"azure_subscription_region": "${env:AZURE_TTS_REGION}",
"azure_synthesis_voice_name": "en-US-AndrewMultilingualNeural"
}
},
{
"type": "extension",
"extension_group": "transcriber",
"addon": "message_collector",
"name": "message_collector"
}
],
"connections": [
{
"extension_group": "default",
"extension": "agora_rtc",
"data": [
{
"name": "text_data",
"dest": [
{
"extension_group": "default",
"extension": "interrupt_detector"
},
{
"extension_group": "glue",
"extension": "coze_python_async"
},
{
"extension_group": "transcriber",
"extension": "message_collector"
}
]
}
],
"cmd": [
{
"name": "on_user_joined",
"dest": [
{
"extension_group": "glue",
"extension": "coze_python_async"
}
]
},
{
"name": "on_user_left",
"dest": [
{
"extension_group": "glue",
"extension": "coze_python_async"
}
]
}
]
},
{
"extension_group": "glue",
"extension": "coze_python_async",
"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": "glue",
"extension": "coze_python_async"
}
]
}
]
}
]
}
]
}
Expand Down

0 comments on commit 4eba8b7

Please sign in to comment.