mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-05-21 00:52:34 +00:00
refactor(litellm): remove redundant comments in cache_control methods
This commit is contained in:
parent
afa0513243
commit
9ffae47c13
@ -117,7 +117,6 @@ class LiteLLMProvider(LLMProvider):
|
|||||||
tools: list[dict[str, Any]] | None,
|
tools: list[dict[str, Any]] | None,
|
||||||
) -> tuple[list[dict[str, Any]], list[dict[str, Any]] | None]:
|
) -> tuple[list[dict[str, Any]], list[dict[str, Any]] | None]:
|
||||||
"""Return copies of messages and tools with cache_control injected."""
|
"""Return copies of messages and tools with cache_control injected."""
|
||||||
# Transform the system message
|
|
||||||
new_messages = []
|
new_messages = []
|
||||||
for msg in messages:
|
for msg in messages:
|
||||||
if msg.get("role") == "system":
|
if msg.get("role") == "system":
|
||||||
@ -131,7 +130,6 @@ class LiteLLMProvider(LLMProvider):
|
|||||||
else:
|
else:
|
||||||
new_messages.append(msg)
|
new_messages.append(msg)
|
||||||
|
|
||||||
# Add cache_control to the last tool definition
|
|
||||||
new_tools = tools
|
new_tools = tools
|
||||||
if tools:
|
if tools:
|
||||||
new_tools = list(tools)
|
new_tools = list(tools)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user