mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-02 05:31:02 +00:00
Change the type of ToolResult.responseParts (#6875)
This commit is contained in:
parent
9a0722625b
commit
75822d3506
13 changed files with 205 additions and 324 deletions
|
|
@ -239,13 +239,15 @@ describe('useReactToolScheduler in YOLO Mode', () => {
|
|||
request,
|
||||
response: expect.objectContaining({
|
||||
resultDisplay: 'YOLO Formatted tool output',
|
||||
responseParts: {
|
||||
functionResponse: {
|
||||
id: 'yoloCall',
|
||||
name: 'mockToolRequiresConfirmation',
|
||||
response: { output: expectedOutput },
|
||||
responseParts: [
|
||||
{
|
||||
functionResponse: {
|
||||
id: 'yoloCall',
|
||||
name: 'mockToolRequiresConfirmation',
|
||||
response: { output: expectedOutput },
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
}),
|
||||
}),
|
||||
]);
|
||||
|
|
@ -388,13 +390,15 @@ describe('useReactToolScheduler', () => {
|
|||
request,
|
||||
response: expect.objectContaining({
|
||||
resultDisplay: 'Formatted tool output',
|
||||
responseParts: {
|
||||
functionResponse: {
|
||||
id: 'call1',
|
||||
name: 'mockTool',
|
||||
response: { output: 'Tool output' },
|
||||
responseParts: [
|
||||
{
|
||||
functionResponse: {
|
||||
id: 'call1',
|
||||
name: 'mockTool',
|
||||
response: { output: 'Tool output' },
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
}),
|
||||
}),
|
||||
]);
|
||||
|
|
@ -769,13 +773,15 @@ describe('useReactToolScheduler', () => {
|
|||
request: requests[0],
|
||||
response: expect.objectContaining({
|
||||
resultDisplay: 'Display 1',
|
||||
responseParts: {
|
||||
functionResponse: {
|
||||
id: 'multi1',
|
||||
name: 'tool1',
|
||||
response: { output: 'Output 1' },
|
||||
responseParts: [
|
||||
{
|
||||
functionResponse: {
|
||||
id: 'multi1',
|
||||
name: 'tool1',
|
||||
response: { output: 'Output 1' },
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
}),
|
||||
});
|
||||
expect(call2Result).toMatchObject({
|
||||
|
|
@ -783,13 +789,15 @@ describe('useReactToolScheduler', () => {
|
|||
request: requests[1],
|
||||
response: expect.objectContaining({
|
||||
resultDisplay: 'Display 2',
|
||||
responseParts: {
|
||||
functionResponse: {
|
||||
id: 'multi2',
|
||||
name: 'tool2',
|
||||
response: { output: 'Output 2' },
|
||||
responseParts: [
|
||||
{
|
||||
functionResponse: {
|
||||
id: 'multi2',
|
||||
name: 'tool2',
|
||||
response: { output: 'Output 2' },
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
}),
|
||||
});
|
||||
expect(result.current[0]).toEqual([]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue