fix: ensure empty summary model skips compression
Co-authored-by: Fu-Jie <33599649+Fu-Jie@users.noreply.github.com>
This commit is contained in:
@@ -914,11 +914,7 @@ class Filter:
|
|||||||
# 3. Check Token limit and truncate (Max Context Truncation)
|
# 3. Check Token limit and truncate (Max Context Truncation)
|
||||||
# [Optimization] Use the summary model's (if any) threshold to decide how many middle messages can be processed
|
# [Optimization] Use the summary model's (if any) threshold to decide how many middle messages can be processed
|
||||||
# This allows using a long-window model (like gemini-flash) to compress history exceeding the current model's window
|
# This allows using a long-window model (like gemini-flash) to compress history exceeding the current model's window
|
||||||
summary_model_id = (
|
summary_model_id = self.valves.summary_model or body.get("model")
|
||||||
self.valves.summary_model
|
|
||||||
or body.get("model")
|
|
||||||
or "gpt-3.5-turbo"
|
|
||||||
)
|
|
||||||
|
|
||||||
if not summary_model_id:
|
if not summary_model_id:
|
||||||
await self._log(
|
await self._log(
|
||||||
|
|||||||
Reference in New Issue
Block a user