Spaces:
Runtime error
Runtime error
Chintan Donda
commited on
Commit
•
35c01e8
1
Parent(s):
c8e892f
Retrieve top 3 similar docs from Relevant paras to extract answer
Browse files- src/langchain_utils.py +2 -2
src/langchain_utils.py
CHANGED
@@ -213,7 +213,7 @@ class LANGCHAIN_UTILS:
|
|
213 |
)
|
214 |
|
215 |
# Search for the similar docs
|
216 |
-
docs = docsearch.similarity_search(question, k=
|
217 |
|
218 |
llm = OpenAI(temperature=0)
|
219 |
# Create a Chain for question answering
|
@@ -947,7 +947,7 @@ class LANGCHAIN_UTILS:
|
|
947 |
'question': question,
|
948 |
'answer': answer,
|
949 |
'feedback': feedback,
|
950 |
-
'timestamp': datetime.strftime(datetime.now(), '%Y-%m-%d %H:%M:%S')
|
951 |
}
|
952 |
|
953 |
# Save df into TSV format
|
|
|
213 |
)
|
214 |
|
215 |
# Search for the similar docs
|
216 |
+
docs = docsearch.similarity_search(question, k=3)
|
217 |
|
218 |
llm = OpenAI(temperature=0)
|
219 |
# Create a Chain for question answering
|
|
|
947 |
'question': question,
|
948 |
'answer': answer,
|
949 |
'feedback': feedback,
|
950 |
+
'timestamp': datetime.strftime(datetime.now(), '%Y-%m-%d %H:%M:%S.%f')[:-3]
|
951 |
}
|
952 |
|
953 |
# Save df into TSV format
|