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

code-execution-tool.ts

23 lines684 Bytes

1import { brandProviderTool } from '@tanstack/ai'
2import type { ProviderTool, Tool } from '@tanstack/ai'
3​
4export interface CodeExecutionToolConfig {}
5​
6/** @deprecated Renamed to `CodeExecutionToolConfig`. Will be removed in a future release. */
7export type CodeExecutionTool = CodeExecutionToolConfig
8​
9export type GeminiCodeExecutionTool = ProviderTool<'gemini', 'code_execution'>
10​
11export function convertCodeExecutionToolToAdapterFormat(_tool: Tool) {
12 return {
13 codeExecution: {},
14 }
16​
17export function codeExecutionTool(): GeminiCodeExecutionTool {
18 return brandProviderTool<GeminiCodeExecutionTool>({
19 name: 'code_execution',
20 description: '',
21 metadata: {},
22 })