We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It would be nice to be able to send an embedding vector directly to PostgreSQL without having to serialize it into a string first.
// Example with Transformers.js library and PGVector extension const transformers = await import('@xenova/transformers'); const similarityEmbedder = await transformers.pipeline('feature-extraction', 'Xenova/paraphrase-MiniLM-L6-v2'); const result = await similarityEmbedder(text, { pooling: 'mean', normalize: true }); const embedding = '[' + [...result.data].join(',') + ']'; // Please get rid of this step so we can send the Float32Array directly await client.query( `INSERT INTO post_embedding (post_id, embedding) VALUES ($1, $2)`, [postID, embedding]);
The text was updated successfully, but these errors were encountered:
No branches or pull requests
It would be nice to be able to send an embedding vector directly to PostgreSQL without having to serialize it into a string first.
The text was updated successfully, but these errors were encountered: