Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
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 |
|