File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 35
35
ChatModel ,
36
36
InputOutputTextPair ,
37
37
TextGenerationModel ,
38
+ TextGenerationResponse ,
38
39
TextEmbeddingModel ,
39
40
)
40
41
@@ -256,7 +257,7 @@ def test_chat_model_send_message_streaming(self):
256
257
257
258
message1 = "Are my favorite movies based on a book series?"
258
259
for response in chat .send_message_streaming (message1 ):
259
- assert response . text
260
+ assert isinstance ( response , TextGenerationResponse )
260
261
assert len (chat .message_history ) == 2
261
262
assert chat .message_history [0 ].author == chat .USER_AUTHOR
262
263
assert chat .message_history [0 ].content == message1
@@ -267,7 +268,7 @@ def test_chat_model_send_message_streaming(self):
267
268
message2 ,
268
269
temperature = 0.1 ,
269
270
):
270
- assert response2 . text
271
+ assert isinstance ( response2 , TextGenerationResponse )
271
272
assert len (chat .message_history ) == 4
272
273
assert chat .message_history [2 ].author == chat .USER_AUTHOR
273
274
assert chat .message_history [2 ].content == message2
You can’t perform that action at this time.
0 commit comments