danny-avila / rag_api

ID-based RAG FastAPI: Integration with Langchain and PostgreSQL/pgvector
https://librechat.ai/
MIT License
252 stars 105 forks source link

🚀 feat: Add Qdrant Vector Database #29

Closed walbercardoso closed 1 week ago

walbercardoso commented 5 months ago

Add qdrant vector store to improve vectors database

walbercardoso commented 5 months ago

For some functions it is not necessary to use run_in_executor, since there are async functions in langchain for qdrant.

walbercardoso commented 5 months ago

@danny-avila I would appreciate it if you could take a look at the implementation and let me know if everything is ok.

walbercardoso commented 5 months ago

New variables need to be add at the .env

QDRANT_API_KEY=

QDRANT_HOST=

VECTOR_DB= #qdrant or pgvector (default if not `provided)` 

COLLECTION_NAME=

EMBEDDINGS_DIMENSION=
walbercardoso commented 5 months ago

Can you please check this if it need some change? If it's ok I'm planning to add other vector stores

danny-avila commented 4 months ago

there are some conflicts due to the mongodb atlas merge

walbercardoso commented 4 months ago

No problem. I can fix that.

walbercardoso commented 4 months ago

@danny-avila Conflicts removed. Can you check it again?

danny-avila commented 4 months ago

@danny-avila Conflicts removed. Can you check it again?

hi @walbercardoso there are some new conflicts. I've added enums to help manage the addition of vector stores. Also, I would like to see all routes working with screenshots and configuration settings for your setup, because the last addition of a vector store does not seem fully functional.

Thanks

walbercardoso commented 4 months ago

hi @danny-avila . Conflicts have been fixed.

Some screenshots:

Embed:

image

Route image

Qdrant dash: image

Delete attach file before starting query: image

Route: image

Query doc:

image

Route: image

Delete file: image

Route: image

walbercardoso commented 4 months ago

Configuration params at .env

QDRANT_API_KEY=

QDRANT_HOST=""

VECTOR_DB_TYPE="qdrant"

QDRANT_VECTOR_COLLECTION="test"

QDRANT_EMBEDDINGS_DIMENSION=768
walbercardoso commented 4 months ago

Please let me know if this is enough

danny-avila commented 1 week ago

Replacing with https://github.com/danny-avila/rag_api/pull/73