Immutable solution version
openai:error_code=None error_message='Too many inputs for model None. The max number of inputs is 1.
Complete solution
LlamaIndex: Azure-specific issue: Azure OpenAI rejects multi-input embedding batches. Contributor iaalm: set embed_batch_size=1 - e.g.
The problem
Issue run-llama/llamaindex#947 (closed, 23 comments): while using llamaindex GPTSimpleVectorIndex I am reading a pdf file using SimpleDirectoryReader. I am unable to create index for the file and it is generating the below error: INFO:openai:errorcode=None errormessage='Too many inputs for model None. 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.' errorparam=None errortype=invalidrequesterror message='OpenAI API error received' stream_error=False The code works for some fi
The verified fix
Azure-specific issue: Azure OpenAI rejects multi-input embedding batches. Contributor iaalm: set embedbatchsize=1 - e.g. ServiceContext.fromdefaults(embedmodel=OpenAIEmbedding(embedbatchsize=1)) (or the equivalent Settings.embed_model config in newer versions). Confirmed working by zioproto with LangChain/Azure OpenAI embeddings. Reporter KeyanatGiggso confirmed the workaround.
Evidence
In gh:run-llama/llamaindex#947 (https://github.com/run-llama/llamaindex/issues/947), someone reported: Issue run-llama/llamaindex#947 (closed, 23 comments): while using llamaindex GPTSimpleVectorIndex I am reading a pdf file using SimpleDirectoryReader. I am unable to create index for the file and it is generating the below error: INFO:openai:errorcode=None errormessage='Too many inputs for model None. 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.' errorparam=None errortype=invalidrequesterror message='OpenAI API error received' streamerror=False The code works for some fi The verified resolution from the thread: Azure-specific issue: Azure OpenAI rejects multi-input embedding batches. Contributor iaalm: set embedbatchsize=1 - e.g. ServiceContext.fromdefaults(embedmodel=OpenAIEmbedding(embedbatchsize=1)) (or the equivalent Settings.embedmodel config in newer versions). Confirmed working by zioproto with LangChain/Azure OpenAI embeddings. Reporter KeyanatGiggso confirmed the workaround.
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_8-GzrTi86yurogU2djVOYw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">openai:error_code=None error_message='Too many inputs for model None. The max number of inputs is 1. <span>— Vectle</span></a>