@eidentic/model 0.2.0 → 0.2.2

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.
Files changed (2) hide show
  1. package/README.md +3 -3
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -21,8 +21,8 @@ import { openai } from "@ai-sdk/openai";
21
21
  // Wrap a provider model
22
22
  const model = new AIModel(anthropic("claude-sonnet-4-5"));
23
23
 
24
- // Wrap an embedding model
25
- const embedder = new AIEmbedder(openai.embedding("text-embedding-3-small"), { dim: 1536 });
24
+ // Wrap an embedding model (async factory — the dimension is probed automatically)
25
+ const embedder = await AIEmbedder.create(openai.embedding("text-embedding-3-small"));
26
26
 
27
27
  // Check current prices
28
28
  import { defaultPrices, pricesUpdatedAt } from "@eidentic/model";
@@ -30,7 +30,7 @@ console.log(defaultPrices["claude-sonnet-4-5"]); // { inputUsd: ..., outputUsd:
30
30
 
31
31
  // Ollama for local inference
32
32
  import { createOllamaModel } from "@eidentic/model";
33
- const local = createOllamaModel("llama3.2", { baseUrl: "http://localhost:11434" });
33
+ const local = createOllamaModel("llama3.2", { baseURL: "http://localhost:11434" });
34
34
  ```
35
35
 
36
36
  ## Links
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eidentic/model",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "publishConfig": {
@@ -29,7 +29,7 @@
29
29
  ],
30
30
  "dependencies": {
31
31
  "ai": "^6.0.0",
32
- "@eidentic/types": "0.2.0"
32
+ "@eidentic/types": "0.2.1"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "ollama-ai-provider": ">=1.0.0"