Skip to content

Commit

Permalink
feat: add integrated graph
Browse files Browse the repository at this point in the history
  • Loading branch information
plutoless committed Dec 3, 2024
1 parent aa06052 commit 67f2257
Showing 1 changed file with 258 additions and 6 deletions.
264 changes: 258 additions & 6 deletions agents/examples/default/property.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,26 +102,26 @@
"name": "on_user_joined",
"dest": [
{
"extension_group": "stt",
"extension": "stt"
"extension_group": "chatgpt",
"extension": "llm"
}
]
},
{
"name": "on_user_left",
"dest": [
{
"extension_group": "stt",
"extension": "stt"
"extension_group": "chatgpt",
"extension": "llm"
}
]
},
{
"name": "on_connection_failure",
"dest": [
{
"extension_group": "stt",
"extension": "stt"
"extension_group": "chatgpt",
"extension": "llm"
}
]
}
Expand Down Expand Up @@ -280,6 +280,258 @@
}
]
},
{
"name": "voice_assistant_integrated_stt",
"auto_start": true,
"nodes": [
{
"type": "extension",
"name": "agora_rtc",
"addon": "agora_rtc",
"extension_group": "default",
"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",
"name": "llm",
"addon": "openai_chatgpt_python",
"extension_group": "chatgpt",
"property": {
"api_key": "${env:OPENAI_API_KEY}",
"base_url": "",
"frequency_penalty": 0.9,
"greeting": "TEN Agent connected. How can I help you today?",
"max_memory_length": 10,
"max_tokens": 512,
"model": "${env:OPENAI_MODEL}",
"prompt": "",
"proxy_url": "${env:OPENAI_PROXY_URL}"
}
},
{
"type": "extension",
"name": "tts",
"addon": "fish_audio_tts",
"extension_group": "tts",
"property": {
"api_key": "${env:FISH_AUDIO_TTS_KEY}",
"model_id": "d8639b5cc95548f5afbcfe22d3ba5ce5",
"optimize_streaming_latency": true,
"request_timeout_seconds": 30,
"base_url": "https://api.fish.audio"
}
},
{
"type": "extension",
"name": "interrupt_detector",
"addon": "interrupt_detector_python",
"extension_group": "default",
"property": {}
},
{
"type": "extension",
"name": "message_collector",
"addon": "message_collector",
"extension_group": "transcriber",
"property": {}
},
{
"type": "extension",
"name": "weatherapi_tool_python",
"addon": "weatherapi_tool_python",
"extension_group": "default",
"property": {
"api_key": "${env:WEATHERAPI_API_KEY|}"
}
}
],
"connections": [
{
"extension_group": "default",
"extension": "agora_rtc",
"cmd": [
{
"name": "on_user_joined",
"dest": [
{
"extension_group": "chatgpt",
"extension": "llm"
}
]
},
{
"name": "on_user_left",
"dest": [
{
"extension_group": "chatgpt",
"extension": "llm"
}
]
},
{
"name": "on_connection_failure",
"dest": [
{
"extension_group": "chatgpt",
"extension": "llm"
}
]
}
],
"data": [
{
"name": "text_data",
"dest": [
{
"extension_group": "default",
"extension": "interrupt_detector"
},
{
"extension_group": "transcriber",
"extension": "message_collector"
}
]
}
]
},
{
"extension_group": "chatgpt",
"extension": "llm",
"cmd": [
{
"name": "flush",
"dest": [
{
"extension_group": "tts",
"extension": "tts"
}
]
},
{
"name": "tool_call",
"dest": [
{
"extension_group": "default",
"extension": "weatherapi_tool_python"
}
]
}
],
"data": [
{
"name": "text_data",
"dest": [
{
"extension_group": "tts",
"extension": "tts"
},
{
"extension_group": "transcriber",
"extension": "message_collector"
}
]
}
]
},
{
"extension_group": "transcriber",
"extension": "message_collector",
"data": [
{
"name": "data",
"dest": [
{
"extension_group": "default",
"extension": "agora_rtc"
}
]
}
]
},
{
"extension_group": "tts",
"extension": "tts",
"cmd": [
{
"name": "flush",
"dest": [
{
"extension_group": "default",
"extension": "agora_rtc"
}
]
}
],
"audio_frame": [
{
"name": "pcm_frame",
"dest": [
{
"extension_group": "default",
"extension": "agora_rtc"
}
]
}
]
},
{
"extension_group": "default",
"extension": "interrupt_detector",
"cmd": [
{
"name": "flush",
"dest": [
{
"extension_group": "chatgpt",
"extension": "llm"
}
]
}
],
"data": [
{
"name": "text_data",
"dest": [
{
"extension_group": "chatgpt",
"extension": "llm"
}
]
}
]
},
{
"extension_group": "default",
"extension": "weatherapi_tool_python",
"cmd": [
{
"name": "tool_register",
"dest": [
{
"extension_group": "chatgpt",
"extension": "llm"
}
]
}
]
}
]
},
{
"name": "voice_assistant_realtime",
"auto_start": true,
Expand Down

0 comments on commit 67f2257

Please sign in to comment.