Fix generation looping
This commit is contained in:
parent
c3078a67e1
commit
6a304e8884
|
@ -459,7 +459,8 @@ export class ToolManager {
|
||||||
* @returns {boolean} Whether the response data contains tool calls
|
* @returns {boolean} Whether the response data contains tool calls
|
||||||
*/
|
*/
|
||||||
static hasToolCalls(data) {
|
static hasToolCalls(data) {
|
||||||
return Array.isArray(ToolManager.#getToolCallsFromData(data));
|
const toolCalls = ToolManager.#getToolCallsFromData(data);
|
||||||
|
return Array.isArray(toolCalls) && toolCalls.length > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue