update:intent_llm加载动态插件

This commit is contained in:
hrz
2025-05-09 11:39:32 +08:00
parent 47f409246d
commit ff98f84f18
9 changed files with 113 additions and 71 deletions
+7 -1
View File
@@ -33,7 +33,13 @@ class Dialogue:
dialogue.append({"role": m.role, "tool_calls": m.tool_calls})
elif m.role == "tool":
dialogue.append(
{"role": m.role, "tool_call_id": m.tool_call_id, "content": m.content}
{
"role": m.role,
"tool_call_id": (
str(uuid.uuid4()) if m.tool_call_id is None else m.tool_call_id
),
"content": m.content,
}
)
else:
dialogue.append({"role": m.role, "content": m.content})