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 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: presencePenalty != null ? presencePenalty : 0,
366
- frequencyPenalty: frequencyPenalty != null ? frequencyPenalty : 0,
365
+ presencePenalty,
366
+ frequencyPenalty,
367
367
  seed,
368
368
  maxRetries: maxRetries != null ? maxRetries : 2
369
369
  };