eg. [“langchain”, “llms”, “openai”]
property lc_secrets: Dict[str, str]#
Return a map of constructor argument names to secret ids.
eg. {“openai_api_key”: “OPENAI_API_KEY”}
property lc_serializable: bool#
Return whether or not the class is serializable.
pydantic model langchain.llms.Aviary[source]#
Allow you to use an Aviary.
Aviary is a backend for hosted models. You can
find out more about aviary at
ray-project/aviary
Has no dependencies, since it connects to backend
directly.
To get a list of the models supported on an
aviary, follow the instructions on the web site to
install the aviary CLI and then use:
aviary models
You must at least specify the environment
variable or parameter AVIARY_URL.
You may optionally specify the environment variable
or parameter AVIARY_TOKEN.
Example
from langchain.llms import Aviary
light = Aviary(aviary_url='AVIARY_URL',
                model='amazon/LightGPT')
result = light.predict('How do you make fried rice?')
Validators
raise_deprecation » all fields
set_verbose » verbose
validate_environment » all fields
field tags: Optional[List[str]] = None#
Tags to add to the run trace.
field verbose: bool [Optional]#
Whether to print out response text.
__call__(prompt: str, stop: Optional[List[str]] = None, callbacks: Optional[Union[List[langchain.callbacks.base.BaseCallbackHandler], langchain.callbacks.base.BaseCallbackManager]] = None, **kwargs: Any) → str#
Check Cache and run the LLM on the given prompt and input.
rtdocs_stable/api.python.langchain.com/en/stable/reference/modules/llms.html