UNPKG

ai

Version:

AI SDK by Vercel - build apps like ChatGPT, Claude, Gemini, and more with a single interface for any model using the Vercel AI Gateway or go direct to OpenAI, Anthropic, Google, or any other model provider.

8 lines (6 loc) 226 B
import type { FinishReason } from '../types/language-model'; export function isToolExecutionAllowedFinishReason( finishReason: FinishReason, ): boolean { return finishReason === 'stop' || finishReason === 'tool-calls'; }