standard-tests[patch]: don't require str chunk contents (#22965)

This commit is contained in:
Bagatur 2024-06-17 05:52:24 -07:00 committed by GitHub
parent 892bd4c29b
commit 9ff249a38d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -73,7 +73,6 @@ class ChatModelIntegrationTests(ABC):
for token in model.stream("Hello"): for token in model.stream("Hello"):
assert token is not None assert token is not None
assert isinstance(token, AIMessageChunk) assert isinstance(token, AIMessageChunk)
assert isinstance(token.content, str)
num_tokens += len(token.content) num_tokens += len(token.content)
assert num_tokens > 0 assert num_tokens > 0
@ -85,7 +84,6 @@ class ChatModelIntegrationTests(ABC):
async for token in model.astream("Hello"): async for token in model.astream("Hello"):
assert token is not None assert token is not None
assert isinstance(token, AIMessageChunk) assert isinstance(token, AIMessageChunk)
assert isinstance(token.content, str)
num_tokens += len(token.content) num_tokens += len(token.content)
assert num_tokens > 0 assert num_tokens > 0