myshell-ai / AIlice

AIlice is a fully autonomous, general-purpose AI agent.
MIT License
876 stars 136 forks source link

Unable to use OPENAI_API_KEY error incorrect but its accurate #54

Closed TheMindExpansionNetwork closed 4 months ago

TheMindExpansionNetwork commented 4 months ago

This is really cool project I installed it all but get this

127.0.0.1 - - [16/Jul/2024 20:33:26] "GET /new_chat HTTP/1.1" 200 - 127.0.0.1 - - [16/Jul/2024 20:33:26] "GET /static/User.JPG HTTP/1.1" 304 - ASSISTANT_AIlice: 127.0.0.1 - - [16/Jul/2024 20:33:26] "POST /chat HTTP/1.1" 200 - 127.0.0.1 - - [16/Jul/2024 20:33:26] "GET /static/AIlice.png HTTP/1.1" 304 - Exception in thread Thread-6: Traceback (most recent call last): File "C:\Users\MindExpander\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1016, in _bootstrap_inner self.run() File "C:\Users\MindExpander\AppData\Local\Programs\Python\Python310\lib\threading.py", line 953, in run self._target(*self._args, *self.kwargs) File "Z:\APPZ\AG3NTZ\AIlice\ailice\core\AProcessor.py", line 117, in call ret = self.llm.Generate(prompt, proc=partial(self.outputCB, "ASSISTANT" + self.name), endchecker=self.interpreter.EndChecker, temperature = config.temperature) File "Z:\APPZ\AG3NTZ\AIlice\ailice\core\llm\AModelChatGPT.py", line 26, in Generate for chunk in self.client.chat.completions.create(model=self.modelName, File "C:\Users\MindExpander\AppData\Local\Programs\Python\Python310\lib\site-packages\openai_utils_utils.py", line 277, in wrapper return func(args, kwargs) File "C:\Users\MindExpander\AppData\Local\Programs\Python\Python310\lib\site-packages\openai\resources\chat\completions.py", line 643, in create return self._post( File "C:\Users\MindExpander\AppData\Local\Programs\Python\Python310\lib\site-packages\openai_base_client.py", line 1266, in post return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)) File "C:\Users\MindExpander\AppData\Local\Programs\Python\Python310\lib\site-packages\openai_base_client.py", line 942, in request return self._request( File "C:\Users\MindExpander\AppData\Local\Programs\Python\Python310\lib\site-packages\openai_base_client.py", line 1046, in _request raise self._make_status_error_from_response(err.response) from None openai.AuthenticationError: Error code: 401 - {'error': {'message': 'Incorrect API key provided: sk-proj-**sh7R. You can find your API key at https://platform.openai.com/account/api-keys.', 'type': 'invalid_request_error', 'param': None, 'code': 'invalid_api_key'}}

think it something with API it is working a new one I created I am not sure what issue it