Spaces:
Sleeping
Sleeping
Update app.py
Browse files150 unmodified lines151152153154155156157158159160161162163164165166167150 unmodified lines# wait up to 1s for snippets, then replace debug with themif enable_search:thread_search.join(timeout=float(search_timeout))if search_results:debug = "### Search results merged into prompt\n\n" + "\n".join(f"- {r}" for r in search_results)else:debug = "*No web search results found.*"# merge fetched snippets into the system promptif search_results:enriched = system_prompt.strip() + "\n\nRelevant context:\n" + "\n".join(search_results)else:enriched = system_promptelse:enriched = system_prompt150 unmodified lines151152153154155156157158159160161162163150 unmodified lines# wait up to 1s for snippets, then replace debug with themif enable_search:thread_search.join(timeout=float(search_timeout))if len(search_results) > 0:debug = "### Search results merged into prompt\n\n" + "\n".join(f"- {r}" for r in search_results)system_prompt.strip() + "\n\nRelevant context:\n" + "\n".join(search_results)else:debug = "*No web search results found.*"enriched = system_promptelse:enriched = system_prompt
app.py+2-6