Spaces:
Runtime error
Runtime error
Update kadiApy_ragchain.py
Browse files- kadiApy_ragchain.py +2 -1
kadiApy_ragchain.py
CHANGED
|
@@ -19,13 +19,14 @@ class KadiApyRagchain:
|
|
| 19 |
print("Rewritten Query: ",rewritten_query)
|
| 20 |
# Predict library usage
|
| 21 |
print("Start prediction:")
|
| 22 |
-
code_library_usage_prediction = self.predict_library_usage(query)
|
| 23 |
|
| 24 |
# Retrieve contexts
|
| 25 |
print("Start retrieving:")
|
| 26 |
|
| 27 |
|
| 28 |
code_contexts = self.retrieve_contexts(rewritten_query, k=3, filter={"usage": code_library_usage_prediction})
|
|
|
|
| 29 |
doc_contexts = self.retrieve_contexts(query, k=2, filter={"dataset_category": "kadi_apy_docs"})
|
| 30 |
|
| 31 |
# Format contexts
|
|
|
|
| 19 |
print("Rewritten Query: ",rewritten_query)
|
| 20 |
# Predict library usage
|
| 21 |
print("Start prediction:")
|
| 22 |
+
#code_library_usage_prediction = self.predict_library_usage(query)
|
| 23 |
|
| 24 |
# Retrieve contexts
|
| 25 |
print("Start retrieving:")
|
| 26 |
|
| 27 |
|
| 28 |
code_contexts = self.retrieve_contexts(rewritten_query, k=3, filter={"usage": code_library_usage_prediction})
|
| 29 |
+
code_contexts = self.retrieve_contexts(rewritten_query, k=3, filter={"dataset_category": "kadi_apy_source_code"})
|
| 30 |
doc_contexts = self.retrieve_contexts(query, k=2, filter={"dataset_category": "kadi_apy_docs"})
|
| 31 |
|
| 32 |
# Format contexts
|