Chainlit / literalai-python

https://docs.getliteral.ai/
Apache License 2.0
12 stars 0 forks source link

fix: add __repr__ to classes #71

Closed desaxce closed 5 months ago

desaxce commented 5 months ago

Added toString() to Python classes.

To test: call print(step)

image
linear[bot] commented 5 months ago
ENG-1354 Add a toString() method on all Python classes

## Description When working in Jupyter, I tend to end my cells with just a variable that I want printed, relying on \__repr_\_ to show the right value. We want to show a pretty-print of most commonly used objects: Thread, Step, LiteralClient, Dataset, DatasetItem, DatasetExperiment, Message, Prompt, etc. ## DoD * Show me a pretty-print of all class instances * Make that in a central place, so we can just inherit the behaviour