Skip to content

trulens.core.schema.conversation

trulens.core.schema.conversation

Conversation schema definitions.

Classes

Conversation

Bases: SerialModel

An ordered group of records belonging to one conversation.

Functions
__repr__
__repr__() -> str

Safe repr that handles circular references.

Pydantic's default __repr__ does not guard against circular references among model instances, which leads to RecursionError (see GitHub issue #1862). This override uses the same formatted_objects context-variable that __rich_repr__ uses so that already-visited objects are replaced with a short placeholder instead of recursing infinitely.

__rich_repr__
__rich_repr__() -> Result

Requirement for pretty printing using the rich package.