Get help from the marimo community

Updated last month

LLM client that works with Marimo chat and Pyodide

At a glance

The community member is looking for a chat bot client that works in pyodide and is supported by the Marimo chat widget. They are trying to build a data chat bot but are having issues, as the OpenAI Python client does not seem to work in pyodide.

The comments suggest that while the chat bot itself may work, the libraries being used likely do not. The community members suggest making a plain REST request, but note that this may run into CORS issues. One community member mentions that Anthropic allows CORS via a setting, and suggests that OpenAI may have a similar feature.

Another community member asks if they can still integrate the plain requests approach with the Marimo chat widgets, and a response indicates that this is possible by passing a callback function that takes in a list of messages and returns a single response.

Does anyone know a chat bot client that works in pyodide and is supported by marimo chat widget?
I'm trying to build a data chat bot but running into this.
Openai's python client doesn't work in pyodide it seems.
M
a
4 comments
The chat bot does work, but the libraries you are using likely don’t - such as openai

You can just make a plain REST request, but might hit cors. I know Anthropic allows cors via a setting. Maybe openai does now too
If I just use plain requests, can I still integrate it with Marimo s chat widgets
You can - for the first param, instead of using a built in model, you pass a callback which takes in a list of messages and returns a single response
(On my phone, otherwise would give you an example)
Add a reply
Sign up and join the conversation on Discord