pub fn record_tool_definitions(
span: &Span,
request: &CompletionRequest,
enabled: bool,
)Expand description
Records the request’s tool definitions on gen_ai.tool.definitions when
content telemetry is explicitly enabled.
Function tools carry their name, description and parameter schema.
Provider-hosted tools in additional_params.tools carry only their type and
name, since their configuration can hold credentials. An entry without a
type field is a function when it has a name, and otherwise one tool per
key, as in {"googleSearch": {}}. The name is the name field, or the one
nested under the type ({"type": "custom", "custom": {"name": ...}}), or
else the type.
This is the request as dispatched; a provider may still add or drop tools when it encodes the request. Records nothing when the request has no tools.