data_designer.config.utils.trace_renderer
data_designer.config.utils.trace_renderer
data_designer.config.utils.trace_renderer
| Name | Description |
|---|---|
TraceToolCallFunction | dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2) |
TraceToolCall | dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2) |
TraceContentBlock | dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2) |
TraceMessage | dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2) |
TraceRenderer | Renders LLM conversation traces for display_sample_record. |
| Name | Description |
|---|---|
_extract_text_content | None |
_format_tool_call_args | None |
_build_html_block | None |
logger
_ROLE_STYLES
_REASONING_LABEL_STYLE
_REASONING_BODY_STYLE
_TOOL_CALL_LABEL_STYLE
_TOOL_CALL_BODY_STYLE
RoleHtmlColor
_ROLE_HTML_COLORS
1 logger = getLogger(...)
1 class data_designer.config.utils.trace_renderer.TraceToolCallFunction
Bases: typing.TypedDict
1 name: str
1 arguments: str
1 class data_designer.config.utils.trace_renderer.TraceToolCall
Bases: typing.TypedDict
1 id: str
1 type: str
1 class data_designer.config.utils.trace_renderer.TraceContentBlock
Bases: typing.TypedDict
1 type: str
1 text: str
1 class data_designer.config.utils.trace_renderer.TraceMessage
Bases: typing.TypedDict
1 role: typing_extensions.Required[typing.Literal[system, user, assistant, tool]]
1 content: typing_extensions.Required[list[data_designer.config.utils.trace_renderer.TraceContentBlock]]
1 reasoning_content: str | None
1 tool_calls: list[data_designer.config.utils.trace_renderer.TraceToolCall] | None
1 tool_call_id: str | None
1 _REASONING_LABEL_STYLE = italic bold medium_orchid1
1 _REASONING_BODY_STYLE = italic medium_orchid1
1 _TOOL_CALL_LABEL_STYLE = bold bright_yellow
1 _TOOL_CALL_BODY_STYLE = bright_yellow
1 RoleHtmlColor
1 data_designer.config.utils.trace_renderer._extract_text_content(message: data_designer.config.utils.trace_renderer.TraceMessage) -> str
1 data_designer.config.utils.trace_renderer._format_tool_call_args(raw_args: str) -> str
1 class data_designer.config.utils.trace_renderer.TraceRenderer
Renders LLM conversation traces for display_sample_record.
1 render_rich( 2 traces: list[data_designer.config.utils.trace_renderer.TraceMessage], 3 column_name: str 4 ) -> rich.panel.Panel
Return a Rich Panel containing the formatted trace conversation.
1 render_notebook_html( 2 traces: list[data_designer.config.utils.trace_renderer.TraceMessage], 3 column_name: str 4 ) -> bool
Display HTML trace in Jupyter. Returns True if displayed, False otherwise.
1 data_designer.config.utils.trace_renderer._build_html_block( 2 title: str, 3 body: str, 4 bg_color: data_designer.config.utils.trace_renderer.RoleHtmlColor, 5 *, 6 escape_body: bool = True 7 ) -> str