@trymirai/uzu 0.1.3 → 0.1.4

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 (3) hide show
  1. package/README.md +19 -11
  2. package/package.json +3 -3
  3. package/uzu.node +0 -0
package/README.md CHANGED
@@ -21,16 +21,8 @@ Node package for [uzu](https://github.com/trymirai/uzu), a **high-performance**
21
21
 
22
22
  ## Quick Start
23
23
 
24
-
25
24
  ```bash
26
- # 1 / Install TS dependencies (installs @napi-rs/cli locally)
27
- cd bindings/ts
28
- pnpm install
29
-
30
- # 2 / Build the native addon in release mode
31
- pnpm run build
32
-
33
- # 3 / Set your API key in `examples/api_key.ts`, then run the examples
25
+ # Set your API key in `examples/api_key.ts`, then run the examples
34
26
  pnpm run chat
35
27
  pnpm run summarize
36
28
  pnpm run classify
@@ -49,11 +41,15 @@ const engine = new Engine()
49
41
  const licenseStatus = await engine.activate('API_KEY')
50
42
  ```
51
43
 
52
- ### Refresh models registry:
44
+ ### Refresh models registry / list cloud models:
53
45
 
54
46
  ```ts
55
47
  const registry = await engine.updateRegistry()
56
48
  const modelIdentifiers = registry.map((m) => m.identifier)
49
+
50
+ // To explore available cloud models:
51
+ const cloudModels = await engine.getCloudModels()
52
+ console.log('Cloud models:', cloudModels)
57
53
  ```
58
54
 
59
55
  ### Download with progress handle
@@ -94,7 +90,19 @@ Possible model state values:
94
90
  `Session` is the core entity used to communicate with the model:
95
91
 
96
92
  ```ts
97
- const session = engine.createSession({ type: 'Local', id: 'Meta-Llama-3.2-1B-Instruct-bfloat16' })
93
+ import { type ModelID } from './uzu'
94
+
95
+ const modelIdentifier = 'Meta-Llama-3.2-1B-Instruct-bfloat16'
96
+
97
+ // Choose one of the two options below by commenting/uncommenting:
98
+ // 1) Local model (default)
99
+ // const modelId: ModelID = { type: 'Local', id: modelIdentifier }
100
+
101
+ // 2) Cloud model (uncomment and set your repoId; you can list with engine.getCloudModels())
102
+ const cloudRepoId = 'meta-llama/Llama-4-Maverick-17B-128E-Instruct'
103
+ const modelId: ModelID = { type: 'Cloud', id: cloudRepoId }
104
+
105
+ const session = engine.createSession(modelId)
98
106
  ```
99
107
 
100
108
  `Session` offers different configuration presets that can provide significant performance boosts for common use cases like classification and summarization:
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@trymirai/uzu",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "private": false,
5
5
  "main": "uzu.node",
6
6
  "types": "uzu.d.ts",
7
7
  "packageManager": "pnpm@10.14.0",
8
8
  "scripts": {
9
- "build": "./build.sh",
10
9
  "chat": "ts-node examples/chat_example.ts",
11
10
  "summarize": "ts-node examples/summarization_example.ts",
12
- "classify": "ts-node examples/classification_example.ts"
11
+ "classify": "ts-node examples/classification_example.ts",
12
+ "cloud:list": "ts-node examples/list_cloud_models.ts"
13
13
  },
14
14
  "devDependencies": {
15
15
  "@napi-rs/cli": "3.1.2",
package/uzu.node CHANGED
Binary file