axiom
Version:
Axiom AI SDK provides - an API to wrap your AI calls with observability instrumentation. - offline evals - online evals
38 lines (19 loc) • 559 B
Markdown
[**axiom v0.51.1**](../../README.md)
***
[axiom](../../README.md) / [index](../README.md) / wrapTool
Function: wrapTool()
**wrapTool**\<`T`\>(`toolName`, `tool`): `T`
Wraps a tool to create child spans when the tool's execute method is called.
# Type Parameters
## T
`T` *extends* `ToolLike`
# Parameters
## toolName
`string`
The name of the tool (key from the tools object) - span name will be `execute_tool <toolName>`
## tool
`T`
The tool to wrap
# Returns
`T`
The same tool but with a wrapped execute method that creates spans