@ai-sdk/llamaindex 3.0.152 → 3.0.154

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/CHANGELOG.md +17 -0
  2. package/README.md +34 -0
  3. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @ai-sdk/llamaindex
2
2
 
3
+ ## 3.0.154
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [47236dd]
8
+ - Updated dependencies [c8e8866]
9
+ - Updated dependencies [1cf95c6]
10
+ - ai@7.0.154
11
+
12
+ ## 3.0.153
13
+
14
+ ### Patch Changes
15
+
16
+ - e729d58: chore(docs): update `README.md` for consistent format and to avoid duplication
17
+ - Updated dependencies [5475347]
18
+ - ai@7.0.153
19
+
3
20
  ## 3.0.152
4
21
 
5
22
  ### Patch Changes
package/README.md CHANGED
@@ -1,3 +1,37 @@
1
1
  # AI SDK - LlamaIndex Adapter
2
2
 
3
3
  This package contains a LlamaIndex adapter for the AI SDK.
4
+
5
+ ## Setup
6
+
7
+ ```bash
8
+ npm i ai @ai-sdk/llamaindex llamaindex
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```tsx
14
+ import { OpenAI, SimpleChatEngine } from 'llamaindex';
15
+ import { toUIMessageStream } from '@ai-sdk/llamaindex';
16
+ import { createUIMessageStreamResponse } from 'ai';
17
+
18
+ export const maxDuration = 60;
19
+
20
+ export async function POST(req: Request) {
21
+ const { prompt } = await req.json();
22
+
23
+ const llm = new OpenAI({ model: 'gpt-6-astra' });
24
+ const chatEngine = new SimpleChatEngine({ llm });
25
+
26
+ const stream = await chatEngine.chat({
27
+ message: prompt,
28
+ stream: true,
29
+ });
30
+
31
+ return createUIMessageStreamResponse({
32
+ stream: toUIMessageStream(stream),
33
+ });
34
+ }
35
+ ```
36
+
37
+ See the [LlamaIndex documentation](https://ai-sdk.dev/providers/adapters/llamaindex) for more information.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/llamaindex",
3
- "version": "3.0.152",
3
+ "version": "3.0.154",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "sideEffects": false,
@@ -25,7 +25,7 @@
25
25
  }
26
26
  },
27
27
  "dependencies": {
28
- "ai": "7.0.152"
28
+ "ai": "7.0.154"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/node": "22.19.19",