Anush008 / fastembed-js

Library to generate vector embeddings in NodeJS
https://www.npmjs.com/package/fastembed/
MIT License
66 stars 5 forks source link

Type Error #22

Open hadupa opened 5 hours ago

hadupa commented 5 hours ago

I'm using this as an alternative to qdrant python and am using it as an example. Unfortunately, when I try this I keep getting a typeError when sending to qdrant. I went into the code with my debugger and discovered that this code is creating a different object than qdrant's python does.

For example, I am currently getting this error:

Error: Expected value of type vector but got undefined.

Is this an error in the code or in my implementation?

Anush008 commented 5 hours ago

Can you log the return value from FastEmbed-js?

hadupa commented 4 hours ago

Sure thing, here it is along with the error:

Received POST request for /fastembed TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator)) { message: 'hey wake up now', embedding: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 284 more items ] }

Anush008 commented 4 hours ago

I mean if the return value from the embed() method of FastEmbed-js is running fine, it must be something else in your code that's causing this.