AnthropicResponse
Namespace: Vercel.AI.Anthropic
public static class AnthropicResponseMaps an Anthropic Messages JSON body onto a generate result.
Inheritance: object
Methods
Section titled “Methods”Parse(string, AnthropicParseContext, IReadOnlyDictionary<string, string>?)
Section titled “Parse(string, AnthropicParseContext, IReadOnlyDictionary<string, string>?)”public static LanguageModelGenerateResult Parse(string json, AnthropicParseContext context, IReadOnlyDictionary<string, string>? headers = null)Parses a Messages response body.
Parameters
| Name | Type | Description |
|---|---|---|
json |
string | |
context |
AnthropicParseContext | |
headers |
IReadOnlyDictionary<string, string> |
Returns: LanguageModelGenerateResult
Parse(JsonElement, AnthropicParseContext, string?, IReadOnlyDictionary<string, string>?)
Section titled “Parse(JsonElement, AnthropicParseContext, string?, IReadOnlyDictionary<string, string>?)”public static LanguageModelGenerateResult Parse(JsonElement root, AnthropicParseContext context, string? raw = null, IReadOnlyDictionary<string, string>? headers = null)Parses a Messages response object.
Parameters
| Name | Type | Description |
|---|---|---|
root |
JsonElement | |
context |
AnthropicParseContext | |
raw |
string | |
headers |
IReadOnlyDictionary<string, string> |
Returns: LanguageModelGenerateResult
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product