Skip to content

Commit

Permalink
Anthropic tools + refactoring (#1300)
Browse files Browse the repository at this point in the history
  • Loading branch information
anakin87 authored Jan 17, 2025
1 parent 4e2241a commit 42ac5ca
Show file tree
Hide file tree
Showing 6 changed files with 1,142 additions and 338 deletions.
2 changes: 1 addition & 1 deletion integrations/anthropic/example/prompt_caching.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def stream_callback(chunk: StreamingChunk) -> None:
)

if ENABLE_PROMPT_CACHING:
system_message.meta["cache_control"] = {"type": "ephemeral"}
system_message._meta["cache_control"] = {"type": "ephemeral"}

questions = [
"What's this paper about?",
Expand Down
3 changes: 2 additions & 1 deletion integrations/anthropic/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ classifiers = [
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
dependencies = ["haystack-ai", "anthropic"]
dependencies = ["haystack-ai>=2.9.0", "anthropic"]

[project.urls]
Documentation = "https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/anthropic#readme"
Expand All @@ -48,6 +48,7 @@ dependencies = [
"pytest",
"pytest-rerunfailures",
"haystack-pydoc-tools",
"jsonschema", # needed for Tool
]
[tool.hatch.envs.default.scripts]
test = "pytest {args:tests}"
Expand Down
Loading

0 comments on commit 42ac5ca

Please sign in to comment.