Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions agents/examples/default/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@
"name": "openai_chatgpt_python",
"version": "=0.1.0"
},
{
"type": "extension",
"name": "aisuite_llm_python",
"version": "=0.1.0"
},
{
"type": "extension",
"name": "fish_audio_tts",
Expand Down
82 changes: 18 additions & 64 deletions agents/examples/default/property.json
Original file line number Diff line number Diff line change
Expand Up @@ -283,34 +283,35 @@
"agora_asr_session_control_file_path": "session_control.conf"
}
},
{
"type": "extension",
"extension_group": "tts",
"addon": "azure_tts",
"name": "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",
"name": "llm",
"addon": "openai_chatgpt_python",
"addon": "aisuite_llm_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}",
"model": "openai:gpt-4o-mini",
"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"
"provider_config": {
"openai": {
"api_key": "${env:OPENAI_API_KEY}"
}
}
}
},
{
Expand All @@ -326,15 +327,6 @@
"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": [
Expand Down Expand Up @@ -390,14 +382,6 @@
"extension": "tts"
}
]
},
{
"name": "tool_call",
"dest": [
{
"extension": "weatherapi_tool_python"
}
]
}
],
"data": [
Expand Down Expand Up @@ -472,19 +456,6 @@
]
}
]
},
{
"extension": "weatherapi_tool_python",
"cmd": [
{
"name": "tool_register",
"dest": [
{
"extension": "llm"
}
]
}
]
}
]
},
Expand All @@ -509,23 +480,6 @@
"subscribe_audio_sample_rate": 24000
}
},
{
"type": "extension",
"name": "v2v",
"addon": "openai_v2v_python",
"extension_group": "llm",
"property": {
"api_key": "${env:OPENAI_REALTIME_API_KEY}",
"temperature": 0.9,
"model": "gpt-4o-realtime-preview-2024-12-17",
"max_tokens": 2048,
"voice": "alloy",
"language": "en-US",
"server_vad": true,
"dump": true,
"max_history": 10
}
},
{
"type": "extension",
"name": "message_collector",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import aisuite_llm_addon
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#
# This file is part of TEN Framework, an open source project.
# Licensed under the Apache License, Version 2.0.
# See the LICENSE file for more information.
#
from ten import (
Addon,
register_addon_as_extension,
TenEnv,
)


@register_addon_as_extension("aisuite_llm_python")
class AISuiteLLMExtensionAddon(Addon):
def on_create_instance(self, ten: TenEnv, addon_name: str, context):
from .aisuite_llm_extension import AISuiteLLMExtension

ten.log_info("on_create_instance")
ten.on_create_instance_done(AISuiteLLMExtension(addon_name), context)
Loading
Loading