mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-21 02:17:12 +00:00
- **Description:** Standardize MiniMaxEmbeddings - docs, the issue #24856 - model init arg names, the issue #20085
20 lines
630 B
Python
20 lines
630 B
Python
from typing import cast
|
|
|
|
from langchain_core.pydantic_v1 import SecretStr
|
|
|
|
from langchain_community.embeddings import MiniMaxEmbeddings
|
|
|
|
|
|
def test_initialization_with_alias() -> None:
|
|
"""Test minimax embedding model initialization with alias."""
|
|
api_key = "your-api-key"
|
|
group_id = "your-group-id"
|
|
|
|
embeddings = MiniMaxEmbeddings( # type: ignore[arg-type, call-arg]
|
|
api_key=api_key, # type: ignore[arg-type]
|
|
group_id=group_id, # type: ignore[arg-type]
|
|
)
|
|
|
|
assert cast(SecretStr, embeddings.minimax_api_key).get_secret_value() == api_key
|
|
assert embeddings.minimax_group_id == group_id
|