AnthropicPrompt
Namespace: Vercel.AI.Anthropic
public static class AnthropicPromptConverts SDK prompt messages into Anthropic message blocks.
Inheritance: object
Methods
Section titled “Methods”Convert(IReadOnlyList<ModelMessage>, bool, AnthropicCacheControlValidator?, IReadOnlyDictionary<string, string>?, IReadOnlyDictionary<string, string>?, AnthropicMediaPartConverter?)
Section titled “Convert(IReadOnlyList<ModelMessage>, bool, AnthropicCacheControlValidator?, IReadOnlyDictionary<string, string>?, IReadOnlyDictionary<string, string>?, AnthropicMediaPartConverter?)”public static AnthropicPromptResult Convert(IReadOnlyList<ModelMessage> prompt, bool sendReasoning = true, AnthropicCacheControlValidator? cacheControl = null, IReadOnlyDictionary<string, string>? providerToolNames = null, IReadOnlyDictionary<string, string>? toolsetNames = null, AnthropicMediaPartConverter? convertMediaPart = null)Converts SDK prompt messages. Maps to convertToAnthropicPrompt.
Parameters
| Name | Type | Description |
|---|---|---|
prompt |
IReadOnlyList<ModelMessage> | |
sendReasoning |
bool | |
cacheControl |
AnthropicCacheControlValidator | |
providerToolNames |
IReadOnlyDictionary<string, string> | |
toolsetNames |
IReadOnlyDictionary<string, string> | |
convertMediaPart |
AnthropicMediaPartConverter |
Returns: AnthropicPromptResult
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product