Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Made function call streamable #98

Merged
merged 2 commits into from
Aug 17, 2023
Merged

Made function call streamable #98

merged 2 commits into from
Aug 17, 2023

Conversation

buraktabn
Copy link
Contributor

Making FunctionCall's arguments Optional allow us to stream the functions. Otherwise, it throws a parsing error.

@64bit
Copy link
Owner

64bit commented Aug 17, 2023

Hi @buraktabn ,

Thank you for PR! This is a really good update (and bug fix) to make example fully streamable.

To maintain parity with OpenAPI spec this PR requires following changes:

  1. Keep existing FunctionCall as it is because it represents non-streaming response : https://github.com/openai/openai-openapi/blob/master/openapi.yaml#L2124-L2136

  2. Introduce, lets say, FunctionCallStream with the Option<String> to represent streaming response: https://github.com/openai/openai-openapi/blob/master/openapi.yaml#L2211-L2220

  3. Use FunctionCallStream to be the type for function_call field for ChatCompletionStreamResponseDelta struct.

@buraktabn
Copy link
Contributor Author

Hi @64bit,

Thanks for the review. I've made the changes as you suggested and pushed the commit Let me know if anything else is needed.

Copy link
Owner

@64bit 64bit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good!

@64bit 64bit merged commit ede4114 into 64bit:main Aug 17, 2023
@64bit
Copy link
Owner

64bit commented Aug 17, 2023

This PR is released in v0.13.1

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants