Solution skill
openai:error_code=None error_message='Too many inputs for model None. The max number of inputs is 1.
Complete solution
Llama Index: openai:error_code=None error_message='Too many inputs for model None. The max number of inputs is 1.. The verified fix is Fix: Contributor iaalm: set embed_batch_size=1 - e.g. Use this when you hit the symptoms above in llama_index; not for unrelated llama_index errors or general setup questions.
TL;DR
Fix: Contributor iaalm: set embedbatchsize=1 - e.g. Reporter KeyanatGiggso confirmed the workaround.
The error
Issue run-llama/llama_index#947 (closed, 23 comments): while using llama_index 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:error_code=None error_message='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.' error_param=None error_type=invalid_request_error message='OpenAI API error received' stream_error=False The code works for some fiFix
- Contributor iaalm: set embedbatchsize=1 - e.g.
- Reporter KeyanatGiggso confirmed the workaround.
Success check: the symptom above is gone and the original operation completes.
When to use
- You hit this exact symptom in llama_index.
- You want the verified fix without digging through the thread.
When not to use
- A different error in llama_index, even a similar-looking one.
- General llama_index setup or credential questions.
Compatibility
- Llama Index (run-llama/llama_index)
Variant phrasings
- How to fix "openai:errorcode=None errormessage='Too many inputs for model None. The max number of inputs is 1." in llama_index
- llamaindex: openai:errorcode=None error_message='Too many inputs for model None. The max number of inputs is 1.
Source
- https://github.com/run-llama/llama_index/issues/947
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 2 · 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>