Find answers from the community

Updated 2 months ago

I've been trying to transfer over to the

I've been trying to transfer over to the new version of llamaindex but I keep getting an unauthorized error
L
i
35 comments
using azure right?
OpenAI released a new client, and it really messed with azure

Lemme find the latest doc for it
is there a specific openai client version that i can lock to with pip?
like one that 'works' with the lastest release of llama
You followed something like this? Double check the kwarg names, they might have changed

https://docs.llamaindex.ai/en/stable/examples/customization/llms/AzureOpenAI.html
Nope, since we only support openai>1.0
Plain Text
        embedding: AzureOpenAIEmbedding = AzureOpenAIEmbedding(
            model=embedding_model.api_model,
            api_key=embedding_model.api_key,
            api_version=embedding_model.api_version,
            azure_endpoint=embedding_model.api_base,
            azure_deployment=embedding_model.api_deployment,
        )
I genuinely copied 1:1
lemme see if i can manually post request with an example on their docs or something
Plain Text
curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/deployments/YOUR_DEPLOYMENT_NAME/embeddings?api-version=2023-05-15\
  -H 'Content-Type: application/json' \
  -H 'api-key: YOUR_API_KEY' \
  -d '{"input": "Sample Document goes here"}'


(for reference)
I wonder if we can enable logs for which URL it's posting to
Plain Text
import os
os.environ['OPENAI_LOG'] = "debug"
I think that enables some better logs
didn't seem to enable logs
i know where to look
Does that URL look correct? (I have no idea lol)
(if it is, then it's somehow an API key issue??)
the token is being used already and is working
@Logan M ok, i'm going to cry
my buddy reset the token and didn't say anything
sorry for wasting your time
that was an hour well used of mine LOL
oof well, I'm glad it wasn't our fault πŸ˜†
Add a reply
Sign up and join the conversation on Discord