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

fix: residual index fields are moved in non-streaming mode #110

Merged
merged 1 commit into from
Jun 27, 2024

Conversation

adubovik
Copy link
Collaborator

index field must be removed in non-streaming mode.
Note, that this is only applicable to delta field of a streaming chunk, because we want to preserve choice.[*].index.

Compare definitions of a tool call in streaming and non-streaming modes in openai lib.

streaming:

https://github.com/openai/openai-python/blob/254937a733b95366d21f5bda45b2f84693488e42/src/openai/types/chat/chat_completion_chunk.py#L47-L56

non-streaming:

https://github.com/openai/openai-python/blob/254937a733b95366d21f5bda45b2f84693488e42/src/openai/types/chat/chat_completion_message_tool_call.py#L23-L31

@adubovik adubovik self-assigned this Jun 26, 2024
@adubovik
Copy link
Collaborator Author

adubovik commented Jun 26, 2024

/deploy-review

Something went wrong, check GitHub Workflow run output
Something went wrong, check GitHub Workflow run output

@adubovik
Copy link
Collaborator Author

adubovik commented Jun 26, 2024

/deploy-review

Something went wrong, check GitHub Workflow run output

@adubovik
Copy link
Collaborator Author

adubovik commented Jun 26, 2024

/deploy-review

Something went wrong, check GitHub Workflow run output

@adubovik adubovik merged commit 63318de into development Jun 27, 2024
12 checks passed
@adubovik adubovik deleted the fix/removing-indices-in-non-streaming-mode branch June 27, 2024 08:14
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

Successfully merging this pull request may close these issues.

2 participants