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

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?