Spaces:
Runtime error
Runtime error
Update kadiApy_ragchain.py
Browse files- kadiApy_ragchain.py +5 -3
kadiApy_ragchain.py
CHANGED
|
@@ -39,12 +39,14 @@ class KadiApyRagchain:
|
|
| 39 |
|
| 40 |
# Format contexts
|
| 41 |
print("Formatting docs:")
|
| 42 |
-
|
| 43 |
-
|
|
|
|
| 44 |
|
| 45 |
# Generate response
|
| 46 |
print("Start generatin repsonsse:")
|
| 47 |
-
|
|
|
|
| 48 |
|
| 49 |
# Add the response to the existing query in the conversation history
|
| 50 |
#self.add_to_conversation(llm_response=response)
|
|
|
|
| 39 |
|
| 40 |
# Format contexts
|
| 41 |
print("Formatting docs:")
|
| 42 |
+
# formatted_doc_contexts = self.format_documents(doc_contexts)
|
| 43 |
+
# formatted_code_contexts = self.format_documents(code_contexts)
|
| 44 |
+
formatted_contexts = self.format_documents(context)
|
| 45 |
|
| 46 |
# Generate response
|
| 47 |
print("Start generatin repsonsse:")
|
| 48 |
+
# response = self.generate_response(query, chat_history, formatted_doc_contexts, formatted_code_contexts)
|
| 49 |
+
response = self.generate_response(query, chat_history, context)
|
| 50 |
|
| 51 |
# Add the response to the existing query in the conversation history
|
| 52 |
#self.add_to_conversation(llm_response=response)
|