Skip to content

Commit

Permalink
feat: added api key in vision APIs (#225)
Browse files Browse the repository at this point in the history
* feat: added api key in vision APIs

* chore: added changeset

* fix: updated llm version
  • Loading branch information
pushpam5 authored Nov 14, 2024
1 parent a63961d commit a5eacf0
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .changeset/cool-pianos-lay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"appwright": patch
---

feat: added api key in vision APIs
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"license": "Apache-2.0",
"description": "E2E mobile app testing done right, with the Playwright test runner",
"dependencies": {
"@empiricalrun/llm": "^0.9.21",
"@empiricalrun/llm": "^0.9.25",
"@ffmpeg-installer/ffmpeg": "^1.1.0",
"@playwright/test": "^1.47.1",
"appium": "^2.6.0",
Expand Down
4 changes: 2 additions & 2 deletions src/vision/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ export class VisionProvider {
options?: { useCache?: boolean },
): Promise<{ x: number; y: number }> {
test.skip(
!process.env.VISION_MODEL_ENDPOINT,
"LLM vision based tap is not enabled. Set the VISION_MODEL_ENDPOINT environment variable to enable it",
!process.env.EMPIRICAL_API_KEY,
"LLM vision based tap is not enabled. Set the EMPIRICAL_API_KEY environment variable to enable it",
);
const base64Image = await this.webDriverClient.takeScreenshot();
const coordinates = await getCoordinatesFor(prompt, base64Image, options);
Expand Down

0 comments on commit a5eacf0

Please sign in to comment.