@ai-sdk/provider-utils
Advanced tools
+1
-1
| { | ||
| "name": "@ai-sdk/provider-utils", | ||
| "version": "5.0.16", | ||
| "version": "5.0.17", | ||
| "type": "module", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
@@ -5,4 +5,2 @@ import type { ProviderOptions } from './provider-options'; | ||
| const toolCallerSymbol = Symbol.for('vercel.ai.experimental.toolCaller'); | ||
| export type ToolCallerDefinition = | ||
@@ -21,3 +19,3 @@ | { | ||
| export type ToolCallerTool<TOOL extends Tool = Tool> = TOOL & { | ||
| readonly [toolCallerSymbol]: ToolCallerDefinition; | ||
| readonly experimental_toolCaller: ToolCallerDefinition; | ||
| }; | ||
@@ -29,3 +27,3 @@ | ||
| ): ToolCallerTool<TOOL> { | ||
| return Object.defineProperty({ ...tool }, toolCallerSymbol, { | ||
| return Object.defineProperty({ ...tool }, 'experimental_toolCaller', { | ||
| value: definition, | ||
@@ -38,3 +36,3 @@ }) as ToolCallerTool<TOOL>; | ||
| ): ToolCallerDefinition | undefined { | ||
| return (tool as ToolCallerTool | undefined)?.[toolCallerSymbol]; | ||
| return (tool as ToolCallerTool | undefined)?.experimental_toolCaller; | ||
| } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
880453
-0.02%14874
-0.02%