@ai-sdk/provider
Advanced tools
Comparing version 1.0.7 to 1.0.8
# @ai-sdk/provider | ||
## 1.0.8 | ||
### Patch Changes | ||
- 2761f06: fix (ai/provider): publish with LanguageModelV1Source | ||
## 1.0.7 | ||
@@ -4,0 +10,0 @@ |
@@ -444,2 +444,49 @@ import { JSONSchema7 } from 'json-schema'; | ||
/** | ||
* Additional provider-specific metadata. They are passed through | ||
* to the provider from the AI SDK and enable provider-specific | ||
* functionality that can be fully encapsulated in the provider. | ||
* | ||
* This enables us to quickly ship provider-specific functionality | ||
* without affecting the core AI SDK. | ||
* | ||
* The outer record is keyed by the provider name, and the inner | ||
* record is keyed by the provider-specific metadata key. | ||
* | ||
* ```ts | ||
* { | ||
* "anthropic": { | ||
* "cacheControl": { "type": "ephemeral" } | ||
* } | ||
* } | ||
* ``` | ||
*/ | ||
type LanguageModelV1ProviderMetadata = Record<string, Record<string, JSONValue>>; | ||
/** | ||
* A source that has been used as input to generate the response. | ||
*/ | ||
type LanguageModelV1Source = { | ||
/** | ||
* A URL source. This is return by web search RAG models. | ||
*/ | ||
sourceType: 'url'; | ||
/** | ||
* The ID of the source. | ||
*/ | ||
id: string; | ||
/** | ||
* The URL of the source. | ||
*/ | ||
url: string; | ||
/** | ||
* The title of the source. | ||
*/ | ||
title?: string; | ||
/** | ||
* Additional provider metadata for the source. | ||
*/ | ||
providerMetadata?: LanguageModelV1ProviderMetadata; | ||
}; | ||
type LanguageModelV1CallSettings = { | ||
@@ -551,23 +598,2 @@ /** | ||
/** | ||
* Additional provider-specific metadata. They are passed through | ||
* to the provider from the AI SDK and enable provider-specific | ||
* functionality that can be fully encapsulated in the provider. | ||
* | ||
* This enables us to quickly ship provider-specific functionality | ||
* without affecting the core AI SDK. | ||
* | ||
* The outer record is keyed by the provider name, and the inner | ||
* record is keyed by the provider-specific metadata key. | ||
* | ||
* ```ts | ||
* { | ||
* "anthropic": { | ||
* "cacheControl": { "type": "ephemeral" } | ||
* } | ||
* } | ||
* ``` | ||
*/ | ||
type LanguageModelV1ProviderMetadata = Record<string, Record<string, JSONValue>>; | ||
/** | ||
A prompt is a list of messages. | ||
@@ -1037,2 +1063,6 @@ | ||
/** | ||
Sources that have been used as input to generate the response. | ||
*/ | ||
sources?: LanguageModelV1Source[]; | ||
/** | ||
Logprobs for the completion. | ||
@@ -1101,2 +1131,5 @@ `undefined` if the mode does not support logprobs or if was not enabled | ||
textDelta: string; | ||
} | { | ||
type: 'source'; | ||
source: LanguageModelV1Source; | ||
} | ({ | ||
@@ -1171,2 +1204,2 @@ type: 'tool-call'; | ||
export { AISDKError, APICallError, type EmbeddingModelV1, type EmbeddingModelV1Embedding, EmptyResponseBodyError, type ImageModelV1, type ImageModelV1CallOptions, type ImageModelV1CallWarning, InvalidArgumentError, InvalidPromptError, InvalidResponseDataError, type JSONArray, type JSONObject, JSONParseError, type JSONValue, type LanguageModelV1, type LanguageModelV1CallOptions, type LanguageModelV1CallWarning, type LanguageModelV1FilePart, type LanguageModelV1FinishReason, type LanguageModelV1FunctionTool, type LanguageModelV1FunctionToolCall, type LanguageModelV1ImagePart, type LanguageModelV1LogProbs, type LanguageModelV1Message, type LanguageModelV1ObjectGenerationMode, type LanguageModelV1Prompt, type LanguageModelV1ProviderDefinedTool, type LanguageModelV1ProviderMetadata, type LanguageModelV1StreamPart, type LanguageModelV1TextPart, type LanguageModelV1ToolCallPart, type LanguageModelV1ToolChoice, type LanguageModelV1ToolResultPart, LoadAPIKeyError, LoadSettingError, NoContentGeneratedError, NoSuchModelError, type ProviderV1, TooManyEmbeddingValuesForCallError, TypeValidationError, UnsupportedFunctionalityError, getErrorMessage, isJSONArray, isJSONObject, isJSONValue }; | ||
export { AISDKError, APICallError, type EmbeddingModelV1, type EmbeddingModelV1Embedding, EmptyResponseBodyError, type ImageModelV1, type ImageModelV1CallOptions, type ImageModelV1CallWarning, InvalidArgumentError, InvalidPromptError, InvalidResponseDataError, type JSONArray, type JSONObject, JSONParseError, type JSONValue, type LanguageModelV1, type LanguageModelV1CallOptions, type LanguageModelV1CallWarning, type LanguageModelV1FilePart, type LanguageModelV1FinishReason, type LanguageModelV1FunctionTool, type LanguageModelV1FunctionToolCall, type LanguageModelV1ImagePart, type LanguageModelV1LogProbs, type LanguageModelV1Message, type LanguageModelV1ObjectGenerationMode, type LanguageModelV1Prompt, type LanguageModelV1ProviderDefinedTool, type LanguageModelV1ProviderMetadata, type LanguageModelV1Source, type LanguageModelV1StreamPart, type LanguageModelV1TextPart, type LanguageModelV1ToolCallPart, type LanguageModelV1ToolChoice, type LanguageModelV1ToolResultPart, LoadAPIKeyError, LoadSettingError, NoContentGeneratedError, NoSuchModelError, type ProviderV1, TooManyEmbeddingValuesForCallError, TypeValidationError, UnsupportedFunctionalityError, getErrorMessage, isJSONArray, isJSONObject, isJSONValue }; |
{ | ||
"name": "@ai-sdk/provider", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"license": "Apache-2.0", | ||
@@ -5,0 +5,0 @@ "sideEffects": false, |
Sorry, the diff of this file is not supported yet
149438
1933
2