langchain.llms.aviary.Aviary¶
class langchain.llms.aviary.Aviary[source]¶
Bases: LLM
Aviary hosted models.
Aviary is a backend for hosted models. You can
find out more about aviary at
http://github.com/ray-project/aviary
To get a list of the models supported on an
aviary, follow the instructions on the website to
install the aviary CLI and then use:
aviary models
AVIARY_URL and AVIARY_TOKEN environment variables must be set.
model¶
The name of the model to use. Defaults to “amazon/LightGPT”.
aviary_url¶
The URL for the Aviary backend. Defaults to None.
aviary_token¶
The bearer token for the Aviary backend. Defaults to None.
use_prompt_format¶
If True, the prompt template for the model will be ignored.
Defaults to True.
version¶
API version to use for Aviary. Defaults to None.
Example
from langchain.llms import Aviary
os.environ["AVIARY_URL"] = "<URL>"
os.environ["AVIARY_TOKEN"] = "<TOKEN>"
light = Aviary(model='amazon/LightGPT')
output = light('How do you make fried rice?')
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
param aviary_token: Optional[str] = None¶
param aviary_url: Optional[str] = None¶
param cache: Optional[bool] = None¶
param callback_manager: Optional[BaseCallbackManager] = None¶
param callbacks: Callbacks = None¶
param metadata: Optional[Dict[str, Any]] = None¶
Metadata to add to the run trace.