Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -109,8 +109,10 @@ def rag_workflow(query):
|
|
| 109 |
print(f"Predicted library usage: {code_library_usage_prediction}")
|
| 110 |
|
| 111 |
|
| 112 |
-
# Step 2: Retrieve contexts (documents and code snippets)
|
| 113 |
-
kadiAPY_doc_documents
|
|
|
|
|
|
|
| 114 |
print("Retrieved Document Contexts:", kadiAPY_doc_documents)
|
| 115 |
print("Retrieved Code Contexts:", kadiAPY_code_documents)
|
| 116 |
|
|
|
|
| 109 |
print(f"Predicted library usage: {code_library_usage_prediction}")
|
| 110 |
|
| 111 |
|
| 112 |
+
# Step 2: Retrieve contexts (documents and code snippets)
|
| 113 |
+
kadiAPY_doc_documents = rag_chain.retrieve_contexts(query, k = 3, {"usage: doc"})
|
| 114 |
+
kadiAPY_code_documents =rag_chain.retrieve_contexts(rewritten_query, k = 3, {"usage": library_usage_prediction} )
|
| 115 |
+
|
| 116 |
print("Retrieved Document Contexts:", kadiAPY_doc_documents)
|
| 117 |
print("Retrieved Code Contexts:", kadiAPY_code_documents)
|
| 118 |
|