Show error instead of aborting if model fails to call tool (#7005)
This commit is contained in:
parent
ade703944d
commit
7fa592f342
1 changed files with 64 additions and 63 deletions
|
|
@ -370,7 +370,9 @@ class Session {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
const invocation = tool.build(args);
|
const invocation = tool.build(args);
|
||||||
|
|
||||||
const confirmationDetails =
|
const confirmationDetails =
|
||||||
await invocation.shouldConfirmExecute(abortSignal);
|
await invocation.shouldConfirmExecute(abortSignal);
|
||||||
|
|
||||||
|
|
@ -437,7 +439,6 @@ class Session {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
|
||||||
const toolResult: ToolResult = await invocation.execute(abortSignal);
|
const toolResult: ToolResult = await invocation.execute(abortSignal);
|
||||||
const content = toToolCallContent(toolResult);
|
const content = toToolCallContent(toolResult);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue