langchain/tests/integration_tests/llms/test_deepinfra.py
Yessen Kanapin c66755b661
Add DeepInfra embeddings integration with tests and examples, better exception handling for Deep Infra LLM (#5854)
#### Who can review?

Tag maintainers/contributors who might be interested:
  @hwchase17 - project lead
  - @agola11

---------

Co-authored-by: Yessen Kanapin <yessen@deepinfra.com>
2023-06-07 19:14:30 -07:00

11 lines
282 B
Python

"""Test DeepInfra API wrapper."""
from langchain.llms.deepinfra import DeepInfra
def test_deepinfra_call() -> None:
"""Test valid call to DeepInfra."""
llm = DeepInfra(model_id="google/flan-t5-small")
output = llm("What is 2 + 2?")
assert isinstance(output, str)