maphew
maphew5mo ago

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}}
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.
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)...
Jump to solution
7 Replies
maphew
maphewOP5mo ago
I'm using v0.6.25 (newest available to pixi as of a half an hour ago)
maphew
maphewOP5mo ago
full console log
Myles Scolnick
Myles Scolnick5mo ago
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 https://docs.marimo.io/guides/ai_completion.html#using-ai-to-modify-cells what is your base_url? under ai.open_ai]
maphew
maphewOP5mo ago
[ai.open_ai]
api_key = "sk-***************"
model = "GPT4o"
base_url = "https://api.openai.com"
[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?)
Solution
Myles Scolnick
Myles Scolnick5mo ago
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)
maphew
maphewOP5mo ago
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!
Myles Scolnick
Myles Scolnick5mo ago
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