get_span_attributes

API reference for get_span_attributes

get_span_attributes()

Get span attributes from a Model or AgentTool object.

Retrieves custom attributes that were previously set using set_span_attributes(). Returns an empty dictionary if no attributes have been set.

Parameters

Parameter
Type
Required
Default
Description

obj

Model | AgentTool

None

The Model or AgentTool instance to retrieve attributes from

Returns

Dictionary of attribute key-value pairs, or empty dict if none exist Return type: dict[str, str | int | float | bool]

Last updated

Was this helpful?