mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2026-01-29 20:04:30 +01:00
Remove quotes from LLM-generated websearch query (closes #7045).
Fix by @Quiet-Joker
This commit is contained in:
parent
977ec801b7
commit
d47c8eb956
|
|
@ -604,7 +604,12 @@ def generate_search_query(user_message, state):
|
|||
|
||||
query = ""
|
||||
for reply in generate_reply(formatted_prompt, search_state, stopping_strings=[], is_chat=True):
|
||||
query = reply.strip()
|
||||
query = reply
|
||||
|
||||
# Strip and remove surrounding quotes if present
|
||||
query = query.strip()
|
||||
if len(query) >= 2 and query.startswith('"') and query.endswith('"'):
|
||||
query = query[1:-1]
|
||||
|
||||
return query
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue