mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
Enhance skills tool to have an arg so it is more reliably called, and error handling in agent
- Updated the `skills_categories` function to include a `verbose` parameter, allowing users to request skill counts per category. - Modified the `handle_skills_function_call` method to pass the `verbose` argument to `skills_categories`. - Improved error handling in the `AIAgent` class by injecting a recovery message when invalid JSON arguments are detected, guiding users on how to correct their tool calls. - Enhanced the `GatewayRunner` to return a user-friendly error message if the agent fails to generate a final response, improving overall user experience.
This commit is contained in:
parent
221fb17c5e
commit
212460289b
4 changed files with 35 additions and 15 deletions
|
|
@ -349,7 +349,7 @@ def _load_category_description(category_dir: Path) -> Optional[str]:
|
|||
return None
|
||||
|
||||
|
||||
def skills_categories(task_id: str = None) -> str:
|
||||
def skills_categories(verbose: bool = False, task_id: str = None) -> str:
|
||||
"""
|
||||
List available skill categories with descriptions (progressive disclosure tier 0).
|
||||
|
||||
|
|
@ -358,6 +358,7 @@ def skills_categories(task_id: str = None) -> str:
|
|||
or first paragraph to explain what skills are in that category.
|
||||
|
||||
Args:
|
||||
verbose: If True, include skill counts per category (default: False, but currently always included)
|
||||
task_id: Optional task identifier (unused, for API consistency)
|
||||
|
||||
Returns:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue