langchain.llms.edenai.EdenAI¶
class langchain.llms.edenai.EdenAI[source]¶
Bases: LLM
Wrapper around edenai models.
To use, you should have
the environment variable EDENAI_API_KEY set with your API token.
You can find your token here: https://app.edenai.run/admin/account/settings
feature and subfeature are required, but any other model parameters can also be
passed in with the format params={model_param: value, …}
for api reference check edenai documentation: http://docs.edenai.co.
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 base_url: str = 'https://api.edenai.run/v2'¶
param cache: Optional[bool] = None¶
param callback_manager: Optional[BaseCallbackManager] = None¶
param callbacks: Callbacks = None¶
param edenai_api_key: Optional[str] = None¶
param feature: Literal['text', 'image'] = 'text'¶
Which generative feature to use, use text by default
param max_tokens: Optional[int] = None¶
Constraints
minimum = 0
param metadata: Optional[Dict[str, Any]] = None¶
Metadata to add to the run trace.
param model: Optional[str] = None¶
model name for above provider (eg: ‘text-davinci-003’ for openai)
available models are shown on https://docs.edenai.co/ under ‘available providers’
param model_kwargs: Dict[str, Any] [Optional]¶
extra parameters
param params: Dict[str, Any] [Optional]¶
DEPRECATED: use temperature, max_tokens, resolution directly
optional parameters to pass to api