Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
feat: OpenAI: JSON mode #14
feat: OpenAI: JSON mode #14
Changes from 1 commit
a232325
0c56690
6467682
42ef60e
ed4297c
3f3a4dd
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Nitpick:
Hmm, I am wondering if it will be better without Option...
Maybe it is possible to override the default
zero
value. So users don't have to set it, at the same time may read more about default format.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.
I like how concrete this "{" is. It is easy to read.
There is a comment above, is something not obvious from the test name. I would C\consider an assert instead of a comment.
Something like
I would leave the first assert too assert!(response.to_string().starts_with("{"));
[]
is a JSON. May open AI return list of dictionaries in JSON?If so the comment is not accurate better without it.
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.
second thought: I remember Uncle Bob's suggestion source code should be general, tests be concrete.
Maybe
assert_eq!(response, "{ \"country\": "berlin"}")