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(accumulateDelta): AssistantStream accumulateDelta toolCall (#771) #866

Closed
wants to merge 1 commit into from

Conversation

A4F54B
Copy link

@A4F54B A4F54B commented May 22, 2024

  • I understand that this repository is auto-generated and my pull request may not be merged

Changes being requested

One solution I see for this problem is to call openai.beta.threads.runs.retrieve.
This PR fixes this bug and allows multiple toolCalls to return, so that calls can be listened to in toolCallCreated and toolCallDone, thus avoiding polling retrieve and improving efficiency.
In addition, with this modification, users no longer need to manually assemble the arguments string, they only need to use function.arguments in callTool in the toolCallDone callback.

stream.on("toolCallDone",async (toolCall) =>{
  console.log(toolCall.function.arguments)
})

Additional context & links

#771

https://community.openai.com/t/how-to-properly-handle-the-function-call-in-assistant-streaming-node-js/687193

@A4F54B A4F54B requested a review from a team as a code owner May 22, 2024 14:59
@bradleyball
Copy link

Is this PR going to be merged? This is blocking me. Thanks.

@rattrayalex
Copy link
Collaborator

rattrayalex commented Jul 8, 2024

Thanks for the PR! We hope to take a look soon – sorry for the delay.

@gerard-morera
Copy link

Hi! when is this PR expected to be merged?

@rattrayalex
Copy link
Collaborator

Thanks for the bump, @gerard-morera – we'll take another look soon! Really sorry this slipped through the cracks.

@RobertCraigie
Copy link
Collaborator

Thanks for the PR and really sorry it took us so long to action. I've merged your change in a separate PR so I could make some minor style changes.

This will be included in the next release #1028

@A4F54B
Copy link
Author

A4F54B commented Sep 13, 2024

@RobertCraigie it's not cool, wait is too long and the new PR will cause developers to give up more contributions because it is difficult to track contributions, however the problem was solved

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.

5 participants