semantic-kernel
semantic-kernel copied to clipboard
APIConnectionError
python sk.py Error: (<ErrorCodes.ServiceError: 6>, 'OpenAI service failed to complete the prompt', APIConnectionError(message='Error communicating with OpenAI', http_status=None, request_id=None))
To Reproduce
- pip install semantic-kernel
- put '''OPENAI_API_KEY="my key" OPENAI_ORG_ID=" my id" ''' into .env
- copy sample to sk.py
- run sk .py
- show: Error: (<ErrorCodes.ServiceError: 6>, 'OpenAI service failed to complete the prompt', APIConnectionError(message='Error communicating with OpenAI', http_status=None, request_id=None))
Expected behavior i runed openai-api in a .py by cli and it worked. it seems not newwork problem.
Desktop (please complete the following information):
- OS: MacOs
- IDE: code
- python3.11
Have you solved the problem? I am having the same error.
same problem
same problem
I got the same problem. I fixed my problem by adding a config setting in the source code. See my other comment for details. https://github.com/microsoft/semantic-kernel/issues/627#issuecomment-1573221317
same problem
I also have the same problem: Error: (<ErrorCodes.ServiceError: 6>, 'OpenAI service failed to complete the chat', APIConnectionError(message='Error communicating with OpenAI', http_status=None, request_id=None))
@mkarle can you look into this?
This only started with Python3.10 and is due to proxy settings not being detected by semantic kernel when referencing openai. This fixed it: https://github.com/microsoft/semantic-kernel/issues/627#issuecomment-1578109735
@liguanghe is this issue now fixed for you as well? cc: @mkarle
@liguanghe are you continuing to have an issue with this? Since there's been no activity on this issue in several months I am going to close it. Feel free to open it back up if you continue to have problems.