Skip to content

Commit

Permalink
fix: update test assumption for streaming endpoint of chat-bison@001
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 588188368
  • Loading branch information
vertex-sdk-bot authored and Copybara-Service committed Dec 5, 2023
1 parent f58baf3 commit f9a5b69
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/system/aiplatform/test_language_models.py
Expand Up @@ -35,6 +35,7 @@
ChatModel,
InputOutputTextPair,
TextGenerationModel,
TextGenerationResponse,
TextEmbeddingModel,
)

Expand Down Expand Up @@ -256,7 +257,7 @@ def test_chat_model_send_message_streaming(self):

message1 = "Are my favorite movies based on a book series?"
for response in chat.send_message_streaming(message1):
assert response.text
assert isinstance(response, TextGenerationResponse)
assert len(chat.message_history) == 2
assert chat.message_history[0].author == chat.USER_AUTHOR
assert chat.message_history[0].content == message1
Expand All @@ -267,7 +268,7 @@ def test_chat_model_send_message_streaming(self):
message2,
temperature=0.1,
):
assert response2.text
assert isinstance(response2, TextGenerationResponse)
assert len(chat.message_history) == 4
assert chat.message_history[2].author == chat.USER_AUTHOR
assert chat.message_history[2].content == message2
Expand Down

0 comments on commit f9a5b69

Please sign in to comment.