Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embeddings model no longer working in 1.1.2 #5943

Closed
shjanjua opened this issue Jan 26, 2025 · 5 comments · May be fixed by #6034
Closed

Embeddings model no longer working in 1.1.2 #5943

shjanjua opened this issue Jan 26, 2025 · 5 comments · May be fixed by #6034
Assignees
Labels
bug Something isn't working

Comments

@shjanjua
Copy link

Bug Description

I've created a custom component embedding model for Oracle OCI AI hosted Embedding models (which hosts Cohere embedding models). I've attached the custom component - OCI GenAI Embedding.json.
This worked as expected in Langflow 1.1.1, but it fails in Langflow 1.1.2. with the following error in the terminal.

ERROR    - chat - Error building vertices: Error serializing vertex build response: Unable to serialize unknown type:    chat.py:405
                             <class 'oci.generative_ai_inference.generative_ai_inference_client.GenerativeAiInferenceClient'>   

I've also tried the in-built "Cohere Embeddings" from Langflow, and that also fails with the same error (but referencing different class - as shown below). Both use langchain community embeddings.

ERROR    - chat - Error building vertices: Error serializing vertex build response: Unable to serialize unknown type: chat.py:405 
                             <class 'cohere.client.Client'>

Reproduction

Attach Embeddings model component to a Vector Store. Try to ingest data or execute similarity search (anything that uses the Embedding) - Flow fails, with Embedding model component throwing out an error.

Image

Expected behavior

Flow/Build to success, and the Data ingestion and/or Similarity search (both of which involve embedding), to succeed.

Who can help?

No response

Operating System

MacOS (Container)

Langflow Version

1.1.2

Python Version

3.12

Screenshot

No response

Flow File

OCIVSIngestData1.1.2.json

@shjanjua shjanjua added the bug Something isn't working label Jan 26, 2025
Copy link

dosubot bot commented Jan 26, 2025

Hey @ShahvaizJanjua! 👋 I'm here to help you with bugs, questions, and becoming a contributor. Let's squash those bugs together!

The issue you're encountering with Langflow 1.1.2 seems to be related to the serialization of external client objects, specifically GenerativeAiInferenceClient and cohere.client.Client. Langflow's serialization mechanism has limitations when dealing with objects from external libraries that do not have straightforward serialization methods like dict or model_dump. When such objects are encountered, the mechanism defaults to converting them to a string, which can lead to incomplete serialization and errors [1].

In Langflow 1.1.2, there have been improvements in error handling and logging related to serialization issues. These improvements include catching specific serialization errors and providing more detailed error messages, which can help in diagnosing the problem [2][3][4].

To address this issue, you might consider implementing a custom serialization method for these specific client objects or checking if there are any updates or patches available that address this serialization limitation in Langflow 1.1.2.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@severfire
Copy link

severfire commented Jan 30, 2025

I have issue with Google Generative AI Embeddings
it gives error
Details: Error serializing vertex build response: Unable to serialize unknown type: <class 'google.ai.generativelanguage_v1beta.services.generative_service.client.GenerativeServiceClient'>

while OpenAI Embeddings works on same flow

error occurs on Version 1.1.3.dev0
@italojohnny seems like recurring issue on more than one environment

@shjanjua
Copy link
Author

I have tried this on 1.1.3 and I confirm that the issue still persists for both the Cohere embeddings and the custom Oracle OCI Embeddings I've linked in the post

@severfire
Copy link

severfire commented Jan 30, 2025

@italojohnny, @ogabrielluiz related issues:
#5955
#5971
#5636

@edwinjosechittilappilly
Copy link
Collaborator

Hi @severfire we are looking into it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants