Spaces:
Paused
Paused
Correction affichage images : analyse sur prompt utilisateur, search_query intelligent
Browse files
main.py
CHANGED
|
@@ -529,9 +529,9 @@ if prompt := st.chat_input("Posez votre question..."):
|
|
| 529 |
with st.chat_message("assistant", avatar="kibali_logo.svg"):
|
| 530 |
response = st.write_stream(generate_response_stream(prompt, geo, thinking_mode, st.session_state.messages))
|
| 531 |
if thinking_mode:
|
| 532 |
-
reflection_result = execute_reflection_plan(
|
| 533 |
if reflection_result.get("strategy", {}).get("use_web", False):
|
| 534 |
-
search_query = f"{
|
| 535 |
search_results = web_search(search_query)
|
| 536 |
images = [img for result in search_results.get("results", []) for img in result.get("images", [])]
|
| 537 |
else:
|
|
|
|
| 529 |
with st.chat_message("assistant", avatar="kibali_logo.svg"):
|
| 530 |
response = st.write_stream(generate_response_stream(prompt, geo, thinking_mode, st.session_state.messages))
|
| 531 |
if thinking_mode:
|
| 532 |
+
reflection_result = execute_reflection_plan(prompt, geo) # Analyser la question utilisateur
|
| 533 |
if reflection_result.get("strategy", {}).get("use_web", False):
|
| 534 |
+
search_query = f"{prompt[:50]} {reflection_result.get('strategy', {}).get('search_query_suffix', '')}".strip()
|
| 535 |
search_results = web_search(search_query)
|
| 536 |
images = [img for result in search_results.get("results", []) for img in result.get("images", [])]
|
| 537 |
else:
|