You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
langchain/libs/community/tests/integration_tests/llms/test_baichuan.py

20 lines
557 B
Python

"""Test Baichuan LLM Endpoint."""
from langchain_core.outputs import LLMResult
from langchain_community.llms.baichuan import BaichuanLLM
def test_call() -> None:
"""Test valid call to baichuan."""
llm = BaichuanLLM()
output = llm("Who won the second world war?")
assert isinstance(output, str)
def test_generate() -> None:
"""Test valid call to baichuan."""
llm = BaichuanLLM()
output = llm.generate(["Who won the second world war?"])
assert isinstance(output, LLMResult)
assert isinstance(output.generations, list)