(tool: ProviderToolConfig)
| 30 | * Adapts a tool config to the OpenAI Chat Completions function-wrapped shape. |
| 31 | */ |
| 32 | export function adaptOpenAIChatToolSchema(tool: ProviderToolConfig): OpenAIChatToolSchema { |
| 33 | return { |
| 34 | type: 'function', |
| 35 | function: { |
| 36 | name: tool.id, |
| 37 | description: tool.description, |
| 38 | parameters: tool.parameters, |
| 39 | }, |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | /** |
| 44 | * Adapts a tool config to the Anthropic Messages `input_schema` shape. |
no outgoing calls
no test coverage detected