mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-08 14:31:55 +00:00
anthropic[patch]: split test into two (#31167)
This commit is contained in:
@@ -134,6 +134,9 @@ async def test_stream_usage() -> None:
|
||||
async for token in model.astream("hi"):
|
||||
assert isinstance(token, AIMessageChunk)
|
||||
assert token.usage_metadata is None
|
||||
|
||||
|
||||
async def test_stream_usage_override() -> None:
|
||||
# check we override with kwarg
|
||||
model = ChatAnthropic(model_name=MODEL_NAME) # type: ignore[call-arg]
|
||||
assert model.stream_usage
|
||||
|
Reference in New Issue
Block a user