Open History to see the last commit
1import { codeInterpreterTool as baseCodeInterpreterTool } from '@tanstack/openai-base'
2import type { ProviderTool } from '@tanstack/ai'
3import type { CodeInterpreterToolConfig } from '@tanstack/openai-base'
4
5export {
6 type CodeInterpreterToolConfig,
7 convertCodeInterpreterToolToAdapterFormat,
8} from '@tanstack/openai-base'
9
10export type OpenAICodeInterpreterTool = ProviderTool<
11 'openai',
12 'code_interpreter'
13>
14
15/**
16 * Creates a standard Tool from CodeInterpreterToolConfig parameters, branded as an
17 * OpenAI provider tool. Delegates construction to the base factory and brands
18 * the result via a phantom-typed `ProviderTool` cast.
19 */
20export function codeInterpreterTool(
21 container: CodeInterpreterToolConfig,
22): OpenAICodeInterpreterTool {
23 return baseCodeInterpreterTool(container) as OpenAICodeInterpreterTool
24}