Module: Gerd/rag_frontend.py#57
Conversation
mouayadkarimeh
left a comment
There was a problem hiding this comment.
so much files mistakly lands on the same PR. trying to remove alle this but too much komplex . the main commit it the last one
create new module rag_frontend.py: b700c29 -2 hours ago
b700c29 to
4b5d952
Compare
mouayadkarimeh
left a comment
There was a problem hiding this comment.
committed eliminated successfully. ready to review
| minimum=1, maximum=10, step=1, value=3, label="Number of Sources" | ||
| ) | ||
| strategy_dropdown = gr.Dropdown( | ||
| choices=["similarity", "mmr"], |
There was a problem hiding this comment.
I think there is another strategy in Faiss
…ce and update model handling in RAG frontend to synchronize the update of qa_service
…bility of the different models.
|
|
||
| model_kwargs = config.extra_kwargs or {} | ||
| model_kwargs = dict(config.extra_kwargs or {}) | ||
| model_kwargs.pop("enable_thinking", None) |
There was a problem hiding this comment.
Why would you delete those entries? If you would left them here, these would trigger the Not Implemented error below instead of quietly being ignored...
|
|
||
| import requests | ||
| For OpenAI-compatible endpoints, the request follows the OpenAI API format. | ||
| For llama.cpp endpoints, the request follows the llama.cpp server API format. |
There was a problem hiding this comment.
Have you tested both llama.cpp and other endpoints?
| from langchain_community.document_loaders import PyPDFLoader, TextLoader | ||
| from langchain_text_splitters import RecursiveCharacterTextSplitter | ||
|
|
||
| # from gerd.benchmark import make_prompt |
There was a problem hiding this comment.
Please remove comments like this
| if "qwen3.5" in _CURRENT_MODEL.lower(): | ||
| qa_config.model.endpoint = ModelEndpoint( | ||
| url="http://localhost:8000", | ||
| type="openai", | ||
| key=None, | ||
| ) |
There was a problem hiding this comment.
Why would you manually override the config here?
| qa_config.model.endpoint = None | ||
| qa_config.embedding.chunk_size = chunk_size | ||
| qa_config.embedding.chunk_overlap = chunk_overlap | ||
| TRANSPORTER.reinit_qa_service(qa_config) |
There was a problem hiding this comment.
Although you use the reinit_qa_service here, the parameters for the chunk_size and overlap are not set in the base class (just tested it). So recheck the implementation in QA_Service







Overview
This PR introduces a new module
rag_frontend.py, which provides a frontend interface for interacting with LLMs using a Retrieval-Augmented Generation (RAG) pipeline.Features
/no_thinkparameterqwen2.5-0.5B-instructqwen3-0.6BWork in Progress