MCPcopy Index your code
hub / github.com/simstudioai/sim / checkForForcedToolUsage

Function checkForForcedToolUsage

apps/sim/providers/xai/utils.ts:48–55  ·  view source on GitHub ↗
(
  response: any,
  toolChoice: string | { type: string; function?: { name: string }; name?: string; any?: any },
  forcedTools: string[],
  usedForcedTools: string[]
)

Source from the content-addressed store, hash-verified

46 * Uses the shared OpenAI-compatible forced tool usage helper.
47 */
48export function checkForForcedToolUsage(
49 response: any,
50 toolChoice: string | { type: string; function?: { name: string }; name?: string; any?: any },
51 forcedTools: string[],
52 usedForcedTools: string[]
53): { hasUsedForcedTool: boolean; usedForcedTools: string[] } {
54 return checkForForcedToolUsageOpenAI(response, toolChoice, 'xAI', forcedTools, usedForcedTools)
55}

Callers 1

index.tsFile · 0.90

Calls 1

Tested by

no test coverage detected