Closed gregpriday closed 11 months ago
Hi @gregpriday
I was not able to reproduce the error using the following code:
$result = OpenAI::chat()->create([
'model' => 'gpt-4-1106-preview',
'messages' => [
['role' => 'user', 'content' => 'What is awesome about PHP?'],
],
]);
Please provide a full example which reproduces the issue.
Sorry! My mistake, it was from the presence of the new toolCalls
in the message response that I wasn't properly removing when building up a message history for multi-stage prompts (I was only removing functionCall
). Thanks for checking this @gehrisandro, I'll make sure I do more digging before reporting next time.
Hi there,
I’ve recently updated the
openai-php/client
from v0.7.5 to v0.7.8 and have run into a snag. When I attempt to use the chat completion endpoint, I'm getting an error regarding an additional 'toolCalls' property not being allowed.Interestingly, this property was part of the updates introduced in v0.7.7, as per the changelog. However, upon upgrading, my chat functionality is compromised, and an exception is thrown, pointing to this new property as the culprit.
Here's what the error looks like:
For context, the chat feature performs as expected when I’m on v0.7.5, and the issue only appears after the update. To ensure that my project remains functional, I've reverted to v0.7.5 as a temporary measure, which has resolved the error for now. The chat completion call isn't using functions or tools.
Steps to reproduce the problem include upgrading to v0.7.8 and initiating a chat via the API, using the facade from the Laravel package.
Environment: