CubeGPT / BuilderGPT

An open source, free, AI-powered Minecraft structure generator
Apache License 2.0
50 stars 10 forks source link

openai.NotFoundError: Error code: 404 - {'error': {'message': 'Invalid URL (POST /v1/chat/completions/chat/completions)', 'type': 'invalid_request_error', 'param': None, 'code': None}} #34

Closed Pavel7811 closed 2 days ago

Pavel7811 commented 3 months ago

After installing all the libraries and inserting its API token, the program returned an error.

C:\Users\Admin\Desktop\BuilderGPT-2.0.0\venv\Scripts\python.exe C:/Users/Admin/Desktop/BuilderGPT-2.0.0/ui.py -----ERROR MSG START----- Traceback (most recent call last): File "C:\Users\Admin\Desktop\BuilderGPT-2.0.0\cube_qgui\base_tools.py", line 172, in new_func func(obj) File "C:\Users\Admin\Desktop\BuilderGPT-2.0.0\ui.py", line 107, in generate schem = get_schematic(description, progressbar) File "C:\Users\Admin\Desktop\BuilderGPT-2.0.0\ui.py", line 38, in get_schematic response = core.askgpt(sys_gen, config.USR_GEN.replace("%DESCRIPTION%", description), config.GENERATE_MODEL) File "C:\Users\Admin\Desktop\BuilderGPT-2.0.0\core.py", line 68, in askgpt response = client.chat.completions.create( File "C:\Users\Admin\Desktop\BuilderGPT-2.0.0\venv\lib\site-packages\openai\_utils\_utils.py", line 275, in wrapper return func(*args, **kwargs) File "C:\Users\Admin\Desktop\BuilderGPT-2.0.0\venv\lib\site-packages\openai\resources\chat\completions.py", line 663, in create return self._post( File "C:\Users\Admin\Desktop\BuilderGPT-2.0.0\venv\lib\site-packages\openai\_base_client.py", line 1200, in post return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)) File "C:\Users\Admin\Desktop\BuilderGPT-2.0.0\venv\lib\site-packages\openai\_base_client.py", line 889, in request return self._request( File "C:\Users\Admin\Desktop\BuilderGPT-2.0.0\venv\lib\site-packages\openai\_base_client.py", line 980, in _request raise self._make_status_error_from_response(err.response) from None openai.NotFoundError: Error code: 404 - {'error': {'message': 'Invalid URL (POST /v1/chat/completions/chat/completions)', 'type': 'invalid_request_error', 'param': None, 'code': None}} None -----ERROR MSG END-----

Pavel7811 commented 3 months ago

I had to change the base url in the settings tab. Here is a working version: 2024-08-06_22-40-08