langchain/tests/integration_tests/llms/test_aviary.py
M Waleed Kadous 5124c1e0d9
Add aviary support (#5661)
Aviary is an open source toolkit for evaluating and deploying open
source LLMs. You can find out more about it on
[http://github.com/ray-project/aviary). You can try it out at
[http://aviary.anyscale.com](aviary.anyscale.com).

This code adds support for Aviary in LangChain. To minimize
dependencies, it connects directly to the HTTP endpoint.

The current implementation is not accelerated and uses the default
implementation of `predict` and `generate`.

It includes a test and a simple example. 

@hwchase17 and @agola11 could you have a look at this?

---------

Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
2023-06-05 16:28:42 -07:00

11 lines
249 B
Python

"""Test Anyscale API wrapper."""
from langchain.llms.aviary import Aviary
def test_aviary_call() -> None:
"""Test valid call to Anyscale."""
llm = Aviary(model="test/model")
output = llm("Say bar:")
assert isinstance(output, str)