forked from langchain-ai/langchain
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Standardize MiniMaxEmbeddings (langchain-ai#24983)
- **Description:** Standardize MiniMaxEmbeddings - docs, the issue langchain-ai#24856 - model init arg names, the issue langchain-ai#20085
- Loading branch information
1 parent
f6b7cba
commit c82a6b1
Showing
2 changed files
with
76 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
libs/community/tests/integration_tests/embeddings/test_minimax.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |