Merge pull request #515 from koalalgx/main

意图识别intent_llm单独配置独立的LLM,意图识别intent_llm增加天气和新闻查询function
This commit is contained in:
hrz
2025-03-27 10:43:49 +08:00
committed by GitHub
8 changed files with 915 additions and 175 deletions
+17 -2
View File
@@ -86,7 +86,10 @@ selected_module:
# 意图识别使用intent_llm,优点:通用性强,缺点:增加串行前置意图识别模块,会增加处理时间
# 意图识别使用function_call,缺点:需要所选择的LLM支持function_call,优点:按需调用工具、速度快
# 默认免费的ChatGLMLLM就已经支持function_call,但是如果像追求稳定建议把LLM设置成:DoubaoLLM,使用的具体model_name是:doubao-pro-32k-functioncall-241028
Intent: function_call
Intent: intent_llm
# 意图识别专用LLM配置,如果设置,则意图识别会使用这个模型而不是主LLM
IntentLLM: XinferenceSmallLLM #ChatGLMLLM #XinferenceSmallLLM # 设置为空字符串""或不设置则使用主LLM
# 意图识别,是用于理解用户意图的模块,例如:播放音乐
Intent:
@@ -181,6 +184,18 @@ VAD:
LLM:
# 所有openai类型均可以修改超参,以AliLLM为例
# 当前支持的type为openai、dify、ollama,可自行适配
XinferenceLLM:
# 定义LLM API类型
type: xinference
# Xinference服务地址和模型名称
model_name: qwen2.5:72b-AWQ # 使用的模型名称,需要预先在Xinference启动对应模型
base_url: http://localhost:9997 # Xinference服务地址
XinferenceSmallLLM:
# 定义轻量级LLM API类型,用于意图识别
type: xinference
# Xinference服务地址和模型名称
model_name: qwen2.5:3b-AWQ # 使用的小模型名称,用于意图识别
base_url: http://localhost:9997 # Xinference服务地址
AliLLM:
# 定义LLM API类型
type: openai
@@ -534,4 +549,4 @@ wakeup_words:
- "小龙小龙"
- "喵喵同学"
- "小滨小滨"
- "小冰小冰"
- "小冰小冰"