Skip to content

feat: pass delta to onPartialReponse - #36

Merged
mdjastrzebski merged 3 commits into
mainfrom
feat/pass-delta-to-partial-response
Dec 16, 2024
Merged

feat: pass delta to onPartialReponse#36
mdjastrzebski merged 3 commits into
mainfrom
feat/pass-delta-to-partial-response

Conversation

@mdjastrzebski

Copy link
Copy Markdown
Member

Summary

Pass text delta as a 2nd parameter to onPartialResponse

Test plan

* Note: setting this option will switch underlying assistant calls to streaming format.
*/
onPartialResponse?: (text: string) => void;
onPartialResponse?: (text: string, delta: string) => void;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Maybe let's make delta an optional property

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It's optional in the sense that you don't have to use it in JS, but if you use it then you are sure it will be provided

Comment thread .changeset/shaggy-fishes-obey.md Outdated

@Q1w1N Q1w1N left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I opt for making delta an optional variable. Besides that all good!

@mdjastrzebski
mdjastrzebski merged commit 4463e11 into main Dec 16, 2024
@mdjastrzebski
mdjastrzebski deleted the feat/pass-delta-to-partial-response branch December 16, 2024 12:05
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