mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-16 06:53:16 +00:00
docs: Standardize MiniMaxEmbeddings (#24983)
- **Description:** Standardize MiniMaxEmbeddings - docs, the issue #24856 - model init arg names, the issue #20085
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
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
|
Reference in New Issue
Block a user