Skip to content

Commit e89e817

Browse files
committed
test
1 parent ef75307 commit e89e817

4 files changed

Lines changed: 7 additions & 12 deletions

File tree

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ services:
1616
APP_FRONTEND_URL: ${APP_FRONTEND_URL}
1717
BODY_PARSER_JSON_LIMIT: ${BODY_PARSER_JSON_LIMIT}
1818
ELASTIC_URL: ${ELASTIC_URL}
19-
OLLAMA_BASE_URL: http://host.docker.internal:11434
19+
OLLAMA_BASE_URL: ${OLLAMA_BASE_URL}
2020
ports:
2121
- "${APP_PORT}:3000"
2222
expose:

src/compare/compare.service.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ describe('CompareService', () => {
3030
{
3131
provide: ConfigService,
3232
useValue: {
33-
getOrThrow: jest.fn().mockReturnValue('http://localhost:11434'),
33+
getOrThrow: jest.fn(),
3434
},
3535
},
3636
],

src/compare/libs/vlm/ollama.types.ts

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/compare/libs/vlm/vlm.service.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ export const DEFAULT_PROMPT = `You are provided with three images:
1616
2. Second image: new version screenshot
1717
3. Diff image
1818
19-
Spot any difference in text, color, shape and position of elements treat as different event slight change
20-
Ignore minor rendering artifacts that are imperceptible to users like antialliasing
21-
Describe the difference like 100 words`;
19+
Spot any difference in text, color, shape and position of elements - treat as different even slight change.
20+
Ignore minor rendering artifacts that are imperceptible to users like antialiasing.
21+
Describe the difference in about 100 words.`;
2222

2323
const VlmComparisonResultSchema: z.ZodObject<{
2424
identical: z.ZodBoolean;
@@ -126,13 +126,12 @@ export class VlmService implements ImageComparator {
126126
},
127127
});
128128

129-
// Some models return result in thinking field instead of response
129+
// Some models return result in thinking field instead of content field
130130
const preferred = config.useThinking ? data.message.thinking : data.message.content;
131131
const fallback = config.useThinking ? data.message.content : data.message.thinking;
132132
const content = preferred || fallback;
133133

134-
this.logger.debug(`${JSON.stringify(data)}`);
135-
this.logger.debug(`VLM Response: ${content}`);
134+
this.logger.debug(`VLM response content: ${content}`);
136135

137136
if (!content) {
138137
throw new Error('Empty response from model');

0 commit comments

Comments
 (0)