mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 04:15:25 +00:00
refac: web search queries
This commit is contained in:
parent
bb06df80a2
commit
dec9dd1ac0
1 changed files with 5 additions and 0 deletions
|
|
@ -340,6 +340,11 @@ async def chat_web_search_handler(
|
||||||
log.exception(e)
|
log.exception(e)
|
||||||
queries = [user_message]
|
queries = [user_message]
|
||||||
|
|
||||||
|
# Check if generated queries are empty
|
||||||
|
if len(queries) == 1 and queries[0].strip() == "":
|
||||||
|
queries = [user_message]
|
||||||
|
|
||||||
|
# Check if queries are not found
|
||||||
if len(queries) == 0:
|
if len(queries) == 0:
|
||||||
await event_emitter(
|
await event_emitter(
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue