Spaces:
Runtime error
Runtime error
Update rag.py
Browse files- app/rag.py +2 -1
app/rag.py
CHANGED
@@ -21,9 +21,10 @@ class ChatPDF:
|
|
21 |
temperature=0,
|
22 |
num_predict=512,
|
23 |
repeat_penalty=1.3,
|
|
|
24 |
)
|
25 |
|
26 |
-
self.text_splitter = RecursiveCharacterTextSplitter(chunk_size=
|
27 |
self.prompt = PromptTemplate.from_template(
|
28 |
"""
|
29 |
<|im_start|> You are an assistant for question-answering tasks. Use the following pieces of retrieved context to
|
|
|
21 |
temperature=0,
|
22 |
num_predict=512,
|
23 |
repeat_penalty=1.3,
|
24 |
+
repeat_last_n=-1
|
25 |
)
|
26 |
|
27 |
+
self.text_splitter = RecursiveCharacterTextSplitter(chunk_size=1024, chunk_overlap=64)
|
28 |
self.prompt = PromptTemplate.from_template(
|
29 |
"""
|
30 |
<|im_start|> You are an assistant for question-answering tasks. Use the following pieces of retrieved context to
|