Skip to content

Commit

Permalink
fix(ai-model): optimize ai model prompt (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhoushaw authored Oct 12, 2024
1 parent bdf4fb3 commit 75bca65
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/midscene/src/ai-model/prompt/element_inspector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Please return the result in JSON format as follows:
{
"reason": "PLACEHOLDER", // The thought process for finding the element, replace PLACEHOLDER with your thought process
"text": "PLACEHOLDER", // Replace PLACEHOLDER with the text of elementInfo, if none, leave empty
"id": "PLACEHOLDER" // Replace PLACEHOLDER with the ID of elementInfo, important: use id not indexId
"id": "PLACEHOLDER" // Replace PLACEHOLDER with the ID of elementInfo, **use id not indexId**
}
// More elements...
],
Expand Down Expand Up @@ -127,7 +127,7 @@ Output Example:
// Describe the reason for finding this element, replace with actual value in practice
"reason": "Reason for finding element 4: It is located in the upper right corner, is an image type, and according to the screenshot, it is a shopping cart icon button",
"text": "",
// ID(hashID) of this element, replace with actual value in practice, important: use id not indexId
// ID(**use id not indexId**) of this element, replace with actual value in practice, **use id not indexId**
"id": "wefew2222few2"
}
],
Expand Down
2 changes: 1 addition & 1 deletion packages/midscene/tests/ai/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ export const modelList: Array<'openAI' | 'coze'> = useCozeModel('coze')
? ['openAI', 'coze']
: ['openAI'];

export const repeatTime = process.env.GITHUB_ACTIONS ? 2 : 1;
export const repeatTime = process.env.GITHUB_ACTIONS ? 2 : 4;

0 comments on commit 75bca65

Please sign in to comment.