mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-29 17:23:57 +08:00
fix:function call bug (#268)
* 优化function call消息处理 * fix:用户说话重复记录bug * 2025-3-10-优化llm intent (#254) Co-authored-by: 欣南科技 <huangrongzhuang@xin-nan.com> * update:回复上版提示词,无需再二次识别歌曲名 --------- Co-authored-by: 玄凤科技 <eric230308@gmail.com> Co-authored-by: hrz <1710360675@qq.com> Co-authored-by: Jiao Haoyang <108573524+XuSenfeng@users.noreply.github.com>
This commit is contained in:
co-authored by
玄凤科技
hrz
Jiao Haoyang
parent
4f3fae81c1
commit
2b662d3a14
@@ -5,6 +5,7 @@ from config.logger import setup_logging
|
||||
TAG = __name__
|
||||
logger = setup_logging()
|
||||
|
||||
|
||||
class IntentProviderBase(ABC):
|
||||
def __init__(self, config):
|
||||
self.config = config
|
||||
@@ -17,9 +18,9 @@ class IntentProviderBase(ABC):
|
||||
def set_llm(self, llm):
|
||||
self.llm = llm
|
||||
logger.bind(tag=TAG).debug("Set LLM for intent provider")
|
||||
|
||||
|
||||
@abstractmethod
|
||||
async def detect_intent(self, dialogue_history: List[Dict]) -> str:
|
||||
async def detect_intent(self, dialogue_history: List[Dict], text: str) -> str:
|
||||
"""
|
||||
检测用户最后一句话的意图
|
||||
Args:
|
||||
|
||||
Reference in New Issue
Block a user