这是indexloc提供的服务,不要输入任何密码
Skip to content

[BUG]: PG Vector Embedding Error (type "vector" does not exist) #4429

@angelplusultra

Description

@angelplusultra

How are you running AnythingLLM?

All versions

What happened?

After setting the vector database to PG Vector and attempting to vectorize a document, I get this error:

Image

This is happening because by default, a PG database w/ PG Vector does not have the plugin enabled. It must be explicit enabled with the SQL command CREATE EXTENSION vector

Potential Fix:

When attempting to embed a document, first run a CREATE EXTENSION IF NOT EXISTS vector SQL command to ensure the PG Vector plugin is enabled on their database before proceeding.

createTableIfNotExists: async function (connection, dimensions = 384) {
this.log(`Creating embedding table with ${dimensions} dimensions`);
await connection.query(this.createTableSql(dimensions));
return true;
},

Are there known steps to reproduce?

No response

Metadata

Metadata

Labels

core-team-onlypossible bugBug was reported but is not confirmed or is unable to be replicated.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions