Closed pietrosperoni closed 1 year ago
This is a duplicate, but you just need to change the environment value names to the below
OPENAI_AZURE_API_BASE=your-base-url-for-azure
OPENAI_AZURE_API_VERSION=api-version-for-azure
OPENAI_AZURE_DEPLOYMENT_ID=deployment-id-for-azure
First of all thank you very much. You solved the issue. Said that I swear on all the mathematical truths that yesterday I had the environmental variables as you listed and it did not work. But now it does. It's a mystery.
Duplicates
Steps to reproduce 🕹
For me, I cannot avoid it, so I don't know why it works for everybody else.
I have a .env with those values:
PINECONE_API_KEY=KEY PINECONE_ENV="asia-southeast1-gcp" OPENAI_API_KEY=KEY ELEVENLABS_API_KEY=your-elevenlabs-api-key SMART_LLM_MODEL="gpt-3.5-turbo"#"gpt-4" FAST_LLM_MODEL="gpt-3.5-turbo" GOOGLE_API_KEY= CUSTOM_SEARCH_ENGINE_ID= USE_AZURE=False OPENAI_API_BASE=your-base-url-for-azure OPENAI_API_VERSION="gpt-3.5-turbo" OPENAI_DEPLOYMENT_ID=deployment-id-for-azure IMAGE_PROVIDER=dalle HUGGINGFACE_API_TOKEN=
with instead of KEY the various keys. Notice the USE_AZURE=False When I run the system it ALWAYS blocks on the function get_ada_embedding with stack
I have a free account in Pinecone, and a pro account in openai, and also an account to use open API (but not to use gdp-4). Notice that interestingly my API appear to never have been used:
I tried to change it but it did not help.
Current behavior 😯
The system runs until the chat_with_ai function calls the get relevant (line 72) which calls get_ada_embedding, which calls return openai.Embedding.create(input=[text], model="text-embedding-ada-002")["data"][0]["embedding"]
which returns an error.
What is interesting is what the error says: First message: APIConnectionError (this is something openai is launching) Second message: Error communicating with OpenAI: Invalid URL 'your-base-url-for-azure/embeddings': No scheme supplied
somehow the string 'your-base-url-for-azure' gets sent to openai, even though in the .env I have USE_AZURE=False
Expected behavior 🤔
I suppose returning a vector (an embedding).
Your prompt 📝
There is no last_run_ai_settings.yaml file.
There is however an ai_settings.yaml file whose value is: