Update app.py
Browse files
app.py
CHANGED
@@ -45,8 +45,8 @@ else:
|
|
45 |
]
|
46 |
|
47 |
text_splitter = RecursiveCharacterTextSplitter(
|
48 |
-
chunk_size=
|
49 |
-
chunk_overlap=
|
50 |
add_start_index=True,
|
51 |
strip_whitespace=True,
|
52 |
separators=["\n\n", "\n", ".", " ", ""],
|
@@ -199,7 +199,7 @@ def respond(
|
|
199 |
flash_attn=False,
|
200 |
n_gpu_layers=0,
|
201 |
n_batch=8,
|
202 |
-
n_ctx=
|
203 |
n_threads=2,
|
204 |
n_threads_batch=2,
|
205 |
)
|
@@ -207,7 +207,7 @@ def respond(
|
|
207 |
provider = LlamaCppPythonProvider(llm)
|
208 |
|
209 |
query = to_query(provider,message)
|
210 |
-
|
211 |
text = retriever_tool(query=f"{query}")
|
212 |
|
213 |
retriever_system="""
|
|
|
45 |
]
|
46 |
|
47 |
text_splitter = RecursiveCharacterTextSplitter(
|
48 |
+
chunk_size=1000,
|
49 |
+
chunk_overlap=50,
|
50 |
add_start_index=True,
|
51 |
strip_whitespace=True,
|
52 |
separators=["\n\n", "\n", ".", " ", ""],
|
|
|
199 |
flash_attn=False,
|
200 |
n_gpu_layers=0,
|
201 |
n_batch=8,
|
202 |
+
n_ctx=2048,
|
203 |
n_threads=2,
|
204 |
n_threads_batch=2,
|
205 |
)
|
|
|
207 |
provider = LlamaCppPythonProvider(llm)
|
208 |
|
209 |
query = to_query(provider,message)
|
210 |
+
print(f"from {message} to {query}")
|
211 |
text = retriever_tool(query=f"{query}")
|
212 |
|
213 |
retriever_system="""
|