Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: model init ValueError #13439

Closed
25 changes: 25 additions & 0 deletions libs/langchain/tests/integration_tests/chat_models/test_minimax.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
from langchain.chat_models import MiniMaxChat
from langchain.llms.minimax import MinimaxCommon


def test_minimaxchat_init_client() -> None:
"Test MiniMaxChat and MinimaxCommon model init _client attribute"
chat = MiniMaxChat(
minimax_api_host="test_host",
minimax_api_key="test_api_key",
minimax_group_id="test_group_id",
)
assert chat._client
assert chat._client.host == "test_host"
assert chat._client.group_id == "test_group_id"
assert chat._client.api_key == "test_api_key"

chat2 = MinimaxCommon(
minimax_api_host="test_host",
minimax_api_key="test_api_key",
minimax_group_id="test_group_id",
)
assert chat2._client
assert chat2._client.host == "test_host"
assert chat2._client.group_id == "test_group_id"
assert chat2._client.api_key == "test_api_key"