Find answers from the community

Updated 3 months ago

```pydantic.error_wrappers.ValidationError: 1 validation error for IngestionPipelinetrans

Plain Text
pydantic.error_wrappers.ValidationError: 1 validation error for IngestionPipeline
transformations -> 0
  value is not a valid dict (type=type_error.dict)


Plain Text
ingestion_pipeline = IngestionPipeline(
    transformations=[AzureOpenAIEmbedding]
    , vector_store=vector_store
)

ingestion_pipeline.run(documents=new_docs, show_progress=True)

The code above throws the error at the top. Not sure why, and I haven't been able to find much online. I am not superrrr familiar with pydantic so thats probably why I'm struggling. Any help?

?
k
L
n
17 comments
Please stand by @no_dice as I search the knowledge base. I normally take about 20 seconds or so. :wave:
----------------------
Based on the information provided in the extracts, it seems like the transformations parameter in the IngestionPipeline expects a list of transformation instances, not just the class names.

In the extracts, there is no direct example of using AzureOpenAIEmbedding in the IngestionPipeline. However, there are examples of using other transformations and embeddings. For instance, in the document management pipeline example (), transformations are used like this:

Plain Text
pipeline = IngestionPipeline(
    transformations=[...], docstore=SimpleDocumentStore()
)


In the Azure Cognitive Search example (), an embedding model is instantiated before being used:

Plain Text
embed_model = OpenAIEmbedding()


Based on these examples, you might need to instantiate AzureOpenAIEmbedding before using it in the IngestionPipeline. However, without the exact usage of AzureOpenAIEmbedding in the provided extracts, I can't provide a confident answer. I recommend checking the LlamaIndex documentation or source code for more information on how to use AzureOpenAIEmbedding in the IngestionPipeline.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
The error is basically saying that transformations at position 0 is not a pydantic object

Are you using azure embeddings class from llama_index? Or from langchain?
I see. No I wasn't but I'm moving it over from llama_index now
Ah, its langchain...
Using llama kndex embeddings shouuuuld fix the issue.

Each item in the transformations list needs to inherit from the TransformComponent base class (which our embeddings do) -- otherwise pydantic will complain about the type
Damn, using the LlamaIndex embeddings is giving me that 404 error again
So close yet so far
You followed the guide? Setup might be ever so different from lamgchain

https://docs.llamaindex.ai/en/stable/examples/customization/llms/AzureOpenAI.html
I got lots of errors.
Gonna post em in the morning
Async and regular
It's weird, when I run the ingestion pipeline without async it finishes and nothing is in the database..
More info tomorrow.
actually no I'll post now
Add a reply
Sign up and join the conversation on Discord