auto_compact llm request error fixed

This commit is contained in:
bear 2026-03-23 16:54:01 +08:00
parent a9c71002d2
commit 1ffdf3d739
5 changed files with 2 additions and 5 deletions

View file

@ -117,7 +117,6 @@ def auto_compact(messages: list) -> list:
# Replace all messages with compressed summary
return [
{"role": "user", "content": f"[Conversation compressed. Transcript: {transcript_path}]\n\n{summary}"},
{"role": "assistant", "content": "Understood. I have the context from the summary. Continuing."},
]
@ -227,6 +226,7 @@ def agent_loop(messages: list):
if manual_compact:
print("[manual compact]")
messages[:] = auto_compact(messages)
return
if __name__ == "__main__":

View file

@ -255,7 +255,6 @@ def auto_compact(messages: list) -> list:
summary = resp.content[0].text
return [
{"role": "user", "content": f"[Compressed. Transcript: {path}]\n{summary}"},
{"role": "assistant", "content": "Understood. Continuing with summary context."},
]
@ -705,6 +704,7 @@ def agent_loop(messages: list):
if manual_compress:
print("[manual compact]")
messages[:] = auto_compact(messages)
return
# === SECTION: repl ===

View file

@ -81,7 +81,6 @@ def auto_compact(messages: list) -> list:
)
return [
{"role": "user", "content": f"[Compressed]\n\n{response.content[0].text}"},
{"role": "assistant", "content": "Understood. Continuing."},
]
```

View file

@ -81,7 +81,6 @@ def auto_compact(messages: list) -> list:
)
return [
{"role": "user", "content": f"[Compressed]\n\n{response.content[0].text}"},
{"role": "assistant", "content": "Understood. Continuing."},
]
```

View file

@ -81,7 +81,6 @@ def auto_compact(messages: list) -> list:
)
return [
{"role": "user", "content": f"[Compressed]\n\n{response.content[0].text}"},
{"role": "assistant", "content": "Understood. Continuing."},
]
```