elementus-ai 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/elementus.js +5 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -27,9 +27,9 @@ I just installed the npm package "elementus-ai" — a self-healing element resol
|
|
|
27
27
|
- If none found, tell me you can't detect a supported framework and stop
|
|
28
28
|
|
|
29
29
|
2. CHOOSE THE LLM PROVIDER
|
|
30
|
-
- Ask me: "Do you want to use a local LLM (LM Studio, free, private) or Google Gemini (cloud, fast, ~$0.
|
|
30
|
+
- Ask me: "Do you want to use a local LLM (LM Studio, free, private) or Google Gemini (cloud, fast, ~$0.001 per AI-healed selector on gemini-3.5-flash; selectors that still work cost nothing)?"
|
|
31
31
|
- If Gemini: ask for API key or check for GEMINI_API_KEY env var
|
|
32
|
-
- If LM Studio: use defaults (localhost:1234
|
|
32
|
+
- If LM Studio: use defaults (localhost:1234) with a vision/grounding model loaded (recommended: holo-3.1-9b)
|
|
33
33
|
|
|
34
34
|
3. INTEGRATE BASED ON MY FRAMEWORK
|
|
35
35
|
|
|
@@ -95,19 +95,19 @@ await p.locator('#stable-element').click()
|
|
|
95
95
|
### Option A: Local LLM via LM Studio (free, private)
|
|
96
96
|
|
|
97
97
|
1. Download [LM Studio](https://lmstudio.ai)
|
|
98
|
-
2. Load a vision-capable model
|
|
98
|
+
2. Load a vision-capable model. Recommended: **`holo-3.1-9b`** — a GUI-grounding model that locates on-screen elements far better than general chat VLMs, and it's small (9B). Any vision model works, but grounding models earn their keep on the vision-fallback path.
|
|
99
99
|
3. Start the local server (default: `http://localhost:1234`)
|
|
100
100
|
|
|
101
101
|
```javascript
|
|
102
102
|
const el = createElementus({
|
|
103
103
|
provider: 'lmstudio',
|
|
104
104
|
lmStudioUrl: 'http://localhost:1234/v1/chat/completions',
|
|
105
|
-
model: '
|
|
105
|
+
model: 'holo-3.1-9b',
|
|
106
106
|
})
|
|
107
107
|
```
|
|
108
108
|
|
|
109
109
|
Tips for the local setup:
|
|
110
|
-
- **
|
|
110
|
+
- **Context length:** set it to 16k+ in LM Studio — the ARIA-snapshot grounding step can send large prompts, and the default 4k will silently truncate.
|
|
111
111
|
- **Semantic matching:** load an embedding model (e.g. `text-embedding-nomic-embed-text-v1.5`) and set `embeddingModel` to let paraphrased descriptions ("sign in" vs "log in") resolve without vision.
|
|
112
112
|
|
|
113
113
|
### Option B: Google Gemini API (cloud, fast, better vision)
|
|
@@ -243,7 +243,7 @@ createElementus({
|
|
|
243
243
|
|
|
244
244
|
// LM Studio
|
|
245
245
|
lmStudioUrl: 'http://localhost:1234/v1/chat/completions',
|
|
246
|
-
model: '
|
|
246
|
+
model: 'holo-3.1-9b',
|
|
247
247
|
|
|
248
248
|
// Gemini
|
|
249
249
|
geminiApiKey: null, // or GEMINI_API_KEY env var
|
package/elementus.js
CHANGED
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
*
|
|
21
21
|
* Option A — Local LLM via LM Studio (free, private, no API key):
|
|
22
22
|
* 1. Download LM Studio from https://lmstudio.ai
|
|
23
|
-
* 2. Load a vision-capable model (
|
|
23
|
+
* 2. Load a vision-capable model (recommended: holo-3.1-9b, a GUI-grounding model)
|
|
24
24
|
* 3. Start the local server (default: http://localhost:1234)
|
|
25
25
|
* 4. Configure:
|
|
26
26
|
* const el = createElementus({
|
|
27
27
|
* provider: 'lmstudio',
|
|
28
28
|
* lmStudioUrl: 'http://localhost:1234/v1/chat/completions',
|
|
29
|
-
* model: '
|
|
29
|
+
* model: 'holo-3.1-9b',
|
|
30
30
|
* })
|
|
31
31
|
*
|
|
32
32
|
* Option B — Google Gemini API (cloud, fast, better vision):
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
*
|
|
159
159
|
* // LM Studio (when provider = 'lmstudio')
|
|
160
160
|
* lmStudioUrl: 'http://localhost:1234/v1/chat/completions',
|
|
161
|
-
* model: '
|
|
161
|
+
* model: 'holo-3.1-9b',
|
|
162
162
|
*
|
|
163
163
|
* // Gemini (when provider = 'gemini')
|
|
164
164
|
* geminiApiKey: null, // or GEMINI_API_KEY env var
|
|
@@ -287,7 +287,7 @@ const path = require('path')
|
|
|
287
287
|
const DEFAULTS = {
|
|
288
288
|
provider: 'lmstudio',
|
|
289
289
|
lmStudioUrl: 'http://localhost:1234/v1/chat/completions',
|
|
290
|
-
model: '
|
|
290
|
+
model: 'holo-3.1-9b',
|
|
291
291
|
geminiApiKey: null,
|
|
292
292
|
geminiModel: 'gemini-3.5-flash',
|
|
293
293
|
maxCandidates: 20,
|
|
@@ -367,7 +367,7 @@ const REGION_LABELS = [
|
|
|
367
367
|
* @param {Object} userConfig
|
|
368
368
|
* @param {'lmstudio'|'gemini'} [userConfig.provider='lmstudio'] - LLM provider
|
|
369
369
|
* @param {string} [userConfig.lmStudioUrl='http://localhost:1234/v1/chat/completions'] - LM Studio endpoint
|
|
370
|
-
* @param {string} [userConfig.model='
|
|
370
|
+
* @param {string} [userConfig.model='holo-3.1-9b'] - LM Studio model name
|
|
371
371
|
* @param {string|null} [userConfig.geminiApiKey=null] - Google Gemini API key (or GEMINI_API_KEY env var)
|
|
372
372
|
* @param {string} [userConfig.geminiModel='gemini-3.5-flash'] - Gemini model ID
|
|
373
373
|
* @param {number} [userConfig.maxCandidates=20] - max elements sent to LLM for disambiguation
|