- psycopg2.errors.FeatureNotSupported: extension “vector” is not available
默认的pg镜像不带有向量扩展,可选择另一个镜像
1docker run --name postgres-vector -p 25432:5432 -e POSTGRES_PASSWORD=postgres -d pgvector/pgvector:pg16
然后进入psql,执行
12\c dify或你自己的数据库名称CREATE EXTENSION "vector"; - ImportError: cannot import name ‘default_tfidf’ from ‘jieba.analyse’
1poetry run python -m pip install jieba --upgrade --force-reinstall - indexing_status始终为waiting即文档处于排队中的状态,注意要开启异步任务:
1poetry run python -m celery -A app.celery worker -P gevent -c 1 --loglevel INFO -Q dataset,generation,mail,ops_trace,app_deletion - psycopg2.errors.InsufficientPrivilege: permission denied to create extension “vector”
HINT: Must be superuser to create this extension.
如提示所述,需要将用户权限设置为超级管理员