Replies: 1 comment 2 replies
-
见 #425 ,这个报错应该就是对于历史消息中的多余的“<|assistant|>”造成的。 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
#192
之前也问过了MemGPT是主动在request里面添加function_call字段,意思是须要gpt的response中能够解析出function_call name param等json字段。OpenAI这样写关于functions和function_call
https://platform.openai.com/docs/api-reference/chat/create
所以
情况1,如果request中有functions,但是没有指定function_call,gpt可以“选择”response中添加function_call。
情况2,但是如果request中有functions同时有function_call,就必须要reponse出function_call。
这就是为什么memgpt用chatglm3会function_call失败,因为chatglm3的训练写死了是情况1,我看repo中的openai_api.py中是这样的
gen_param中无视了requestion会指定function_call的情况
所以和openai没有一致的情况,能够在模型层面修复吗,还是通过提示词?
我看了一下tool查询北京天气的openai api例子,似乎是通过retry实现的,难道openai也是这样的吗(可能)?
Beta Was this translation helpful? Give feedback.
All reactions