mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
refactor: enhance API interaction and message handling in AIAgent
- Introduced new methods in run_agent.py for building API keyword arguments and normalizing assistant messages from API responses. - Added functionality for compressing conversation context and managing session state in SQLite. - Improved tool call execution handling, including enhanced logging and error management. - Updated path handling in multiple platform files to utilize pathlib for better compatibility and readability.
This commit is contained in:
parent
7ee7221af1
commit
ecb430effe
6 changed files with 351 additions and 401 deletions
|
|
@ -24,7 +24,8 @@ except ImportError:
|
|||
AsyncWebClient = Any
|
||||
|
||||
import sys
|
||||
sys.path.insert(0, str(__file__).rsplit("/", 3)[0])
|
||||
from pathlib import Path as _Path
|
||||
sys.path.insert(0, str(_Path(__file__).resolve().parents[2]))
|
||||
|
||||
from gateway.config import Platform, PlatformConfig
|
||||
from gateway.platforms.base import (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue