mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-10 22:41:41 +00:00
fix: do a deep copy instead
This commit is contained in:
parent
cef60a19ed
commit
0c2aaee2c7
1 changed files with 2 additions and 1 deletions
|
|
@ -5,6 +5,7 @@ Summarizes conversation history when input tokens exceed a configured threshold,
|
|||
using the same model the caller is already using. Works across all providers.
|
||||
"""
|
||||
|
||||
import copy
|
||||
import re
|
||||
from typing import Any, Dict, List, Optional, Tuple
|
||||
|
||||
|
|
@ -127,7 +128,7 @@ async def maybe_compact_context(
|
|||
if custom_llm_provider is not None:
|
||||
acompletion_kwargs["custom_llm_provider"] = custom_llm_provider
|
||||
if litellm_metadata is not None:
|
||||
acompletion_kwargs["metadata"] = {**litellm_metadata}
|
||||
acompletion_kwargs["metadata"] = copy.deepcopy(litellm_metadata)
|
||||
|
||||
summary_response = await litellm.acompletion(**acompletion_kwargs)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue