Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

code-interpreter-tool.ts

24 lines827 Bytes

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'
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