AnthropicJsonSchema
Namespace: Vercel.AI.Anthropic
public static class AnthropicJsonSchemaRelaxes a JSON Schema so it can be sent as Anthropic output_config.format.schema.
The caller’s original schema is not modified.
Inheritance: object
Methods
Section titled “Methods”Sanitize(JsonElement)
Section titled “Sanitize(JsonElement)”public static JsonNode Sanitize(JsonElement schema)Returns a schema Anthropic’s constrained decoder accepts.
Parameters
| Name | Type | Description |
|---|---|---|
schema |
JsonElement |
Returns: JsonNode
Sanitize(JsonNode)
Section titled “Sanitize(JsonNode)”public static JsonNode Sanitize(JsonNode schema)Returns a schema Anthropic’s constrained decoder accepts.
Parameters
| Name | Type | Description |
|---|---|---|
schema |
JsonNode |
Returns: JsonNode
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product