Get help from the marimo community

Updated 2 months ago

Debugging / stacktrace in chat application

At a glance

The community member is looking for help debugging code that runs in a mo.ui.chat box. They are getting error messages but no stack trace or other information to help them identify the issue. In the comments, the community member shares more details about their code and setup, including that they are running against an Azure OpenAI private endpoint and are trying to add memory to a chat bot. Other community members suggest checking out the ell examples in the marimo repo and provide a link to a working example of multi-step tool usage with Azure OpenAI. The community member is able to set up the tool usage example and is now ready to build something useful with it.

Useful resources
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.
Attachment
image.png
M
Å
9 comments
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...)
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?
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.
Very cool, thanks for sharing!
Add a reply
Sign up and join the conversation on Discord