-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix(openai_responses): OpenAIResponsesObject is not complete #3194
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
Conversation
|
Hi @iamemilio! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
966588c to
12f55c6
Compare
|
|
||
| created_at: int | ||
| error: OpenAIResponseError | None = None | ||
| error: Optional[OpenAIResponseError] = None |
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 think mypy will yell at you for this and ask you to do | None
| """ | ||
|
|
||
|
|
||
| class ToolChoiceAllowed(BaseModel): |
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 think if these are nested you might need to add json_schema
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.
if you run pre-commit run --all-files the openapi spec will try to regen. Might need to pip install pre-commit if you haven't
| format: OpenAIResponseTextFormat | None = None | ||
| # Default to text format to avoid breaking the loading of old responses | ||
| # before the field was added. New responses will have this set always. | ||
| format: OpenAIResponseTextFormat | None = Field(default_factory=lambda: OpenAIResponseTextFormat(type="text")) |
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.
this makes sense to me I think
|
Thanks, I'll patch this! |
307dd92 to
0e59d96
Compare
0e59d96 to
8fb17ba
Compare
|
Pre-commit seems to be still failing? |
|
I think I found a good resolution for this. I enhanced the openapi generation to allow Literals with multiple fields. I also realize that these fields are not available in the |
e871e57 to
82a9099
Compare
…ion and discrimintated unions
82a9099 to
80b82c0
Compare
|
updated with merge commit, hopefully the protobuff bug in the vec-io test has been patched |
ashwinb
left a comment
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.
What is the test plan for this?
|
Thanks for the review, I am still very new to this code base so its helpful to get some expert guidance! I added some unit tests just to make sure this change doesn't come with any unintended consequences. I want to clarify that these changes only impact the Do you think these tests are appropriate enough, or would you recommend additional testing for this PR? Also, is there additional testing that needs to be done to support the stainless clients? |
3880626 to
66806c4
Compare
|
@iamemilio , can you please rebase and re-push so the |
|
@ashwinb could you take one more look at this |
|
running an oasdiff against the openAI API: there are a few "breakages" but they might be misnomers, please take a look ! @iamemilio |
|
I could be using a different version of the spec, or the tool could be too picky on what is "broken" but I figured I'd share just in case ^ |
|
Seems like at least some of these are a me problem. Let me see if there is a better way to address this. Where are you getting the latest openapi spec for openai? |
|
Was Ashwin's comment and request about a test plan addressed yet? Were you able to run Llama Stack with these changes against a common provider, such as vLLM, and ensure the integration tests all pass (or at least no new ones fail...) from before/after this change? |
|
It seems a major refactor is in order in the openapi spec, this PR will need to be re-written. Then I will address the review concerns. |
|
Hi all, I am going to close this and re-address this using the smaller issues filed. |
Fix gaps in Responses Response Object
Fixes #3040
Note: this is hand written and will need to be maintained, a long term strategy to stay in sync with OpenAI is needed.