Skip to content

Commit 0c63fb2

Browse files
authored
VLM integration via Ollama added (#339)
* VLM integration via Ollama added
1 parent a5da984 commit 0c63fb2

27 files changed

Lines changed: 1132 additions & 11 deletions

.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,4 @@ AWS_S3_BUCKET_NAME=
3737
#SERVER_TIMEOUT=120000
3838
#SERVER_HEADERS_TIMEOUT=60000
3939
#SERVER_KEEP_ALIVE_TIMEOUT=5000
40+
OLLAMA_BASE_URL=http://localhost:11434

.github/workflows/workflow.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ jobs:
3333
- name: Run acceptance tests
3434
run: npm run test:acceptance
3535

36+
- name: Wait for services to be ready with migrations
37+
run: sleep 30
38+
3639
- name: Run e2e tests
3740
run: npm run test:e2e
3841

docker-compose.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,13 @@ 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: ${OLLAMA_BASE_URL}
1920
ports:
2021
- "${APP_PORT}:3000"
2122
expose:
2223
- "${APP_PORT}"
24+
extra_hosts:
25+
- host.docker.internal:host-gateway
2326
depends_on:
2427
postgres:
2528
condition: service_healthy

package-lock.json

Lines changed: 27 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
"ldapts": "^7.1.0",
5353
"looks-same": "^9.0.0",
5454
"odiff-bin": "^2.6.1",
55+
"ollama": "^0.6.3",
5556
"passport": "^0.6.0",
5657
"passport-jwt": "^4.0.1",
5758
"passport-local": "^1.0.0",
@@ -63,7 +64,8 @@
6364
"rimraf": "^5.0.1",
6465
"rxjs": "^7.8.2",
6566
"swagger-ui-express": "^4.6.3",
66-
"uuid-apikey": "^1.5.3"
67+
"uuid-apikey": "^1.5.3",
68+
"zod": "^4.2.1"
6769
},
6870
"devDependencies": {
6971
"@darraghor/eslint-plugin-nestjs-typed": "^6.9.3",

prisma/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,4 @@ RUN npm ci --verbose
1212
RUN chmod +x /app/wait-for-it.sh
1313
RUN chmod +x /app/entrypoint.sh
1414

15-
ENTRYPOINT ["/app/entrypoint.sh"]
16-
17-
CMD ["sh"]
15+
ENTRYPOINT ["/app/entrypoint.sh"]
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
-- AlterEnum
2+
ALTER TYPE "ImageComparison" ADD VALUE 'vlm';
3+
4+
-- AlterTable
5+
ALTER TABLE "TestRun" ADD COLUMN "vlmDescription" TEXT;
6+
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Please do not edit this file manually
2-
# It should be added in your version-control system (i.e. Git)
3-
provider = "postgresql"
2+
# It should be added in your version-control system (e.g., Git)
3+
provider = "postgresql"

prisma/schema.prisma

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ model TestRun {
6969
baselineBranchName String?
7070
ignoreAreas String @default("[]")
7171
tempIgnoreAreas String @default("[]")
72+
vlmDescription String?
7273
baseline Baseline?
7374
build Build @relation(fields: [buildId], references: [id])
7475
project Project? @relation(fields: [projectId], references: [id])
@@ -138,6 +139,7 @@ enum ImageComparison {
138139
pixelmatch
139140
lookSame
140141
odiff
142+
vlm
141143
}
142144

143145
enum Role {

src/_data_/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ export const generateTestRun = (testRun?: Partial<TestRun>): TestRun => {
9696
baselineBranchName: 'master',
9797
branchName: 'develop',
9898
merge: false,
99+
vlmDescription: null,
99100
...testRun,
100101
};
101102
};

0 commit comments

Comments
 (0)