mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-10-22 06:09:59 +00:00
compacting resets usage counters
This commit is contained in:
parent
c496d2d1a8
commit
f7930b00a5
1 changed files with 2 additions and 1 deletions
|
|
@ -2295,7 +2295,7 @@ def run_agent(
|
|||
continue
|
||||
try:
|
||||
with Throbber("Summarizing session"):
|
||||
summary, last_usage = compact_session(
|
||||
summary, _ = compact_session(
|
||||
messages, base_url, api_key, model, temperature,
|
||||
max_tokens, request_timeout,
|
||||
)
|
||||
|
|
@ -2306,6 +2306,7 @@ def run_agent(
|
|||
{"role": "system", "content": system_prompt(disabled_tools)},
|
||||
{"role": "assistant", "content": f"Summary of the earlier session:\n{summary}"},
|
||||
]
|
||||
last_usage = None
|
||||
print(f"Session compacted:\n{summary}\n")
|
||||
continue
|
||||
if command == "/workdir":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue