Closed dwk601 closed 3 months ago
@dwk601, This is because it is not able to access required .env variables.
# required environment variable in .env
# AZURE_OPENAI_ENDPOINT
# AZURE_OPENAI_CHAT_DEPLOYMENT_NAME
# MODEL_NAME
# AZURE_OPENAI_API_KEY
# OPENAI_API_TYPE
# AZURE_OPENAI_API_VERSION
# AZURE_OPENAI_EMBEDDINGS_DEPLOYMENT_NAME
And then load these variables by using:
from dotenv import load_dotenv
load_dotenv()
Exception has occurred: KeyError 'AZURE_OPENAI_EMBEDDINGS_DEPLOYMENT_NAME' KeyError: b'AZURE_OPENAI_EMBEDDINGS_DEPLOYMENT_NAME'
During handling of the above exception, another exception occurred:
File "/home/dongwook/Project/UniApi/main.py", line 12, in
azure_deployment=os.environ["AZURE_OPENAI_EMBEDDINGS_DEPLOYMENT_NAME"],
KeyError: 'AZURE_OPENAI_EMBEDDINGS_DEPLOYMENT_NAME'