[feat]allow user to specify collection & embedding table names#106
[feat]allow user to specify collection & embedding table names#106liunux4odoo wants to merge 1 commit intolangchain-ai:mainfrom
Conversation
create multiple vector store pairs for different usage. also some small fix: - remove type annotaion for `EmbeddingStore.embedding` - give default values for `connection_string_from_db_params` - fix bug in `_results_to_docs_and_scores` and other similar methods
|
Thank you for this PR! Unrelated-ish, I guess(?) but what's the difference between a collection and a table? I tried looking it up but everything I found pointed me towards mongodb and their concept of a collection |
In langchain-postgres all vectors are stored in one table named |
|
Got it! Thank you. Can you describe why we might need separate collections when we have separate tables? What's the use-case there then? In a traditional DB we would just have separate tables, no? |
Currently we have separate collections for every vector store in one table, it's convenient to do search across collections (although it does not support this yet). |
|
Ian Quah (@IanQS) This would be of interest to us as well as we would like to have different tables when testing stuff in DEV, without introducing a completely new PostgreSQL DB instance or impacting others working against the same DEV database. |
allow user to specify collection & embedding table names, so user can create multiple vector store pairs for different usage.
also some small fix:
EmbeddingStore.embeddingconnection_string_from_db_params_results_to_docs_and_scoresand other similar methodsexample code: