更新marsho函数以处理tool_calls,优化函数调用参数,添加占位符参数以兼容部分模型(如GLM)

This commit is contained in:
2024-12-29 06:33:52 +08:00
parent 7c6319b839
commit 4b2676b9fc
3 changed files with 24 additions and 4 deletions

View File

@ -163,7 +163,13 @@ class Caller:
"parameters": {
"type": "object",
"properties": {
key: value.data() for key, value in self._parameters.items()
**{
key: value.data() for key, value in self._parameters.items()
},
"placeholder": {
"type": "string",
"description": "占位符,用于显示在对话框中", # 为保证兼容性而设置的无用参数
},
},
},
"required": [