Skip to main content
View module source on GitHub

TraceConfig

Trace config. This class represents a trace config.

TraceConfigDict

Trace config dict. This class represents a trace config dictionary.

get_trace_config_dict

Convert a TraceConfig object to a TraceConfigDict. Arguments: Returns: A TraceConfigDict dictionary representation of the config.

Trace

A class representing a trace in the logging system. A trace is a high-level container for tracking a complete operation or workflow.

__init__

Initialize a new Trace instance. Arguments:

set_input

Set the input for this trace. Arguments:

set_input_

Static method to set the input for a trace. Arguments:

set_output

Set the output for this trace. Arguments:

set_output_

Static method to set the output for a trace. Arguments:

generation

Add a generation to this trace. Arguments: Returns: A new Generation instance.

tool_call

Add a tool call to this trace. Arguments: Returns: A new ToolCall instance.

tool_call_

Static method to add a tool call to a trace. Arguments: Returns: A new ToolCall instance.

generation_

Static method to add a generation to a trace. Arguments: Returns: A new Generation instance.

add_error

Add an error to this trace. Arguments: Returns: A new Error instance.

error_

Static method to add an error to a trace. Arguments: Returns: A new Error instance.

retrieval

Add a retrieval to this trace. Arguments: Returns: A new Retrieval instance.

retrieval_

Static method to add a retrieval to a trace. Arguments: Returns: A new Retrieval instance.

span

Add a span to this trace. Arguments: Returns: A new Span instance.

span_

Static method to add a span to a trace. Arguments: Returns: A new Span instance.

feedback

Add feedback to this trace. Arguments:

feedback_

Static method to add feedback to a trace. Arguments:

add_tag_

Static method to add a tag to a trace. Arguments:

add_attachment

Add an attachment to this trace. Arguments:

add_attachment_

Static method to add an attachment to a trace. Arguments:

end_

Static method to end a trace. Arguments: Returns: The result of the end operation.

event_

Static method to add a custom event to a trace. Arguments: Returns: The result of the event operation.

data

Get the data representation of this trace. Returns: A dictionary containing the trace data.