Closed ollmer closed 3 days ago
This also closes #81
Do we really need to model_dump and model_validate every time?
From the Gradio documentation it says:
If it holds an object or primitive, a change is triggered if the hash of the value changes. So if you define a custom class and create a gr.State variable that is an instance of that class, make sure that the the class includes a sensible
__hash__
implementation.
Have we tried implementing the __hash__
for tape and agent object?
Yes, I've tried to implement __hash__()
for the agent class, which returned agent.model_dump_json(). It didn't help.
Also, in case of the absence of a hash method, the state raises an error when created, and we haven't observed such an issue.