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

Open
ShahvaizJanjua opened this issue Jan 26, 2025 · 1 comment
Open

Embeddings model no longer working in 1.1.2 #5943

ShahvaizJanjua opened this issue Jan 26, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@ShahvaizJanjua
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

@ShahvaizJanjua ShahvaizJanjua 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

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
Development

No branches or pull requests

1 participant