ai 5.0.5 → 5.0.6

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # ai
2
2
 
3
+ ## 5.0.6
4
+
5
+ ### Patch Changes
6
+
7
+ - d983eee: feat(ai): allow passing model string for embeddings
8
+
3
9
  ## 5.0.5
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -142,7 +142,7 @@ type TelemetrySettings = {
142
142
  /**
143
143
  Embedding model that is used by the AI SDK Core functions.
144
144
  */
145
- type EmbeddingModel<VALUE> = EmbeddingModelV2<VALUE>;
145
+ type EmbeddingModel<VALUE = string> = string | EmbeddingModelV2<VALUE>;
146
146
  /**
147
147
  Embedding.
148
148
  */
@@ -2114,7 +2114,7 @@ Embed a value using an embedding model. The type of the value is defined by the
2114
2114
 
2115
2115
  @returns A result object that contains the embedding, the value, and additional information.
2116
2116
  */
2117
- declare function embed<VALUE>({ model, value, providerOptions, maxRetries: maxRetriesArg, abortSignal, headers, experimental_telemetry: telemetry, }: {
2117
+ declare function embed<VALUE = string>({ model: modelArg, value, providerOptions, maxRetries: maxRetriesArg, abortSignal, headers, experimental_telemetry: telemetry, }: {
2118
2118
  /**
2119
2119
  The embedding model to use.
2120
2120
  */
@@ -2202,7 +2202,7 @@ has a limit on how many embeddings can be generated in a single call.
2202
2202
 
2203
2203
  @returns A result object that contains the embeddings, the value, and additional information.
2204
2204
  */
2205
- declare function embedMany<VALUE>({ model, values, maxParallelCalls, maxRetries: maxRetriesArg, abortSignal, headers, providerOptions, experimental_telemetry: telemetry, }: {
2205
+ declare function embedMany<VALUE = string>({ model: modelArg, values, maxParallelCalls, maxRetries: maxRetriesArg, abortSignal, headers, providerOptions, experimental_telemetry: telemetry, }: {
2206
2206
  /**
2207
2207
  The embedding model to use.
2208
2208
  */
package/dist/index.d.ts CHANGED
@@ -142,7 +142,7 @@ type TelemetrySettings = {
142
142
  /**
143
143
  Embedding model that is used by the AI SDK Core functions.
144
144
  */
145
- type EmbeddingModel<VALUE> = EmbeddingModelV2<VALUE>;
145
+ type EmbeddingModel<VALUE = string> = string | EmbeddingModelV2<VALUE>;
146
146
  /**
147
147
  Embedding.
148
148
  */
@@ -2114,7 +2114,7 @@ Embed a value using an embedding model. The type of the value is defined by the
2114
2114
 
2115
2115
  @returns A result object that contains the embedding, the value, and additional information.
2116
2116
  */
2117
- declare function embed<VALUE>({ model, value, providerOptions, maxRetries: maxRetriesArg, abortSignal, headers, experimental_telemetry: telemetry, }: {
2117
+ declare function embed<VALUE = string>({ model: modelArg, value, providerOptions, maxRetries: maxRetriesArg, abortSignal, headers, experimental_telemetry: telemetry, }: {
2118
2118
  /**
2119
2119
  The embedding model to use.
2120
2120
  */
@@ -2202,7 +2202,7 @@ has a limit on how many embeddings can be generated in a single call.
2202
2202
 
2203
2203
  @returns A result object that contains the embeddings, the value, and additional information.
2204
2204
  */
2205
- declare function embedMany<VALUE>({ model, values, maxParallelCalls, maxRetries: maxRetriesArg, abortSignal, headers, providerOptions, experimental_telemetry: telemetry, }: {
2205
+ declare function embedMany<VALUE = string>({ model: modelArg, values, maxParallelCalls, maxRetries: maxRetriesArg, abortSignal, headers, providerOptions, experimental_telemetry: telemetry, }: {
2206
2206
  /**
2207
2207
  The embedding model to use.
2208
2208
  */