bupa1018 commited on
Commit
a7e724a
·
1 Parent(s): 9575a3a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
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, kadiAPY_code_documents = rag_chain.retrieve_contexts(query, code_library_usage_prediction)
 
 
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