Skip to content

Commit 0bbf8a0

Browse files
committed
default tool type to "function" (sometimes APIs omit this from deltas)
1 parent 440be99 commit 0bbf8a0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/aiusechat/openaichat/openaichat-backend.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ func processChatStream(
168168
for _, tcDelta := range choice.Delta.ToolCalls {
169169
idx := tcDelta.Index
170170
for len(toolCallsInProgress) <= idx {
171-
toolCallsInProgress = append(toolCallsInProgress, ToolCall{})
171+
toolCallsInProgress = append(toolCallsInProgress, ToolCall{Type: "function"})
172172
}
173173

174174
tc := &toolCallsInProgress[idx]

0 commit comments

Comments
 (0)