Add tool_choice, response_format, and top_p to assistant RunRequest #754
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.
Describe the change
Adds the
tool_choice
,response_format
, andtop_p
params to theRunRequest
object to match AssistantsV2https://platform.openai.com/docs/assistants/whats-new
These all don't require any additional implementation. Left out the stream option since that is not yet supported.
Provide OpenAI documentation link
https://platform.openai.com/docs/api-reference/runs/createRun
Describe your solution
This just adds the fields to the struct so that they can be passed in the request body. These are just extra params that are ignored when passed to Assistants V1. So they should be safe to add.
Tests
Unit tests run successfully.
Getting the following error when running the integration tests
But this seems unrelated to my change since these tests are not invoking the assistants api. LMK if this test failure is a user error.
I did test making a request with both Assistants V1 and V2 and both worked.
Issue: #753