A LLM operator generates answer given prompt in messages using a large language model or service.
This operator is implemented with Ernie Bot from [Baidu](https://cloud.baidu.com/wenxin.html).
Please note you will need [Ernie API key & Secret key](https://ai.baidu.com/ai-doc/REFERENCE/Lkru0zoz4) to access the service.
This operator is implemented with [Ernie Bot SDK from Baidu](https://github.com/PaddlePaddle/ERNIE-Bot-SDK).
Please note you will need [EB_API_TYPE & EB_ACCESS_TOKEN](https://github.com/PaddlePaddle/ERNIE-Bot-SDK/blob/develop/docs/authentication.md) to access the service.
LLM 算子使用大语言模型或服务,为输入的问题或提示生成答案。LLM/Ernie 利用了来自百度的[文心一言](https://cloud.baidu.com/wenxin.html)。请注意,您需要[文心一言服务的 API Key 和 Secret Key](https://ai.baidu.com/ai-doc/REFERENCE/Lkru0zoz4)才能访问该服务。
Create the operator via the following factory method:
***LLM.Ernie(api_key: str, secret_key: str)***
***LLM.Ernie(api_type: str, access_token: str)***
**Parameters:**
***api_key***: *str=None*
***api_type***: *str=None*
The Ernie API key in string, defaults to None. If None, it will use the environment variable `ERNIE_API_KEY`.
The API type in string, defaults to None. If None, it will use the environment variable `EB_API_TYPE`. Refer to [authentication](https://github.com/PaddlePaddle/ERNIE-Bot-SDK/blob/develop/docs/authentication.md) for more details.
***secret_key***: *str=None*
***access_token***: *str=None*
The Ernie Secret key in string, defaults to None. If None, it will use the environment variable `ERNIE_SECRET_KEY`.
The access token in string, defaults to None. If None, it will use the environment variable `EB_ACCESS_TOKEN`. Refer to [authentication](https://github.com/PaddlePaddle/ERNIE-Bot-SDK/blob/develop/docs/authentication.md) for more details.