mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-31 19:16:29 +00:00
fix(honcho): reject whitespace-only search/reasoning queries
Strip query before validation; add regression tests (aligns upstream #11192). Made-with: Cursor
This commit is contained in:
parent
8222b16785
commit
af550a7053
2 changed files with 28 additions and 2 deletions
|
|
@ -1437,7 +1437,7 @@ class HonchoMemoryProvider(MemoryProvider):
|
|||
return json.dumps({"result": card})
|
||||
|
||||
elif tool_name == "honcho_search":
|
||||
query = args.get("query", "")
|
||||
query = (args.get("query") or "").strip()
|
||||
if not query:
|
||||
return tool_error("Missing required parameter: query")
|
||||
max_tokens = min(int(args.get("max_tokens", 800)), 2000)
|
||||
|
|
@ -1450,7 +1450,7 @@ class HonchoMemoryProvider(MemoryProvider):
|
|||
return json.dumps({"result": result})
|
||||
|
||||
elif tool_name == "honcho_reasoning":
|
||||
query = args.get("query", "")
|
||||
query = (args.get("query") or "").strip()
|
||||
if not query:
|
||||
return tool_error("Missing required parameter: query")
|
||||
peer = args.get("peer", "user")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue