ai 2.2.8 → 2.2.9

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 CHANGED
@@ -5,7 +5,7 @@ The Vercel AI SDK is **a library for building AI-powered streaming text and chat
5
5
  ## Features
6
6
 
7
7
  - [SWR](https://swr.vercel.app)-powered React, Svelte, Vue and Solid helpers for streaming text responses and building chat and completion UIs
8
- - First-class support for [LangChain](https://js.langchain.com/docs) and [OpenAI](https://openai.com), [Anthropic](https://www.anthropic.com), [Cohere](https://cohere.com), [Hugging Face](https://huggingface.co), and [Replicate](https://replicate.com)
8
+ - First-class support for [LangChain](https://js.langchain.com/docs) and [OpenAI](https://openai.com), [Anthropic](https://www.anthropic.com), [Cohere](https://cohere.com), [Hugging Face](https://huggingface.co), [Fireworks](https://app.fireworks.ai) and [Replicate](https://replicate.com)
9
9
  - Node.js, Serverless, and [Edge Runtime](https://edge-runtime.vercel.app/) support
10
10
  - Callbacks for saving completed streaming responses to a database (in the same request)
11
11
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai",
3
- "version": "2.2.8",
3
+ "version": "2.2.9",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -61,7 +61,7 @@
61
61
  "dependencies": {
62
62
  "eventsource-parser": "1.0.0",
63
63
  "nanoid": "3.3.6",
64
- "openai": "4.0.0",
64
+ "openai": "4.2.0",
65
65
  "solid-swr-store": "0.10.7",
66
66
  "sswr": "2.0.0",
67
67
  "swr": "2.2.0",
package/vue/dist/index.js CHANGED
@@ -134,7 +134,8 @@ function useChat({
134
134
  role,
135
135
  content
136
136
  })),
137
- ...body,
137
+ ...(0, import_vue.unref)(body),
138
+ // Use unref to unwrap the ref value
138
139
  ...options == null ? void 0 : options.body
139
140
  }),
140
141
  headers: {
@@ -1,6 +1,6 @@
1
1
  // vue/use-chat.ts
2
2
  import swrv from "swrv";
3
- import { ref } from "vue";
3
+ import { ref, unref } from "vue";
4
4
 
5
5
  // shared/utils.ts
6
6
  import { customAlphabet } from "nanoid/non-secure";
@@ -97,7 +97,8 @@ function useChat({
97
97
  role,
98
98
  content
99
99
  })),
100
- ...body,
100
+ ...unref(body),
101
+ // Use unref to unwrap the ref value
101
102
  ...options == null ? void 0 : options.body
102
103
  }),
103
104
  headers: {