-
Notifications
You must be signed in to change notification settings - Fork 94
Add PostgreSQL vector store support with pgvector and Add config to Setting #96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Thank you for this PR and for your interest in RAGLight You’re definitely on the right track to add PostgreSQL vector store support, but a few key pieces are still missing :
You can check how existing vector stores are registered and used throughout the repo to guide you. |
src/raglight/config/settings.py
Outdated
| ) | ||
|
|
||
| CHROMA = "Chroma" | ||
| POSTGRE = "Postgre" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd argue that PostgreSQL is more often referred as Postgres
…ostgres_vector_store.py
|
I’ve updated the PR based on your feedback. Let me know if anything else needs adjustment. |
|
Hello, sorry for the delay. from raglight.rag.simple_rag_api import RAGPipeline
from raglight.models.data_source_model import FolderSource, GitHubSource
from raglight.config.settings import Settings
from raglight.config.rag_config import RAGConfig
from raglight.config.vector_store_config import VectorStoreConfig
Settings.setup_logging()
knowledge_base=[
FolderSource(path="<path to your folder with pdf>/knowledge_base"),
GitHubSource(url="https://github.com/Bessouat40/RAGLight")
]
vector_store_config = VectorStoreConfig(
embedding_model = Settings.DEFAULT_EMBEDDINGS_MODEL,
provider=Settings.HUGGINGFACE,
# api_base = ... # If you have a custom client URL
database=Settings.POSTGRES,
persist_directory = './defaultDb',
password = "mysecretpassword"
)
config = RAGConfig(
llm = Settings.DEFAULT_LLM,
provider = Settings.OLLAMA,
# api_base = ... # If you have a custom client URL
# k = Settings.DEFAULT_K,
# cross_encoder_model = Settings.DEFAULT_CROSS_ENCODER_MODEL,
# system_prompt = Settings.DEFAULT_SYSTEM_PROMPT,
# knowledge_base = knowledge_base
)
pipeline = RAGPipeline(config, vector_store_config)
pipeline.build()
response = pipeline.generate("How can I create an easy RAGPipeline using raglight framework ? Give me python implementation")
print(response)I've got this error : I've you tried your code before creating this PR ? I think it does'nt works. |
|
And you need to implement |
This pull request introduces PostgreSQL vector store integration for RAGLight.
It allows storing and retrieving embeddings directly from a PostgreSQL database using the pgvector extension.
"pip install langchain-postgres "