Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ChatAnthropic stop_sequences error (#2919) #2920

Merged
merged 7 commits into from
Apr 15, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
take out bare-nano
  • Loading branch information
agola11 committed Apr 14, 2023
commit 961edda492ae78d2b4355e5c653170545589d955
18 changes: 0 additions & 18 deletions tests/integration_tests/chat_models/test_anthropic.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,6 @@
from tests.unit_tests.callbacks.fake_callback_handler import FakeCallbackHandler


def test_anthropic_call() -> None:
"""Test valid call to anthropic."""
chat = ChatAnthropic(model="bare-nano-0")
message = HumanMessage(content="Hello")
response = chat([message])
assert isinstance(response, AIMessage)
assert isinstance(response.content, str)


def test_anthropic_streaming() -> None:
"""Test streaming tokens from anthropic."""
chat = ChatAnthropic(model="bare-nano-0", streaming=True)
message = HumanMessage(content="Hello")
response = chat([message])
assert isinstance(response, AIMessage)
assert isinstance(response.content, str)


def test_anthropic_streaming_callback() -> None:
"""Test that streaming correctly invokes on_llm_new_token callback."""
callback_handler = FakeCallbackHandler()
Expand Down