mirror of
https://github.com/hwchase17/langchain.git
synced 2026-06-09 10:17:00 +00:00
docs: more standardization (#33124)
This commit is contained in:
@@ -43,11 +43,11 @@ def test_mistralai_initialization() -> None:
|
||||
ChatMistralAI(model="test", mistral_api_key="test"), # type: ignore[call-arg, call-arg]
|
||||
ChatMistralAI(model="test", api_key="test"), # type: ignore[call-arg, arg-type]
|
||||
]:
|
||||
assert cast(SecretStr, model.mistral_api_key).get_secret_value() == "test"
|
||||
assert cast("SecretStr", model.mistral_api_key).get_secret_value() == "test"
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"model,expected_url",
|
||||
("model", "expected_url"),
|
||||
[
|
||||
(ChatMistralAI(model="test"), "https://api.mistral.ai/v1"), # type: ignore[call-arg, arg-type]
|
||||
(ChatMistralAI(model="test", endpoint="baz"), "baz"), # type: ignore[call-arg, arg-type]
|
||||
|
||||
@@ -14,4 +14,4 @@ def test_mistral_init() -> None:
|
||||
MistralAIEmbeddings(model="mistral-embed", api_key="test"), # type: ignore[arg-type]
|
||||
]:
|
||||
assert model.model == "mistral-embed"
|
||||
assert cast(SecretStr, model.mistral_api_key).get_secret_value() == "test"
|
||||
assert cast("SecretStr", model.mistral_api_key).get_secret_value() == "test"
|
||||
|
||||
Reference in New Issue
Block a user