marimo

M

marimo

Join the community to ask questions about marimo and get answers from other members.

Join

help-support

archived-help-and-support

Chat completion error (Codeium)

File "D:\work\telemetry\.pixi\envs\default\Lib\site-packages\openai\_base_client.py", line 1030, in _request
raise self._make_status_error_from_response(err.response) from None
openai.NotFoundError: Error code: 404 - {'error': {'type': 'invalid_request_error', 'code': 'unknown_url', 'message': 'Unknown request URL: POST /chat/completions. Please check the URL for typos, or see the docs at https://platform.openai.com/docs/api-reference/.', 'param': None}}
File "D:\work\telemetry\.pixi\envs\default\Lib\site-packages\openai\_base_client.py", line 1030, in _request
raise self._make_status_error_from_response(err.response) from None
openai.NotFoundError: Error code: 404 - {'error': {'type': 'invalid_request_error', 'code': 'unknown_url', 'message': 'Unknown request URL: POST /chat/completions. Please check the URL for typos, or see the docs at https://platform.openai.com/docs/api-reference/.', 'param': None}}
...
Solution:
1. can you try removing https://api.openai.com (marimo will use the default url) 2. everything else looks fine 3. for codeium. its completion is for typeahead. you can use Codeium without openai which will give you the typeahead text as you type in a cell (instead of chat with your cell)...

Obtaining webview hosted object

I am trying to use marimo in webview2. I wish to know if there is a way to obtain webview hosted object like the following code in js: window.chrome.webview.hostedObject ...

Advanced memory management

Continuing the conversation with @evandertoorn Memory Management How does marimo keep things in memory? marimo internally manages a "globals" dict shared between all cells, everything that is defined is put into this dictionary. The dag primarily works with a static code analysis without respect to what has already been defined etc, to determine the order in which to run cells. Since the global dict is persistent during the session, it could potentially lead to memory build up. However, instead, variables are removed and collected by marimo on cell invalidation....

Weird intra-cell linking/focus behavior

On a notebook I created recently, I started running into a weird behavior where double-clicking on text (e.g., to highlight that word) sometimes (not always?) seems to turn that text element into an "anchor" (double quotes because I made that up - not sure what to call it). Once that's happened, any further clicks in that cell will automatically snap the cursor back to the "anchor" point. It seems to also occasionally turn those points into links (if the anchor is defined in another cell), where clicking any instance of the anchor in that cell will snap the cursor to the definition of the anchor text (e.g., some other cell). Refreshing the page seems to clear this behavior, and so far it only seems to be this one notebook - has anyone else seen similar behavior? Did I toggle a setting that enabled this and just didn't notice doing so? Apologies if this seems dumb; I feel like I'm taking crazy pills. The workaround (refreshing the page) is an inconvienence, but not enough to drive me back to Jupyter 😆...

Possibility of modifying object to which on_change handler is bound

I'm looking for a way to modify an object if it's value changes. Specifically I want to change the label of an object, if the value changes. I can add an on_change handler to detect changes, but once the object is created, I can no longer access it's internals. I tried asking the #ask-docs-ai channel, but I think it's hallucinating: https://discord.com/channels/1059888774789730424/1228123354607648788/1255236745717485568. If the "self" object was part of on_change function, i.e the function signature always contained "self", and if "self" objects, for which the on_change functions are bindable, could have their property setters, i.e. label, value etc. exposed, then I think it should be possible....
Solution:
That's not possible today unfortunately, UI elements are not mutable in that way. If you need a cycle like that, you'll need to use mo.state and wire things up so that the cell that creates the UI element re-runs on change. Could that work?...

READ FIRST: Channel Posting Rules

Please check out https://discord.com/channels/1059888774789730424/1179944203522949291 to see if your question has been answered already. Another resource is to ask your question by typing /query in the @✨ask-docs-ai channel. When posting, detail the following: 1. The problem you're facing...