bupa1018 commited on
Commit
6942698
·
1 Parent(s): 1ace9a6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -8
app.py CHANGED
@@ -332,15 +332,14 @@ def rag_workflow(query):
332
  rewritten_query_response = llm.invoke("Hello")
333
  rewritten_query = rewritten_query_response.content.strip()
334
 
335
- #kadi_apy_docs = retrieve_within_kadiApy_docs (vector_store, query, k = 5)
336
- #kadi_apy_library_docs = retrieve_within_kadiApy_library (vector_store, query, k = 10)
337
-
338
- #print(doc_context)
339
- #print("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA:",code_context)
340
-
341
-
342
- prompt = f"The query is: '{query}'. What type of metadata applies to this query? Options: python library, python cli library, command line interface."
343
  metadata_prediction = llm.predict(prompt)
 
344
  print("METADATA PREDICTION -------------------------:", metadata_prediction)
345
  print(metadata_prediction)
346
 
 
332
  rewritten_query_response = llm.invoke("Hello")
333
  rewritten_query = rewritten_query_response.content.strip()
334
 
335
+ prompt = (
336
+ f"The query is: '{query}'. "
337
+ "Based on this query, choose the most appropriate option from the following: "
338
+ "'python library', 'python cli library', 'command line interface'. "
339
+ "Respond only with one of these options—do not add any additional text or commentary."
340
+ )
 
 
341
  metadata_prediction = llm.predict(prompt)
342
+
343
  print("METADATA PREDICTION -------------------------:", metadata_prediction)
344
  print(metadata_prediction)
345