@ai-sdk-tool/parser 4.1.0 → 4.1.1
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/dist/{chunk-O6NWVXQD.js → chunk-722D5BGD.js} +1096 -772
- package/dist/chunk-722D5BGD.js.map +1 -0
- package/dist/{chunk-MHZC45AC.js → chunk-D4YULTAO.js} +7 -7
- package/dist/chunk-D4YULTAO.js.map +1 -0
- package/dist/community.cjs +2570 -2246
- package/dist/community.cjs.map +1 -1
- package/dist/community.js +2 -2
- package/dist/index.cjs +2578 -2251
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -40
- package/dist/index.d.ts +9 -40
- package/dist/index.js +8 -2
- package/dist/rxml.cjs +6 -6
- package/dist/rxml.cjs.map +1 -1
- package/dist/rxml.js +1 -1
- package/package.json +5 -5
- package/dist/chunk-MHZC45AC.js.map +0 -1
- package/dist/chunk-O6NWVXQD.js.map +0 -1
package/README.md
CHANGED
|
@@ -37,7 +37,7 @@ Note: there is no separate formal EOL announcement in releases/changelog for `v1
|
|
|
37
37
|
|
|
38
38
|
```ts
|
|
39
39
|
import { createOpenAICompatible } from "@ai-sdk/openai-compatible";
|
|
40
|
-
import {
|
|
40
|
+
import { morphXmlToolMiddleware } from "@ai-sdk-tool/parser";
|
|
41
41
|
import { stepCountIs, streamText, wrapLanguageModel } from "ai";
|
|
42
42
|
import { z } from "zod";
|
|
43
43
|
|
|
@@ -45,12 +45,12 @@ const model = createOpenAICompatible({
|
|
|
45
45
|
name: "openrouter",
|
|
46
46
|
apiKey: process.env.OPENROUTER_API_KEY,
|
|
47
47
|
baseURL: "https://openrouter.ai/api/v1",
|
|
48
|
-
})("
|
|
48
|
+
})("arcee-ai/trinity-large-preview:free");
|
|
49
49
|
|
|
50
50
|
const result = streamText({
|
|
51
51
|
model: wrapLanguageModel({
|
|
52
52
|
model,
|
|
53
|
-
middleware:
|
|
53
|
+
middleware: morphXmlToolMiddleware,
|
|
54
54
|
}),
|
|
55
55
|
stopWhen: stepCountIs(4),
|
|
56
56
|
prompt: "What is the weather in Seoul?",
|