@ai-sdk/anthropic
Advanced tools
Comparing version 0.0.19 to 0.0.20
@@ -274,3 +274,4 @@ "use strict"; | ||
), | ||
abortSignal: options.abortSignal | ||
abortSignal: options.abortSignal, | ||
fetch: this.config.fetch | ||
}); | ||
@@ -324,3 +325,4 @@ const { messages: rawPrompt, ...rawSettings } = args; | ||
), | ||
abortSignal: options.abortSignal | ||
abortSignal: options.abortSignal, | ||
fetch: this.config.fetch | ||
}); | ||
@@ -611,3 +613,4 @@ const { messages: rawPrompt, ...rawSettings } = args; | ||
baseURL, | ||
headers: getHeaders | ||
headers: getHeaders, | ||
fetch: options.fetch | ||
}); | ||
@@ -622,2 +625,3 @@ const provider = function(modelId, settings) { | ||
}; | ||
provider.languageModel = createChatModel; | ||
provider.chat = createChatModel; | ||
@@ -624,0 +628,0 @@ provider.messages = createChatModel; |
@@ -18,2 +18,3 @@ import { LanguageModelV1 } from '@ai-sdk/provider'; | ||
headers: () => Record<string, string | undefined>; | ||
fetch?: typeof fetch; | ||
}; | ||
@@ -41,2 +42,6 @@ declare class AnthropicMessagesLanguageModel implements LanguageModelV1 { | ||
*/ | ||
languageModel(modelId: AnthropicMessagesModelId, settings?: AnthropicMessagesSettings): AnthropicMessagesLanguageModel; | ||
/** | ||
Creates a model for text generation. | ||
*/ | ||
chat(modelId: AnthropicMessagesModelId, settings?: AnthropicMessagesSettings): AnthropicMessagesLanguageModel; | ||
@@ -67,2 +72,7 @@ /** | ||
headers?: Record<string, string>; | ||
/** | ||
Custom fetch implementation. You can use it as a middleware to intercept requests, | ||
or to provide a custom fetch implementation for e.g. testing. | ||
*/ | ||
fetch?: typeof fetch; | ||
generateId?: () => string; | ||
@@ -69,0 +79,0 @@ } |
@@ -274,3 +274,4 @@ "use strict"; | ||
), | ||
abortSignal: options.abortSignal | ||
abortSignal: options.abortSignal, | ||
fetch: this.config.fetch | ||
}); | ||
@@ -324,3 +325,4 @@ const { messages: rawPrompt, ...rawSettings } = args; | ||
), | ||
abortSignal: options.abortSignal | ||
abortSignal: options.abortSignal, | ||
fetch: this.config.fetch | ||
}); | ||
@@ -611,3 +613,4 @@ const { messages: rawPrompt, ...rawSettings } = args; | ||
baseURL, | ||
headers: getHeaders | ||
headers: getHeaders, | ||
fetch: options.fetch | ||
}); | ||
@@ -622,2 +625,3 @@ const provider = function(modelId, settings) { | ||
}; | ||
provider.languageModel = createChatModel; | ||
provider.chat = createChatModel; | ||
@@ -624,0 +628,0 @@ provider.messages = createChatModel; |
{ | ||
"name": "@ai-sdk/anthropic", | ||
"version": "0.0.19", | ||
"version": "0.0.20", | ||
"license": "Apache-2.0", | ||
@@ -22,3 +22,3 @@ "sideEffects": false, | ||
"@ai-sdk/provider": "0.0.10", | ||
"@ai-sdk/provider-utils": "0.0.13" | ||
"@ai-sdk/provider-utils": "0.0.14" | ||
}, | ||
@@ -25,0 +25,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
140997
1952
+ Added@ai-sdk/provider-utils@0.0.14(transitive)
- Removed@ai-sdk/provider-utils@0.0.13(transitive)