Skip to content
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

arguments field of ChatFunctionCall should be Text rather than Value #15

Open
Saizan opened this issue Aug 21, 2023 · 0 comments
Open

Comments

@Saizan
Copy link

Saizan commented Aug 21, 2023

The arguments field of a function call object is not guaranteed to be valid JSON, here's the relevant quote from the API reference

The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.

Currently if there is a problem in arguments we get a DecodeFailure ... :: ClientError from completeChat, which makes it harder to recover from, because we do not have access to the other parts of the response, which are likely valid.

Saizan pushed a commit to Saizan/openai-hs that referenced this issue Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant