openai: Use the chat completions endpoint for regular generations.
Since OpenAI has marked the completions endpoints legacy and nudges users to use the chat completions endpoint, we should do the equivalent (and send all completions to the chat completions endpoint). This will simplify code.
@tmc After you making the changes, the ConversationalReactDescription agent stopped working properly and consistently returned an error: "unable to parse agent output". Please fix this issue.
@tmc After you making the changes, the ConversationalReactDescription agent stopped working properly and consistently returned an error: "unable to parse agent output". Please fix this issue.进行更改后,对话反应说明代理停止正常工作,并始终返回错误:“无法分析代理输出”。请修复此问题。
hello,dou you fix this problem?
This appears to work with gpt-4 but not 3.5 and it's not clear that it broke due to any change related to the endpoint used. Feel free to open a PR with a fix.
From looking into it, it seems that the problem is that the gpt-3.5 chat models just gives responses that does not follow the format instructions given, causing the code to error. Most likely because these models are fine tuned to respond with chat messages. I would recommend using gpt 4 for agents, for now.
gpt4 也是 unable to parse agent output 如果在agent里使用就会这样报错 v1.4