AnthropicStopReason
Namespace: Vercel.AI.Anthropic
public static class AnthropicStopReasonMaps an Anthropic stop_reason onto the SDK finish reason.
Inheritance: object
Methods
Section titled “Methods”Map(string?, bool)
Section titled “Map(string?, bool)”public static FinishReason Map(string? finishReason, bool isJsonResponseFromTool = false)Maps a stop reason. tool_use is Stop when the JSON response tool produced the payload.
Parameters
| Name | Type | Description |
|---|---|---|
finishReason |
string | |
isJsonResponseFromTool |
bool |
Returns: FinishReason
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product