Update app.py
Browse files
app.py
CHANGED
@@ -121,7 +121,7 @@ print("check3A")
|
|
121 |
|
122 |
def talk(prompt,history):
|
123 |
k = 1 # number of retrieved documents
|
124 |
-
scores , retrieved_documents = search(prompt, k) # get retrival scores and examples in dictionary format based on the
|
125 |
formatted_prompt = format_prompt(prompt,retrieved_documents,k) # create a new prompt using the retrieved documents
|
126 |
formatted_prompt = formatted_prompt[:400] # to avoid memory issue
|
127 |
messages = [{"role":"system","content":SYS_PROMPT},{"role":"user","content":formatted_prompt}] # binding the system context and new prompt for LLM
|
|
|
121 |
|
122 |
def talk(prompt,history):
|
123 |
k = 1 # number of retrieved documents
|
124 |
+
scores , retrieved_documents = search(prompt, k) # get retrival scores and examples in dictionary format based on the prompt passed
|
125 |
formatted_prompt = format_prompt(prompt,retrieved_documents,k) # create a new prompt using the retrieved documents
|
126 |
formatted_prompt = formatted_prompt[:400] # to avoid memory issue
|
127 |
messages = [{"role":"system","content":SYS_PROMPT},{"role":"user","content":formatted_prompt}] # binding the system context and new prompt for LLM
|