GoogleFinishReason
Namespace: Vercel.AI.Google
public static class GoogleFinishReasonMaps Gemini finish reasons onto the shared finish-reason enum.
Inheritance: object
Methods
Section titled “Methods”IsConfirmedPromptBlock(string?)
Section titled “IsConfirmedPromptBlock(string?)”public static bool IsConfirmedPromptBlock(string? blockReason)A prompt block is terminal when the reason is present and is not an unspecified placeholder.
Parameters
| Name | Type | Description |
|---|---|---|
blockReason |
string |
Returns: bool
Map(string?, bool)
Section titled “Map(string?, bool)”public static FinishReason Map(string? finishReason, bool hasToolCalls)Maps <code class=“paramref”>finishReason</code>. STOP becomes ToolCalls when the response contains a client tool call.
Parameters
| Name | Type | Description |
|---|---|---|
finishReason |
string | |
hasToolCalls |
bool |
Returns: FinishReason
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product