langchain/libs/community/tests/unit_tests/chat_models/test_zhipuai.py
Eugene Yurtsev 25fbe356b4
community[patch]: upgrade to recent version of mypy (#21616)
This PR upgrades community to a recent version of mypy. It inserts type:
ignore on all existing failures.
2024-05-13 14:55:07 -04:00

14 lines
412 B
Python

"""Test ZhipuAI Chat API wrapper"""
import pytest
from langchain_community.chat_models.zhipuai import ChatZhipuAI
@pytest.mark.requires("httpx", "httpx_sse", "jwt")
def test_zhipuai_model_param() -> None:
llm = ChatZhipuAI(api_key="test", model="foo")
assert llm.model_name == "foo"
llm = ChatZhipuAI(api_key="test", model_name="foo") # type: ignore[call-arg]
assert llm.model_name == "foo"