pgvector / pgvector-node

pgvector support for Node.js, Deno, and Bun (and TypeScript)
MIT License
303 stars 9 forks source link

How to get this to work with Sequelize? #19

Closed petterthowsen closed 4 months ago

petterthowsen commented 4 months ago
async up (queryInterface, Sequelize) {
    pgvector.registerType(Sequelize);

    await queryInterface.addColumn('Memories', 'embeddings', Sequelize.VECTOR(384));
  },

The above generates: ERROR: Sequelize.VECTOR is not a function

ankane commented 4 months ago

Hi @petterthowsen, VECTOR is defined on Sequelize.DataTypes (like other data types).

petterthowsen commented 4 months ago

Oh god, hahaha! Oh well, we've all been there 🤭