opencode-data / .opencode /node_modules /@ai-sdk /provider /src /language-model /v2 /language-model-v2-function-tool.ts
Download .opencode/node_modules/@ai-sdk/provider/src/language-model/v2/language-model-v2-function-tool.ts from Chenloong999/opencode-data: direct link, hf CLI and curl.
- Browser
- Download file 1.01 kB
-
https://huggingface.co/datasets/Chenloong999/opencode-data/resolve/main/.opencode/node_modules/%40ai-sdk/provider/src/language-model/v2/language-model-v2-function-tool.ts
- Command line
-
hf download hf://datasets/Chenloong999/opencode-data/.opencode/node_modules/@ai-sdk/provider/src/language-model/v2/language-model-v2-function-tool.ts
-
curl -L -o language-model-v2-function-tool.ts https://huggingface.co/datasets/Chenloong999/opencode-data/resolve/main/.opencode/node_modules/%40ai-sdk/provider/src/language-model/v2/language-model-v2-function-tool.ts
1.01 kB
| import { JSONSchema7 } from 'json-schema'; | |
| import { SharedV2ProviderOptions } from '../../shared'; | |
| /** | |
| * A tool has a name, a description, and a set of parameters. | |
| * | |
| * Note: this is **not** the user-facing tool definition. The AI SDK methods will | |
| * map the user-facing tool definitions to this format. | |
| */ | |
| export type LanguageModelV2FunctionTool = { | |
| /** | |
| * The type of the tool (always 'function'). | |
| */ | |
| type: 'function'; | |
| /** | |
| * The name of the tool. Unique within this model call. | |
| */ | |
| name: string; | |
| /** | |
| * A description of the tool. The language model uses this to understand the | |
| * tool's purpose and to provide better completion suggestions. | |
| */ | |
| description?: string; | |
| /** | |
| * The parameters that the tool expects. The language model uses this to | |
| * understand the tool's input requirements and to provide matching suggestions. | |
| */ | |
| inputSchema: JSONSchema7; | |
| /** | |
| * The provider-specific options for the tool. | |
| */ | |
| providerOptions?: SharedV2ProviderOptions; | |
| }; | |