Debugging / stacktrace in chat application
I am looking for instructions on how to debug some code that is run from a mo.ui.chat box. I get error messages (example pasted), but no stack trace or similar that could bring me closer.
8 Replies
Can you share more details of your code/setup?
The code I am running is here: https://static.marimo.app/static/debugchat-3h6f Basically, I am just trying to wrap my head around things. I am running against an Azure openAI private endpoint, and everything works fine, including a chat box without memory. I am trying to add memory to the chat bot, but then I run into some error, which is not unexpected, I am note sure how this would work.
What was frustrating, though, was that I couldn't really understand which line was throwing the error, and was a bit at loss at figuring out how to debug this.
(Looking more into it, it seems the
@ell.simple
gives me memory, but I don't understand how it works...)hello2
a marimo app
The ages of the complex chat bot are wrong. They should be ChatMessage from marimo, not an ell type
I need to understand this better...., but maybe I don't need the complex chat bot at all. Being new to both Marimo and Ell perhaps I am biting over too much. (I am familiar with Langchain, though).
Thanks for your help.
Yea no problem. Have you checked out the ell examples in the marimo repo?
GitHub
marimo/examples/ai/chat at main · marimo-team/marimo
A reactive notebook for Python — run reproducible experiments, execute as a script, deploy as an app, and version with git. - marimo-team/marimo
Thanks, after looking at the ell examples on tool use I was able to setup this: https://static.marimo.app/static/toolusage-diyf
This does multi-step tool usage using a Azure OpenAI deployment. Now off to building something useful with it.
testchat2
a marimo app
Very cool, thanks for sharing!