mirror of
https://github.com/hwchase17/langchain
synced 2024-11-06 03:20:49 +00:00
standard-tests[patch]: don't require str chunk contents (#22965)
This commit is contained in:
parent
892bd4c29b
commit
9ff249a38d
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user