Skip to content

Commit 5014a6a

Browse files
XiNGRZartisrouseabout
authored andcommitted
compatibility with llama.cpp tool call streaming
ggml-org/llama.cpp#12379
1 parent d676dc2 commit 5014a6a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/intellichat/readers/OpenAIReader.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export default class OpenAIReader extends BaseReader implements IChatReader {
4949
const toolCalls = respMsg.toolCalls[0];
5050
return {
5151
index: toolCalls.index || 0,
52-
args: toolCalls.function.arguments,
52+
args: toolCalls.function?.arguments || '',
5353
};
5454
} catch (err) {
5555
console.error('parseToolArgs', err);

0 commit comments

Comments
 (0)