mirror of
https://github.com/hwchase17/langchain
synced 2024-10-29 17:07:25 +00:00
17 lines
389 B
Python
17 lines
389 B
Python
|
"""Test Baseten API wrapper."""
|
||
|
import os
|
||
|
|
||
|
import baseten
|
||
|
import pytest
|
||
|
|
||
|
from langchain.llms.baseten import Baseten
|
||
|
|
||
|
|
||
|
@pytest.mark.requires(baseten)
|
||
|
def test_baseten_call() -> None:
|
||
|
"""Test valid call to Baseten."""
|
||
|
baseten.login(os.environ["BASETEN_API_KEY"])
|
||
|
llm = Baseten(model=os.environ["BASETEN_MODEL_ID"])
|
||
|
output = llm("Say foo:")
|
||
|
assert isinstance(output, str)
|