Closed msj121 closed 9 months ago
Should be an array already. If not, from your example, you can just do Object.values(data)
to get it.
Just to be sure, I am using the code like this let vector = await this.embedder.queryEmbed(query);
Yah, currently I am using Object.values just seemed a little inefficient for the server (since it loops through each value), but I hear you. Thanks. Great package btw.
Is there a way you can return a vector as an array instead of an object.
ie: instead of {"0":0.9823,"1":0.234....} I'd like [0.9823,0.234...]
Perhaps an argument or utility function? Is that at all possible currently?