mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-19 09:30:15 +00:00
x
This commit is contained in:
parent
f23b8008ce
commit
50ce3bf5d9
@ -149,10 +149,13 @@ async def test_async_stream_twice() -> None:
|
|||||||
model = ChatAnthropic(model_name=MODEL_NAME, stream_usage=False)
|
model = ChatAnthropic(model_name=MODEL_NAME, stream_usage=False)
|
||||||
async for token in model.astream("hi"):
|
async for token in model.astream("hi"):
|
||||||
assert isinstance(token, AIMessageChunk)
|
assert isinstance(token, AIMessageChunk)
|
||||||
|
assert token.usage_metadata is None
|
||||||
|
|
||||||
model = ChatAnthropic(model_name=MODEL_NAME) # type: ignore[call-arg]
|
model = ChatAnthropic(model_name=MODEL_NAME) # type: ignore[call-arg]
|
||||||
|
assert model.stream_usage
|
||||||
async for token in model.astream("hi", stream_usage=False):
|
async for token in model.astream("hi", stream_usage=False):
|
||||||
assert isinstance(token, AIMessageChunk)
|
assert isinstance(token, AIMessageChunk)
|
||||||
|
assert token.usage_metadata is None
|
||||||
|
|
||||||
|
|
||||||
async def test_abatch() -> None:
|
async def test_abatch() -> None:
|
||||||
|
Loading…
Reference in New Issue
Block a user