Merge pull request #1306 from NousResearch/hermes/hermes-2ba57c8a
fix: backfill model on gateway sessions after agent runs
This commit is contained in:
commit
917adcbaf4
5 changed files with 54 additions and 7 deletions
|
|
@ -594,6 +594,7 @@ class SessionStore:
|
|||
input_tokens: int = 0,
|
||||
output_tokens: int = 0,
|
||||
last_prompt_tokens: int = None,
|
||||
model: str = None,
|
||||
) -> None:
|
||||
"""Update a session's metadata after an interaction."""
|
||||
self._ensure_loaded()
|
||||
|
|
@ -611,7 +612,8 @@ class SessionStore:
|
|||
if self._db:
|
||||
try:
|
||||
self._db.update_token_counts(
|
||||
entry.session_id, input_tokens, output_tokens
|
||||
entry.session_id, input_tokens, output_tokens,
|
||||
model=model,
|
||||
)
|
||||
except Exception as e:
|
||||
logger.debug("Session DB operation failed: %s", e)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue