Azure-Samples / azure-search-openai-demo

A sample app for the Retrieval-Augmented Generation pattern running in Azure, using Azure AI Search for retrieval and Azure OpenAI large language models to power ChatGPT-style and Q&A experiences.
https://azure.microsoft.com/products/search
MIT License
5.6k stars 3.75k forks source link

Error while using Vision Embeddings API #1759

Open hfaouaz-rcg opened 6 days ago

hfaouaz-rcg commented 6 days ago

Please provide us with the following information:

This issue is for a: (mark with an x)

- [x ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Enable Computer Vision with GPT4o and run the prepdocs.py against the example docs. This is out of the box setup.

Any log messages given by the failure

Rate limited on the Vision embeddings API, sleeping before retrying... Rate limited on the Vision embeddings API, sleeping before retrying... Rate limited on the Vision embeddings API, sleeping before retrying... Traceback (most recent call last): File "/Users/hfaouaz/development/rcg-search-openai/app/backend/prepdocslib/embeddings.py", line 248, in create_embeddings embeddings.append(resp_json["vector"]) KeyError: 'vector'

Expected/desired behavior

Even hitting the rate limit, it should eventually build the embeddings.

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)

Running Locally - macOS Sonoma 14.5

azd version?

run azd version and copy paste here.

azd version 1.9.3 (commit e1624330dcc7dde440ecc1eda06aac40e68aa0a3)

Versions

Mention any other details that might be useful


Thanks! We'll be in touch soon.

pamelafox commented 6 days ago

I wasn't able to reproduce the issue in my vision setup. Could you print() out the resp_json to see what it contains?

hfaouaz-rcg commented 5 days ago

Hi @pamelafox. thank you first. second, I can't seem to duplicate the issue again after I rebuilt the environment. I am suspecting it could have been computer vision running on a private endpoint, that was preventing prepdocs to invoke the api? I will keep an eye, and it happens again, I will print the resp_json.