Skip to content

Commit 94f2a0a

Browse files
committed
fix: ci
1 parent 9305e6b commit 94f2a0a

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

packages/core/src/ai-model/prompt/llm-planning.ts

+12-7
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ By viewing the page screenshot and description, you should consider this and out
136136
* The language switch button is shown in the screenshot, but it's not marked with a rectangle. So we have to use the page description to find the element. By carefully checking the context information (coordinates, attributes, content, etc.), you can find the element.
137137
* The "English" option button is not shown in the screenshot now, it means it may only show after the previous actions are finished. So don't plan any action to do this.
138138
* Log what these action do: Click the language switch button to open the language options. Wait for 1 second.
139-
* The task cannot be accomplished (because we cannot see the "English" option now), so the \`finish\` field is false.
139+
* The task cannot be accomplished (because we cannot see the "English" option now), so the \`more_actions_needed_by_instruction\` field is true.
140140
141141
{{
142142
"actions":[
@@ -153,7 +153,7 @@ By viewing the page screenshot and description, you should consider this and out
153153
}}
154154
],
155155
"error": null,
156-
"finish": false,
156+
"more_actions_needed_by_instruction": true,
157157
"log": "Click the language switch button to open the language options. Wait for 1 second",
158158
}}
159159
@@ -176,13 +176,13 @@ Wrong output:
176176
"locate": null, // This means the 'English' option is not shown in the screenshot, the task cannot be accomplished
177177
}}
178178
],
179-
"finish": true, // WRONG: should be false
179+
"more_actions_needed_by_instruction": false, // WRONG: should be true
180180
"log": "Click the language switch button to open the language options",
181181
}}
182182
183183
Reason:
184184
* The \`prompt\` is missing in the first 'Locate' action
185-
* Since the option button is not shown in the screenshot, there are still more actions to be done, so the \`finish\` field should be false
185+
* Since the option button is not shown in the screenshot, there are still more actions to be done, so the \`more_actions_needed_by_instruction\` field should be true
186186
`;
187187

188188
export async function systemPromptToTaskPlanning() {
@@ -277,10 +277,10 @@ export const planSchema: ResponseFormatJSONSchema = {
277277
},
278278
description: 'List of actions to be performed',
279279
},
280-
finish: {
280+
more_actions_needed_by_instruction: {
281281
type: 'boolean',
282282
description:
283-
'If all the actions described in the instruction have been covered by this action and logs, set this field to true.',
283+
'If all the actions described in the instruction have been covered by this action and logs, set this field to false.',
284284
},
285285
log: {
286286
type: 'string',
@@ -292,7 +292,12 @@ export const planSchema: ResponseFormatJSONSchema = {
292292
description: 'Error messages about unexpected situations',
293293
},
294294
},
295-
required: ['actions', 'finish', 'log', 'error'],
295+
required: [
296+
'actions',
297+
'more_actions_needed_by_instruction',
298+
'log',
299+
'error',
300+
],
296301
additionalProperties: false,
297302
},
298303
},

packages/core/tests/ai/extract/__snapshots__/extract.test.ts.snap

-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ exports[`extract > online order 1`] = `
1313
},
1414
],
1515
"errors": [],
16-
"language": "zh",
1716
}
1817
`;
1918

@@ -26,7 +25,6 @@ exports[`extract > todo 1`] = `
2625
"Learn AI",
2726
],
2827
"errors": [],
29-
"language": "en",
3028
}
3129
`;
3230

@@ -47,6 +45,5 @@ exports[`extract > todo obj 1`] = `
4745
},
4846
],
4947
"errors": [],
50-
"language": "en",
5148
}
5249
`;

packages/core/tests/ai/extract/extract.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ describe('extract', () => {
3333

3434
const { parseResult } = await AiExtractElementInfo({
3535
dataQuery:
36-
'{checked: boolean; text: string}[],Complete task list, string is the task',
36+
'{checked: boolean; text: string}[], Complete task list, task name as string and `checked` is true if the task is completed',
3737
context,
3838
});
3939
expect(parseResult).toMatchSnapshot();

0 commit comments

Comments
 (0)