Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -16,13 +16,15 @@ def full_chat_pipeline(user_query, openai_key):
|
|
16 |
|
17 |
# Step 2: Format prompt with detected intent
|
18 |
loaded_texts = load_intent_texts(intents, get_txt_files)
|
19 |
-
|
|
|
|
|
20 |
context_str = '\n\n'.join(f"{k}:\n{v}" for k, v in loaded_texts.items())
|
21 |
formatted_prompt = f'''
|
22 |
|
23 |
User query: {user_query}
|
24 |
|
25 |
-
Selected Intents: {
|
26 |
|
27 |
Context: {context_str}
|
28 |
|
|
|
16 |
|
17 |
# Step 2: Format prompt with detected intent
|
18 |
loaded_texts = load_intent_texts(intents, get_txt_files)
|
19 |
+
#selected_intents = ', '.join(intents.get("intents", []))
|
20 |
+
selected_intent_description = load_intent_description(intents.get("intents", [])
|
21 |
+
print(selected_intent_description)
|
22 |
context_str = '\n\n'.join(f"{k}:\n{v}" for k, v in loaded_texts.items())
|
23 |
formatted_prompt = f'''
|
24 |
|
25 |
User query: {user_query}
|
26 |
|
27 |
+
Selected Intents: {selected_intent_description}
|
28 |
|
29 |
Context: {context_str}
|
30 |
|