Skip to content

AnthropicStopReason

Namespace: Vercel.AI.Anthropic

public static class AnthropicStopReason

Maps an Anthropic stop_reason onto the SDK finish reason.

Inheritance: object

View source

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

View source

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product