(params, toolCall)
| 81757 | if ("$parseRaw" in params.response_format) { |
| 81758 | const response_format = params.response_format; |
| 81759 | return response_format.$parseRaw(content); |
| 81760 | } |
| 81761 | return JSON.parse(content); |
| 81762 | } |
| 81763 | return null; |
| 81764 | } |
| 81765 | function parseToolCall(params, toolCall) { |
| 81766 | const inputTool = params.tools?.find((inputTool2) => inputTool2.function?.name === toolCall.function.name); |
| 81767 | return { |
| 81768 | ...toolCall, |
| 81769 | function: { |
| 81770 | ...toolCall.function, |
| 81771 | parsed_arguments: isAutoParsableTool(inputTool) ? inputTool.$parseRaw(toolCall.function.arguments) : inputTool?.function.strict ? JSON.parse(toolCall.function.arguments) : null |
no test coverage detected
searching dependent graphs…