@lunora/ai 1.0.0-alpha.1 → 1.0.0-alpha.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.
- package/README.md +3 -3
- package/__assets__/package-og.svg +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
|
|
35
35
|
---
|
|
36
36
|
|
|
37
|
-
A small AI helper for Lunora, built on the [Vercel AI SDK](https://ai-sdk.dev) v6 core and Cloudflare's official [`workers-ai-provider`](https://github.com/cloudflare/ai). Call `generateText`/`streamText`/`generateObject`/`embed`/`tool` from any function handler. **Cloudflare Workers AI is the zero-config default**, but the helper is provider-agnostic: every call takes either a Workers AI model id (a string) or any AI SDK model object — `@ai-sdk/openai`, `@ai-sdk/anthropic`, OpenRouter, … — so apps are never locked to Workers AI. Pair `embed` with [`@lunora/vectors`](https://www.npmjs.com/package/@lunora/
|
|
37
|
+
A small AI helper for Lunora, built on the [Vercel AI SDK](https://ai-sdk.dev) v6 core and Cloudflare's official [`workers-ai-provider`](https://github.com/cloudflare/ai). Call `generateText`/`streamText`/`generateObject`/`embed`/`tool` from any function handler. **Cloudflare Workers AI is the zero-config default**, but the helper is provider-agnostic: every call takes either a Workers AI model id (a string) or any AI SDK model object — `@ai-sdk/openai`, `@ai-sdk/anthropic`, OpenRouter, … — so apps are never locked to Workers AI. Pair `embed` with [`@lunora/bindings/vectors`](https://www.npmjs.com/package/@lunora/bindings) for RAG.
|
|
38
38
|
|
|
39
39
|
Part of the [Lunora](https://github.com/anolilab/lunora) framework — a type-safe, real-time backend on Cloudflare Workers + Durable Objects with a Vite-first DX.
|
|
40
40
|
|
|
@@ -82,7 +82,7 @@ const result = streamText({ model: openai("gpt-5"), messages });
|
|
|
82
82
|
```
|
|
83
83
|
|
|
84
84
|
```ts
|
|
85
|
-
// RAG: embed via ctx.ai, store/search with @lunora/vectors (ctx.vectors)
|
|
85
|
+
// RAG: embed via ctx.ai, store/search with @lunora/bindings/vectors (ctx.vectors)
|
|
86
86
|
import { embed } from "@lunora/ai";
|
|
87
87
|
|
|
88
88
|
const { embedding } = await embed({ model: ctx.ai.embeddingModel("@cf/baai/bge-base-en-v1.5"), value: text });
|
|
@@ -96,7 +96,7 @@ Outside an action — in the worker entry, a Durable Object, or a queue/schedule
|
|
|
96
96
|
## Related
|
|
97
97
|
|
|
98
98
|
- [`@lunora/server`](https://www.npmjs.com/package/@lunora/server) — function primitives whose `ctx.ai` this package backs.
|
|
99
|
-
- [`@lunora/vectors`](https://www.npmjs.com/package/@lunora/
|
|
99
|
+
- [`@lunora/bindings/vectors`](https://www.npmjs.com/package/@lunora/bindings) — pair `embed` with Vectorize for RAG.
|
|
100
100
|
- [`@lunora/vite`](https://www.npmjs.com/package/@lunora/vite) — infers and reconciles the `AI` binding into `wrangler.jsonc`.
|
|
101
101
|
|
|
102
102
|
## Supported Node.js Versions
|