infra: bump anthropic mypy 1 (#22373)

This commit is contained in:
Bagatur
2024-06-03 08:21:55 -07:00
committed by GitHub
parent ceb73ad06f
commit 678a19a5f7
8 changed files with 120 additions and 124 deletions

View File

@@ -18,20 +18,20 @@ def test_anthropic_model_name_param() -> None:
@pytest.mark.requires("anthropic")
def test_anthropic_model_param() -> None:
llm = Anthropic(model="foo")
llm = Anthropic(model="foo") # type: ignore[call-arg]
assert llm.model == "foo"
def test_anthropic_call() -> None:
"""Test valid call to anthropic."""
llm = Anthropic(model="claude-instant-1")
llm = Anthropic(model="claude-instant-1") # type: ignore[call-arg]
output = llm.invoke("Say foo:")
assert isinstance(output, str)
def test_anthropic_streaming() -> None:
"""Test streaming tokens from anthropic."""
llm = Anthropic(model="claude-instant-1")
llm = Anthropic(model="claude-instant-1") # type: ignore[call-arg]
generator = llm.stream("I'm Pickle Rick")
assert isinstance(generator, Generator)