mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-28 14:05:02 +00:00
fix: lint
This commit is contained in:
parent
8c628fe0c1
commit
4ef1aee9d8
@ -93,13 +93,18 @@ def test_validate_max_tokens() -> None:
|
|||||||
assert llm.max_tokens == 1024
|
assert llm.max_tokens == 1024
|
||||||
|
|
||||||
# Test that existing max_tokens values are preserved
|
# Test that existing max_tokens values are preserved
|
||||||
llm = ChatAnthropic(model="claude-3-5-sonnet-latest", max_tokens=2048, anthropic_api_key="test")
|
llm = ChatAnthropic(
|
||||||
|
model="claude-3-5-sonnet-latest", max_tokens=2048, anthropic_api_key="test"
|
||||||
|
)
|
||||||
assert llm.max_tokens == 2048
|
assert llm.max_tokens == 2048
|
||||||
|
|
||||||
# Test that explicitly set max_tokens values are preserved
|
# Test that explicitly set max_tokens values are preserved
|
||||||
llm = ChatAnthropic(model="claude-3-5-sonnet-latest", max_tokens=4096, anthropic_api_key="test")
|
llm = ChatAnthropic(
|
||||||
|
model="claude-3-5-sonnet-latest", max_tokens=4096, anthropic_api_key="test"
|
||||||
|
)
|
||||||
assert llm.max_tokens == 4096
|
assert llm.max_tokens == 4096
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.requires("anthropic")
|
@pytest.mark.requires("anthropic")
|
||||||
def test_anthropic_model_name_param() -> None:
|
def test_anthropic_model_name_param() -> None:
|
||||||
llm = ChatAnthropic(model_name="foo") # type: ignore[call-arg, call-arg]
|
llm = ChatAnthropic(model_name="foo") # type: ignore[call-arg, call-arg]
|
||||||
@ -142,7 +147,6 @@ def test_anthropic_initialization() -> None:
|
|||||||
ChatAnthropic(model="test", anthropic_api_key="test") # type: ignore[call-arg, call-arg]
|
ChatAnthropic(model="test", anthropic_api_key="test") # type: ignore[call-arg, call-arg]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def test__format_output() -> None:
|
def test__format_output() -> None:
|
||||||
anthropic_msg = Message(
|
anthropic_msg = Message(
|
||||||
id="foo",
|
id="foo",
|
||||||
|
Loading…
Reference in New Issue
Block a user