Skip to content

Commit a067fb0

Browse files
committed
chore: move ai test into example repo
1 parent 2a174e5 commit a067fb0

File tree

4 files changed

+5
-9
lines changed

4 files changed

+5
-9
lines changed

.github/workflows/ai.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
env:
2222
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
2323
OPENAI_BASE_URL: ${{ secrets.OPENAI_BASE_URL }}
24-
MIDSCENE_MODEL_NAME: gpt-4o-2024-08-06
24+
MIDSCENE_MODEL_NAME: gpt-4o-2024-11-20
2525
CI: 1
2626
# MIDSCENE_DEBUG_AI_PROFILE: 1
2727

@@ -124,7 +124,7 @@ jobs:
124124
if-no-files-found: ignore
125125

126126
- name: Check if script failed
127-
if: steps.test-ai.outcome == 'failure' || steps.e2e-tests.outcome == 'failure' || steps.e2e-tests-cache.outcome == 'failure' || steps.e2e-tests-report.outcome == 'failure'
127+
if: steps.test-ai.outcome == 'failure'
128128
run: exit 1
129129

130130

packages/midscene/tests/ai/evaluate/plan/planning.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { plan } from '@/ai-model';
22
/* eslint-disable max-lines-per-function */
33
import { describe, expect, it, vi } from 'vitest';
4-
import { getPageDataOfTestName } from './test-suite/util';
4+
import { getPageDataOfTestName } from '../test-suite/util';
55

66
vi.setConfig({
77
testTimeout: 180 * 1000,

packages/midscene/tests/ai/plan/plan-to-target.test.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import path from 'node:path';
2-
import { AiInspectElement } from '@/ai-model';
3-
import { vlmPlanning } from '@/ai-model/vlm-planning';
2+
import { vlmPlanning } from '@/ai-model/ui-tars-planning';
43
import { savePositionImg } from '@midscene/shared/img';
54
import { expect, test } from 'vitest';
65
import { getPageTestData } from '../evaluate/test-suite/util';

packages/midscene/tests/ai/prompt.test.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
import path from 'node:path';
2-
import { AiInspectElement } from '@/ai-model';
3-
import { systemPromptToTaskPlanning } from '@/ai-model/prompt/planning';
1+
import { systemPromptToTaskPlanning } from '@/ai-model/prompt/llm-planning';
42
import { describe, expect, it, test } from 'vitest';
5-
import { getPageTestData } from './evaluate/test-suite/util';
63

74
describe('automation - computer', () => {
85
it('should be able to generate prompt', async () => {

0 commit comments

Comments
 (0)