Skip to content

Commit

Permalink
cr
Browse files Browse the repository at this point in the history
  • Loading branch information
baskaryan committed Oct 2, 2023
1 parent 6401236 commit c711888
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from langchain.callbacks.manager import CallbackManager
from langchain.chat_models import BedrockChat
from langchain.schema import ChatGeneration, LLMResult
from langchain.schema.messages import BaseMessage, HumanMessage
from langchain.schema.messages import BaseMessage, HumanMessage, SystemMessage
from tests.unit_tests.callbacks.fake_callback_handler import FakeCallbackHandler


Expand All @@ -18,8 +18,9 @@ def chat() -> BedrockChat:
@pytest.mark.scheduled
def test_chat_bedrock(chat: BedrockChat) -> None:
"""Test BedrockChat wrapper."""
message = HumanMessage(content="Hello")
response = chat([message])
system = SystemMessage(content="You are a helpful assistant.")
human = HumanMessage(content="Hello")
response = chat([system, human])
assert isinstance(response, BaseMessage)
assert isinstance(response.content, str)

Expand Down

0 comments on commit c711888

Please sign in to comment.