Get help from the marimo community

Home
Members
arthrod.
a
arthrod.
Offline, last seen 5 days ago
Joined February 26, 2025
Hi everyone,

I'm having the following issue: I start working on a notebook, add some stuff in the cells and then after saving they keep concatenating one after the other non-stop. I turned off the ruff on save and that continued.
17 comments
1
R
H
A
M
a
Hi team,

I don't really need help here, because I ended up using httpx and that was sufficient for my issue, but while the chat component works fine, I can't seem to be able to make the openai chatcompletions work at all. And because we can't direct it to use the openai package directly because we have specific types, I decided not to work on a solution myself... so just reporting.

Tried sandbox, 3.13, 3.12, 3.11, not a python issue. Forced reinstall, upgrade etc also nothing.

hwo to fix this?
Running openai.py ⚡

➜ URL: http://localhost:2719

[W 250311 00:39:19 file_watcher:26] watchdog is not installed, using polling file watcher
Traceback (most recent call last):
File "/Users/arthrod/.local/share/uv/python/cpython-3.12.7-macos-aarch64-none/lib/python3.12/site-packages/marimo/_runtime/executor.py", line 141, in execute_cell
exec(cell.body, glbls)
File "/Users/arthrod/tmp/marimo_28512/marimocellZBYS.py", line 1, in <module>
from openai import OpenAI
File "/Users/arthrod/.local/share/uv/python/cpython-3.12.7-macos-aarch64-none/lib/python3.12/site-packages/marimo/_output/formatters/formatters.py", line 167, in exec_module
factory.register()
File "/Users/arthrod/.local/share/uv/python/cpython-3.12.7-macos-aarch64-none/lib/python3.12/site-packages/marimo/_output/formatters/ai_formatters.py", line 49, in register
from openai.types.chat import ChatCompletion, ChatCompletionChunk
ModuleNotFoundError: No module named 'openai.types'; 'openai' is not a package
[E 250311 00:39:20 ops:302] (error_id=170b3844-933a-43a4-b935-76f716f62ef3) This cell raised an exception: ModuleNotFoundError('No module named 'openai.types'; 'openai' is not a package')
[E 250311 00:39:20 ops:302] (error_id=23237b61-afea-4948-918e-260549b23e4f) An ancestor raised an exception (ModuleNotFoundError):
[E 250311 00:39:20 ops:302] (error_id=0282ed22-40d1-46be-bd46-03d4eb949875) An ancestor raised an exception (ModuleNotFoundError):
10 comments
a
M