Skip to content
Snippets Groups Projects
Unverified Commit aa192413 authored by Nicholas Albion's avatar Nicholas Albion Committed by GitHub
Browse files

[anthropic] allow caching of tool results (#18028)

parent 23fe88cd
Branches
Tags
No related merge requests found
...@@ -154,6 +154,7 @@ def messages_to_anthropic_messages( ...@@ -154,6 +154,7 @@ def messages_to_anthropic_messages(
tool_use_id=message.additional_kwargs["tool_call_id"], tool_use_id=message.additional_kwargs["tool_call_id"],
type="tool_result", type="tool_result",
content=[TextBlockParam(text=message.content, type="text")], content=[TextBlockParam(text=message.content, type="text")],
cache_control=message.additional_kwargs.get("cache_control"),
) )
anth_message = MessageParam( anth_message = MessageParam(
role=MessageRole.USER.value, role=MessageRole.USER.value,
......
...@@ -27,7 +27,7 @@ exclude = ["**/BUILD"] ...@@ -27,7 +27,7 @@ exclude = ["**/BUILD"]
license = "MIT" license = "MIT"
name = "llama-index-llms-anthropic" name = "llama-index-llms-anthropic"
readme = "README.md" readme = "README.md"
version = "0.6.8" version = "0.6.9"
[tool.poetry.dependencies] [tool.poetry.dependencies]
python = ">=3.9,<4.0" python = ">=3.9,<4.0"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment