Get help from the marimo community

Updated 8 months ago

Chat completion error (Codeium)

At a glance

The community member is experiencing an error when using Codeium with Marimo, receiving a 404 "Unknown request URL" error when trying to use OpenAI completions. The community members discuss potential solutions, including checking the API key, model name, and base URL settings. It is determined that removing the base URL and using the default URL resolves the issue, and the community members also discuss how to verify that Codeium is working without OpenAI. There is no explicitly marked answer, but the community members provide helpful suggestions to resolve the issue.

Useful resources
Plain Text
  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}}

I get this error after using ctrl-shift-E and submitting a line of text. This is my first time attempting to use Codeium with Marimo.
m
M
14 comments
I'm using v0.6.25 (newest available to pixi as of a half an hour ago)
full console log
This is not actually codeium - codeium is only for the editor autocomplete. This is the OpenAI completions (yet another AI integration). You will need to configure those settings differently
what is your base_url? under ai.open_ai]
Plain Text
[ai.open_ai]
api_key = "sk-***************"
model = "GPT4o"
base_url = "https://api.openai.com"

upgraded marimo to v0.26 this AM with pixi, same error.
I also tried model "gpt-4-turbo" as per the web page example
(api key sanitized)
Will Codeium completion work without openai? (and how do you trigger Codeium?)
  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)
ok, a) my 4o model name was wrong (should be gpt-4o), and b) removing the base url works (for both 4 models)
how to verify Codeium works?
ahh, it is there, just a lot slower than in vscode
thanks for your help Myles!
awesome - if there are any action items on us, let us know.
e.g. speed up delay (although i think 200ms is good, which is the default)
validation of base url or models
Add a reply
Sign up and join the conversation on Discord