litellm.exceptions.APIConnectionError: Getting API connectivity errors #1728
Unanswered
varunmbhat84
asked this question in
Q&A
Replies: 1 comment
|
Hey there, sorry for not getting back in time. We are currently not very actively reviewing our Github Discussions sections. For any potential bugs, I would advise going to our Discord and raising a question there. This once I have turned your issue into a GH issue. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I have a cognee code and i am getting this error:
File "D:\kg_venv\Lib\site-packages\litellm\litellm_core_utils\exception_mapping_utils.py", line 2038, in exception_type
raise APIConnectionError(
...<4 lines>...
)
litellm.exceptions.APIConnectionError: litellm.APIConnectionError: AzureException APIConnectionError - Connection error.
I use azure for open ai credentials and azure endpoint
This is the code:
import os
import asyncio
from dotenv import load_dotenv
import cognee
Load environment variables
load_dotenv()
Set Azure OpenAI variables in Cognee
os.environ["LLM_PROVIDER"] = "azure"
os.environ["AZURE_OPENAI_KEY"] = os.getenv("AZURE_OPENAI_KEY")
os.environ["AZURE_OPENAI_ENDPOINT"] = os.getenv("AZURE_OPENAI_ENDPOINT")
os.environ["AZURE_OPENAI_API_VERSION"] = os.getenv("AZURE_OPENAI_API_VERSION")
os.environ["AZURE_OPENAI_DEPLOYMENT"] = os.getenv("AZURE_OPENAI_DEPLOYMENT")
async def main():
# Reset data and state
await cognee.prune.prune_data()
await cognee.prune.prune_system(metadata=True)
if name == "main":
asyncio.run(main())
What is the possible issue causing this, can anyone provide a solution for this, I just need a basic cognee code to work on my laptop (I am using VS code).
If I do the normal LLM calls it works, which proves the credentials are alright.
All reactions