-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
36 lines (31 loc) · 1.19 KB
/
config.py
File metadata and controls
36 lines (31 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import os
# from colbert import RAGPretrainedModel
# Set SERVER_IP to the value from the .env file or default to 'localhost'
SERVER_IP = os.getenv('SERVER_IP', 'localhost')
FAISS_INDEX = "indexes/faiss_index"
READER_MODEL = "HuggingFaceH4/zephyr-7b-beta"
EMBEDDING_MODEL = "sentence-transformers/all-MiniLM-L12-v2"
# RERANKER_MODEL = RAGPretrainedModel.from_pretrained("colbert-ir/colbertv2.0")
PROMPT_TEMPLATE = [
{
"role": "system",
"content": """Using the information contained in the context,
give a comprehensive answer to the question.
Respond only to the question asked, response should be
concise and relevant to the question.
Answer in terms the average person with no technical
background can easily understand.
Provide the number of the source document when relevant.
If the answer cannot be deduced from the context,
tell the user that there is nothing within the context
that can be used to answer the question.""",
},
{
"role": "user",
"content": """Context
{context}
---
Now here is the question you need to answer.
Question: {question}""",
},
]