(
response: OpenAI.Chat.Completions.ChatCompletion,
toolChoice: string | { type: string; function?: { name: string }; name?: string },
_logger: Logger,
forcedTools: string[],
usedForcedTools: string[]
)
| 21 | * Uses the shared OpenAI-compatible forced tool usage helper. |
| 22 | */ |
| 23 | export function checkForForcedToolUsage( |
| 24 | response: OpenAI.Chat.Completions.ChatCompletion, |
| 25 | toolChoice: string | { type: string; function?: { name: string }; name?: string }, |
| 26 | _logger: Logger, |
| 27 | forcedTools: string[], |
| 28 | usedForcedTools: string[] |
| 29 | ): { hasUsedForcedTool: boolean; usedForcedTools: string[] } { |
| 30 | return checkForForcedToolUsageOpenAI( |
| 31 | response, |
| 32 | toolChoice, |
| 33 | 'Azure OpenAI', |
| 34 | forcedTools, |
| 35 | usedForcedTools, |
| 36 | _logger |
| 37 | ) |
| 38 | } |
| 39 | |
| 40 | /** |
| 41 | * Determines if an Azure OpenAI endpoint URL is for the chat completions API. |
no test coverage detected