Skip to content

Getting list index error while creating embeddings #34

@vithalsm

Description

@vithalsm

Hi,

While trying to follow this tutorial, getting error as: IndexError: list index out of range with AzureOpenAIEmbeddings and OpenAIEmbeddings. Local OllamaEmbeddings works fine.

Described the problem more detail in :
langchain-ai/langchain-community#282

Please let me know if you have any suggestions.

Error in:

File "C:\Users\abc\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\langchain_openai\embeddings\base.py", line 38, in _process_batched_chunked_embeddings
results[indices[i]].append(batched_embeddings[i])
~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions