2023-07-28 05:53:23 +00:00
|
|
|
"""Test Minimax API wrapper."""
|
2023-12-11 21:53:30 +00:00
|
|
|
from langchain_community.llms.minimax import Minimax
|
2023-07-28 05:53:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
def test_minimax_call() -> None:
|
|
|
|
"""Test valid call to minimax."""
|
|
|
|
llm = Minimax(max_tokens=10)
|
|
|
|
output = llm("Hello world!")
|
|
|
|
assert isinstance(output, str)
|
2023-09-20 03:43:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
def test_minimax_call_successful() -> None:
|
|
|
|
"""Test valid call to minimax."""
|
|
|
|
llm = Minimax()
|
|
|
|
output = llm(
|
|
|
|
"A chain is a serial assembly of connected pieces, called links, \
|
|
|
|
typically made of metal, with an overall character similar to that\
|
|
|
|
of a rope in that it is flexible and curved in compression but \
|
|
|
|
linear, rigid, and load-bearing in tension. A chain may consist\
|
|
|
|
of two or more links."
|
|
|
|
)
|
|
|
|
assert isinstance(output, str)
|