Fixed follow up examples for local qa
Browse files
app.py
CHANGED
@@ -113,6 +113,13 @@ async def chat(
|
|
113 |
search_only,
|
114 |
):
|
115 |
print("chat cqa - message received")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
async for event in chat_stream(
|
117 |
agent,
|
118 |
query,
|
@@ -392,6 +399,7 @@ def event_handling(
|
|
392 |
output_language,
|
393 |
new_figures,
|
394 |
current_graphs,
|
|
|
395 |
],
|
396 |
concurrency_limit=8,
|
397 |
api_name=f"chat_{textbox.elem_id}",
|
@@ -427,6 +435,7 @@ def event_handling(
|
|
427 |
output_language,
|
428 |
new_figures,
|
429 |
current_graphs,
|
|
|
430 |
],
|
431 |
concurrency_limit=8,
|
432 |
api_name=f"chat_{examples_hidden.elem_id}",
|
|
|
113 |
search_only,
|
114 |
):
|
115 |
print("chat cqa - message received")
|
116 |
+
# Ensure default values if components are not set
|
117 |
+
audience = audience or "Experts"
|
118 |
+
sources = sources or ["IPCC", "IPBES"]
|
119 |
+
reports = reports or []
|
120 |
+
relevant_content_sources_selection = relevant_content_sources_selection or ["Figures (IPCC/IPBES)"]
|
121 |
+
search_only = bool(search_only) # Convert to boolean if None
|
122 |
+
|
123 |
async for event in chat_stream(
|
124 |
agent,
|
125 |
query,
|
|
|
399 |
output_language,
|
400 |
new_figures,
|
401 |
current_graphs,
|
402 |
+
follow_up_examples.dataset,
|
403 |
],
|
404 |
concurrency_limit=8,
|
405 |
api_name=f"chat_{textbox.elem_id}",
|
|
|
435 |
output_language,
|
436 |
new_figures,
|
437 |
current_graphs,
|
438 |
+
follow_up_examples.dataset,
|
439 |
],
|
440 |
concurrency_limit=8,
|
441 |
api_name=f"chat_{examples_hidden.elem_id}",
|