refactor: 独立出预处理阶段

This commit is contained in:
RockChinQ
2024-02-01 16:35:00 +08:00
parent 976a9de39c
commit 532a713355
9 changed files with 156 additions and 90 deletions
+2 -2
View File
@@ -38,12 +38,12 @@ class ToolManager:
return all_functions
async def generate_tools_for_openai(self, conversation: core_entities.Conversation) -> str:
async def generate_tools_for_openai(self, use_funcs: entities.LLMFunction) -> str:
"""生成函数列表
"""
tools = []
for function in conversation.use_funcs:
for function in use_funcs:
if function.enable:
function_schema = {
"type": "function",