Skip to content

Commit

Permalink
fix: ensure the right order of tool-calls is kept (#997)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yonom authored Oct 13, 2024
1 parent e95f06f commit 07a4f91
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"conversational-ui",
"conversational-ai"
],
"version": "0.5.80",
"version": "0.5.81",
"license": "MIT",
"exports": {
".": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ export function assistantDecoderStream() {
const { toolCallId: id, toolName: name } = value;
toolCallNames.set(id, name);
currentToolCall = { id, name, argsText: "" };

controller.enqueue({
type: "tool-call-delta",
toolCallType: "function",
toolCallId: id,
toolName: name,
argsTextDelta: "",
});
break;
}
case AssistantStreamChunkType.ToolCallDelta: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export function runResultStream() {
controller.enqueue(message);
break;
}

case "tool-call-delta": {
const { toolCallId, toolName, argsTextDelta } = chunk;

Expand Down

0 comments on commit 07a4f91

Please sign in to comment.