langchain/libs/community/tests/integration_tests/llms/test_baseten.py
Eugene Yurtsev 25fbe356b4
community[patch]: upgrade to recent version of mypy (#21616)
This PR upgrades community to a recent version of mypy. It inserts type:
ignore on all existing failures.
2024-05-13 14:55:07 -04:00

14 lines
429 B
Python

"""Test Baseten API wrapper."""
import os
from langchain_community.llms.baseten import Baseten
# This test requires valid BASETEN_MODEL_ID and BASETEN_API_KEY environment variables
def test_baseten_call() -> None:
"""Test valid call to Baseten."""
llm = Baseten(model=os.environ["BASETEN_MODEL_ID"]) # type: ignore[call-arg]
output = llm.invoke("Test prompt, please respond.")
assert isinstance(output, str)