@leuria/web-embed 0.1.0 → 0.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 CHANGED
@@ -3,10 +3,10 @@
3
3
  A small embedding model that runs in the page, as a Leuria provider: search by meaning for visitors whose own AI can't embed. It uses [Transformers.js](https://huggingface.co/docs/transformers.js) in a Web Worker, so the page stays responsive.
4
4
 
5
5
  ```ts
6
- import { bridge, browserAI, createLeuria } from "@leuria/client"
6
+ import { leuria, promptAPI, createAI } from "@leuria/client"
7
7
  import { pageEmbedder } from "@leuria/web-embed"
8
8
 
9
- const ai = createLeuria({ providers: [bridge(), browserAI(), pageEmbedder()] })
9
+ const ai = createAI({ providers: [leuria(), promptAPI(), pageEmbedder()] })
10
10
  // Later, from a click (the visitor agrees to the download):
11
11
  await ai.connect("page-embed")
12
12
  ```
package/dist/index.d.ts CHANGED
@@ -3,9 +3,9 @@ import '@leuria/client';
3
3
 
4
4
  /**
5
5
  * @leuria/web-embed: a small embedding model that runs in the page, for
6
- * visitors whose own AI can't embed. Put it after `bridge()`:
6
+ * visitors whose own AI can't embed. Put it after `leuria()`:
7
7
  *
8
- * const ai = createLeuria({ providers: [bridge(), browserAI(), pageEmbedder()] })
8
+ * const ai = createAI({ providers: [leuria(), promptAPI(), pageEmbedder()] })
9
9
  *
10
10
  * The model and its runtime (about 40 MB) are downloaded once, when the visitor asks for
11
11
  * it (`ai.connect("page-embed")`, from a click), then kept in the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leuria/web-embed",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "A small embedding model that runs in the page (Transformers.js), as a Leuria provider: search by meaning for visitors without their own model.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -30,12 +30,12 @@
30
30
  "@huggingface/transformers": "^4.3.0"
31
31
  },
32
32
  "peerDependencies": {
33
- "@leuria/client": "^0.1.0"
33
+ "@leuria/client": "^0.1.4"
34
34
  },
35
35
  "devDependencies": {
36
36
  "tsup": "^8.4.0",
37
37
  "typescript": "^5.9.0",
38
- "@leuria/client": "0.1.0"
38
+ "@leuria/client": "0.1.4"
39
39
  },
40
40
  "scripts": {
41
41
  "build": "tsup && cp src/worker.js dist/worker.js",