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

Error Pinecone #4281

Open
irshadmb opened this issue Oct 25, 2024 · 1 comment
Open

Error Pinecone #4281

irshadmb opened this issue Oct 25, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@irshadmb
Copy link

irshadmb commented Oct 25, 2024

Bug Description

Error building Component Pinecone: Invalid type for variable '0'. Required value type is float and passed type was float64 at ['values'][0]

Reproduction

image

Expected behavior

It must not give error

Who can help?

No response

Operating System

Docker

Langflow Version

1.0.19

Python Version

None

Screenshot

No response

Flow File

No response

@irshadmb irshadmb added the bug Something isn't working label Oct 25, 2024
Copy link

dosubot bot commented Oct 25, 2024

Hi @irshadmb! I'm here to help you with bugs, questions, and becoming a contributor. Let's tackle this together!

The error you're encountering is due to a type mismatch where a float64 value is being passed instead of a float. This issue often arises when handling numerical data types in Python, especially when using libraries like NumPy, which default to float64.

To resolve this, you can explicitly convert the float64 values to float before storing them in Pinecone. If you're using NumPy arrays, you can convert them using the .astype(float) method. Here's a quick example:

import numpy as np

# Example array with float64
float64_array = np.array([1.0, 2.0, 3.0], dtype=np.float64)

# Convert to float
float_array = float64_array.astype(float)

Ensure that this conversion is done in the part of your code where embeddings are prepared before being sent to Pinecone. This should help in preventing the type mismatch error.

To continue talking to Dosu, mention @dosu.

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

2 participants