@trymirai/uzu 0.1.40 → 0.1.42
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 +26 -2
- package/package.json +1 -1
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/README.md
CHANGED
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
<a href="https://artifacts.trymirai.com/social/about_us.mp3"><img src="https://img.shields.io/badge/Listen-Podcast-red" alt="Listen to our podcast"></a>
|
|
8
8
|
<a href="https://docsend.com/v/76bpr/mirai2025"><img src="https://img.shields.io/badge/View-Deck-red" alt="View our deck"></a>
|
|
9
|
-
<a href="
|
|
9
|
+
<a href="https://discord.gg/gUhyn6Rb7x"><img src="https://img.shields.io/discord/1377764166764462120?label=Discord" alt="Discord"></a>
|
|
10
|
+
<a href="mailto:contact@getmirai.co?subject=Interested%20in%20Mirai"><img src="https://img.shields.io/badge/Send-Email-green" alt="Contact us"></a>
|
|
10
11
|
<a href="https://docs.trymirai.com/app-integration/overview"><img src="https://img.shields.io/badge/Read-Docs-blue" alt="Read docs"></a>
|
|
11
12
|
[](https://www.npmjs.com/package/@trymirai/uzu)
|
|
12
13
|
[](LICENSE)
|
|
@@ -25,7 +26,7 @@ Add the `uzu` dependency to your project's `package.json`:
|
|
|
25
26
|
|
|
26
27
|
```json
|
|
27
28
|
"dependencies": {
|
|
28
|
-
"@trymirai/uzu": "0.1.
|
|
29
|
+
"@trymirai/uzu": "0.1.42"
|
|
29
30
|
}
|
|
30
31
|
```
|
|
31
32
|
|
|
@@ -48,6 +49,7 @@ Place the `API_KEY` you obtained earlier in the corresponding example file, and
|
|
|
48
49
|
pnpm run tsn examples/chat.ts
|
|
49
50
|
pnpm run tsn examples/summarization.ts
|
|
50
51
|
pnpm run tsn examples/classification.ts
|
|
52
|
+
pnpm run tsn examples/cloud.ts
|
|
51
53
|
```
|
|
52
54
|
|
|
53
55
|
### Chat
|
|
@@ -164,6 +166,28 @@ main().catch((error) => {
|
|
|
164
166
|
|
|
165
167
|
You can view the stats to see that the answer will be ready immediately after the prefill step, and actual generation won’t even start due to speculative decoding, which significantly improves generation speed.
|
|
166
168
|
|
|
169
|
+
### Cloud
|
|
170
|
+
|
|
171
|
+
Sometimes you want to create a complex pipeline where some requests are processed on-device and the more complex ones are handled in the cloud using a larger model. With `uzu`, you can do this easily: just choose the cloud model you want to use and perform all requests through the same API:
|
|
172
|
+
|
|
173
|
+
```ts
|
|
174
|
+
import Engine from '@trymirai/uzu';
|
|
175
|
+
|
|
176
|
+
async function main() {
|
|
177
|
+
const output = await Engine
|
|
178
|
+
.create('API_KEY')
|
|
179
|
+
.chatModel('openai/gpt-oss-120b')
|
|
180
|
+
.reply('How LLMs work');
|
|
181
|
+
console.log(output.text.original);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
main().catch((error) => {
|
|
185
|
+
console.error(error);
|
|
186
|
+
});
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
> To get access to cloud inference, please contact us via [Discord](https://discord.gg/gUhyn6Rb7x) or [email](mailto:contact@getmirai.co).
|
|
190
|
+
|
|
167
191
|
## License
|
|
168
192
|
|
|
169
193
|
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
|
package/package.json
CHANGED
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.1.
|
|
1
|
+
export const VERSION = '0.1.42';
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.1.
|
|
1
|
+
export declare const VERSION = "0.1.42";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.1.
|
|
1
|
+
export declare const VERSION = "0.1.42";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.1.
|
|
1
|
+
export const VERSION = '0.1.42';
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|