langchain/tests/integration_tests/llms/test_openai.py
2022-10-25 20:22:16 -07:00

11 lines
240 B
Python

"""Test OpenAI API wrapper."""
from langchain.llms.openai import OpenAI
def test_openai_call() -> None:
"""Test valid call to openai."""
llm = OpenAI(max_tokens=10)
output = llm("Say foo:")
assert isinstance(output, str)