Change the type of ToolResult.responseParts (#6875)

This commit is contained in:
Tommaso Sciortino
2025-08-22 14:12:05 -07:00
committed by GitHub
parent 9a0722625b
commit 75822d3506
13 changed files with 205 additions and 324 deletions

View File

@@ -46,13 +46,15 @@ const createFakeCompletedToolCall = (
invocation: tool.build({ param: 'test' }),
response: {
callId: request.callId,
responseParts: {
functionResponse: {
id: request.callId,
name,
response: { output: 'Success!' },
responseParts: [
{
functionResponse: {
id: request.callId,
name,
response: { output: 'Success!' },
},
},
},
],
error: undefined,
errorType: undefined,
resultDisplay: 'Success!',
@@ -67,13 +69,15 @@ const createFakeCompletedToolCall = (
tool,
response: {
callId: request.callId,
responseParts: {
functionResponse: {
id: request.callId,
name,
response: { error: 'Tool failed' },
responseParts: [
{
functionResponse: {
id: request.callId,
name,
response: { error: 'Tool failed' },
},
},
},
],
error: error || new Error('Tool failed'),
errorType: ToolErrorType.UNKNOWN,
resultDisplay: 'Failure!',