prompt template from db

This commit is contained in:
Matteo Rosati
2026-02-18 16:09:31 +01:00
parent b64e97c9d0
commit 3c6c367600
6 changed files with 36 additions and 108 deletions

View File

@@ -20,6 +20,7 @@ MAX_OUTPUT_TOKENS = 65535
class RagChain:
def __init__(
self,
question_template: str,
top_k: int,
top_p: float,
temperature: float,
@@ -32,8 +33,8 @@ class RagChain:
self.retriever_max_docs = retriever_max_docs
self.reranker_max_results = reranker_max_results
with open("prompt.md") as f:
question_template = f.read()
# with open("prompt.md") as f:
# question_template = f.read()
with open("question_rewrite_prompt.md") as f:
question_rewrite_template = f.read()