-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
functionResult messages missing 'name' parameter with OpenAI #194
base: main
Are you sure you want to change the base?
Conversation
Hi @kaeldric , can you provide any integration and unit tests? |
hey @kaeldric, thanks for your contribution! |
Hi all! I wrote some tests based on my current usage, I don't know if those work for you. About the documentation, what do you think about the Integration/Chat/OpenAIChatTest.php function? |
$functionInfo->name | ||
); | ||
|
||
$chat->generateChatOrReturnFunctionCalled($messages); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could use the generateChat
method here, making some assertions on the results?
@@ -20,6 +20,29 @@ | |||
expect(isset($chat))->toBeTrue(); | |||
}); | |||
|
|||
it('can process system, user, assistant and functionResult messages', function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While the integration test seems really useful, I don't see much value in this unit test. Moreover I think it does not represent an example of real usage of the function, so it could be misleading.
@kaeldric maybe we can use CalledFunction now it has been introduced? |
Adding message of type "functionResult" did not work in OpenAI chat because the parameter 'name' is required.
I could not test the fix with other models.