Skip to content

Commit 46c3025

Browse files
remove anthropic from package contents and tests
1 parent 1bf7414 commit 46c3025

File tree

4 files changed

+8
-52
lines changed

4 files changed

+8
-52
lines changed

poetry.lock

Lines changed: 1 addition & 43 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ types-redis = "^4.6.0.20241004"
3838
aioconsole = "^0.8.1"
3939
langchain-openai = "^0.3.2"
4040
testcontainers = "^4.9.1"
41-
langchain-anthropic = "^0.3.5"
4241
isort = "^6.0.0"
4342
cryptography = { version = ">=44.0.1", markers = "python_version > '3.9.1'" }
4443

tests/test_async_store.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
from typing import Any, AsyncGenerator, Dict, Sequence, cast
44

55
import pytest
6-
from langchain_anthropic import ChatAnthropic
76
from langchain_core.messages import BaseMessage, HumanMessage
87
from langchain_core.runnables import RunnableConfig
9-
from langchain_openai import OpenAIEmbeddings
8+
from langchain_openai import ChatOpenAI, OpenAIEmbeddings
109
from langgraph.constants import START
1110
from langgraph.graph import MessagesState, StateGraph
1211
from langgraph.store.base import (
@@ -511,7 +510,7 @@ async def test_async_store_with_memory_persistence(
511510
await store.setup()
512511
await checkpointer.asetup()
513512

514-
model = ChatAnthropic(model="claude-3-5-sonnet-20240620") # type: ignore[call-arg]
513+
model = ChatOpenAI(model="gpt-4o-2024-08-06", temperature=0) # type: ignore[call-arg]
515514

516515
def call_model(
517516
state: MessagesState, config: RunnableConfig, *, store: BaseStore
@@ -549,7 +548,7 @@ def call_model(
549548
input_message = HumanMessage(content="Hi! Remember: my name is Bob")
550549
response = await graph.ainvoke({"messages": [input_message]}, config)
551550

552-
assert "I'll remember that your name is Bob" in response["messages"][1].content
551+
assert "Hi Bob" in response["messages"][1].content
553552

554553
# Test 2: inspect the Redis store and verify that we have in fact saved the memories for the user
555554
memories = await store.asearch(("memories", "1"))

tests/test_store.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
from typing import Any, Dict, Sequence, cast
22

33
import pytest
4-
from langchain_anthropic import ChatAnthropic
54
from langchain_core.messages import BaseMessage, HumanMessage
65
from langchain_core.runnables import RunnableConfig
7-
from langchain_openai import OpenAIEmbeddings
6+
from langchain_openai import ChatOpenAI, OpenAIEmbeddings
7+
88
from langgraph.graph import START, MessagesState, StateGraph
99
from langgraph.store.base import (
1010
BaseStore,
@@ -447,7 +447,7 @@ def test_store_with_memory_persistence(redis_url: str) -> None:
447447

448448
with RedisStore.from_conn_string(redis_url, index=index_config) as store:
449449
store.setup()
450-
model = ChatAnthropic(model="claude-3-5-sonnet-20240620") # type: ignore[call-arg]
450+
model = ChatOpenAI(model="gpt-4o-2024-08-06", temperature=0)
451451

452452
def call_model(
453453
state: MessagesState, config: RunnableConfig, *, store: BaseStore
@@ -490,7 +490,7 @@ def call_model(
490490
input_message = HumanMessage(content="Hi! Remember: my name is Bob")
491491
response = graph.invoke({"messages": [input_message]}, config)
492492

493-
assert "I'll remember that your name is Bob" in response["messages"][1].content
493+
assert "Hi Bob" in response["messages"][1].content
494494

495495
# Test 2: inspect the Redis store and verify that we have in fact saved the memories for the user
496496
for memory in store.search(("memories", "1")):

0 commit comments

Comments
 (0)