ai 3.0.22 → 3.0.24
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/dist/index.d.mts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/react/dist/index.d.mts +6 -2
- package/react/dist/index.d.ts +6 -2
- package/react/dist/index.js +104 -21
- package/react/dist/index.js.map +1 -1
- package/react/dist/index.mjs +104 -21
- package/react/dist/index.mjs.map +1 -1
- package/rsc/dist/index.d.ts +35 -3
- package/rsc/dist/rsc-server.d.mts +35 -3
- package/rsc/dist/rsc-server.mjs +2 -2
- package/rsc/dist/rsc-server.mjs.map +1 -1
- package/solid/dist/index.d.mts +6 -2
- package/solid/dist/index.d.ts +6 -2
- package/solid/dist/index.js +102 -20
- package/solid/dist/index.js.map +1 -1
- package/solid/dist/index.mjs +102 -20
- package/solid/dist/index.mjs.map +1 -1
- package/svelte/dist/index.d.mts +6 -2
- package/svelte/dist/index.d.ts +6 -2
- package/svelte/dist/index.js +104 -21
- package/svelte/dist/index.js.map +1 -1
- package/svelte/dist/index.mjs +104 -21
- package/svelte/dist/index.mjs.map +1 -1
- package/vue/dist/index.d.mts +6 -2
- package/vue/dist/index.d.ts +6 -2
- package/vue/dist/index.js +102 -20
- package/vue/dist/index.js.map +1 -1
- package/vue/dist/index.mjs +102 -20
- package/vue/dist/index.mjs.map +1 -1
package/dist/index.d.mts
CHANGED
@@ -895,6 +895,8 @@ type UseChatOptions = {
|
|
895
895
|
* handle the extra fields before forwarding the request to the AI service.
|
896
896
|
*/
|
897
897
|
sendExtraMessageFields?: boolean;
|
898
|
+
/** Stream mode (default to "stream-data") */
|
899
|
+
streamMode?: 'stream-data' | 'text';
|
898
900
|
};
|
899
901
|
type UseCompletionOptions = {
|
900
902
|
/**
|
@@ -951,6 +953,8 @@ type UseCompletionOptions = {
|
|
951
953
|
* ```
|
952
954
|
*/
|
953
955
|
body?: object;
|
956
|
+
/** Stream mode (default to "stream-data") */
|
957
|
+
streamMode?: 'stream-data' | 'text';
|
954
958
|
};
|
955
959
|
type JSONValue = null | string | number | boolean | {
|
956
960
|
[x: string]: JSONValue;
|
package/dist/index.d.ts
CHANGED
@@ -895,6 +895,8 @@ type UseChatOptions = {
|
|
895
895
|
* handle the extra fields before forwarding the request to the AI service.
|
896
896
|
*/
|
897
897
|
sendExtraMessageFields?: boolean;
|
898
|
+
/** Stream mode (default to "stream-data") */
|
899
|
+
streamMode?: 'stream-data' | 'text';
|
898
900
|
};
|
899
901
|
type UseCompletionOptions = {
|
900
902
|
/**
|
@@ -951,6 +953,8 @@ type UseCompletionOptions = {
|
|
951
953
|
* ```
|
952
954
|
*/
|
953
955
|
body?: object;
|
956
|
+
/** Stream mode (default to "stream-data") */
|
957
|
+
streamMode?: 'stream-data' | 'text';
|
954
958
|
};
|
955
959
|
type JSONValue = null | string | number | boolean | {
|
956
960
|
[x: string]: JSONValue;
|
package/dist/index.js
CHANGED
@@ -362,8 +362,8 @@ function prepareCallSettings({
|
|
362
362
|
maxTokens,
|
363
363
|
temperature: temperature != null ? temperature : 0,
|
364
364
|
topP,
|
365
|
-
presencePenalty
|
366
|
-
frequencyPenalty
|
365
|
+
presencePenalty,
|
366
|
+
frequencyPenalty,
|
367
367
|
seed,
|
368
368
|
maxRetries: maxRetries != null ? maxRetries : 2
|
369
369
|
};
|