Embeddings and Chroma is not working for Microsoft OpenAI

AnaBelenGonzalezVillalba-6403 15 Reputation points
2023-06-06T06:57:03.6333333+00:00

I want to search information in a PDF using longchain and embeddings. It's working fine with OpenAI, but when I am doing with Microsoft Open AI (Azure Cognitive services) is not working.

embeddings = OpenAIEmbeddings(
            openai_api_base=[my_azure_openai_url],
            openai_api_type="azure",
            openai_api_key=[api_key],
            openai_api_version="2022-12-01"
        )
        vectordb = Chroma.from_documents(pages, embedding=embeddings,
                                         persist_directory=".")

And when I am passing embedding to Chroma, I got this error from Microsoft.

*" Too many inputs. The max number of inputs is 1. We hope to increase the number of inputs per request soon. Please contact us through an Azure support request at: https://go.microsoft.com/fwlink/?linkid=2213926 for further questions."
*

I tried to create a request, but all the request are fixed, you can' request anything ad-hoc.

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
40,999 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Siddhartha Ghosal 0 Reputation points
    2023-06-26T04:38:04.1366667+00:00

    I am also getting an issue

    Code:

    embeddings = OpenAIEmbeddings()

    doc_search = Chroma.from_documents(texts, embeddings)

    Error:

    InvalidRequestError: Too many inputs. The max number of inputs is 1. We hope to increase the number of inputs per request soon.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.