2023-06-09 06:05:57 +00:00
|
|
|
"""Test Baseten API wrapper."""
|
|
|
|
import os
|
|
|
|
|
2023-12-11 21:53:30 +00:00
|
|
|
from langchain_community.llms.baseten import Baseten
|
2023-06-09 06:05:57 +00:00
|
|
|
|
2023-12-22 20:46:24 +00:00
|
|
|
# This test requires valid BASETEN_MODEL_ID and BASETEN_API_KEY environment variables
|
|
|
|
|
2023-06-09 06:05:57 +00:00
|
|
|
|
|
|
|
def test_baseten_call() -> None:
|
|
|
|
"""Test valid call to Baseten."""
|
|
|
|
llm = Baseten(model=os.environ["BASETEN_MODEL_ID"])
|
2023-12-22 20:46:24 +00:00
|
|
|
output = llm("Test prompt, please respond.")
|
2023-06-09 06:05:57 +00:00
|
|
|
assert isinstance(output, str)
|