langchain_ai21.ai21_base
.AI21Base¶
- class langchain_ai21.ai21_base.AI21Base[source]¶
Bases:
BaseModel
Base class for AI21 models.
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 api_host: Optional[str] = None¶
Host URL
- param api_key: Optional[SecretStr] = None¶
API key for AI21 API.
- Constraints
type = string
writeOnly = True
format = password
- param num_retries: Optional[int] = None¶
Maximum number of retries for API requests before giving up.
- param timeout_sec: Optional[float] = None¶
Timeout in seconds.
If not set, it will default to the value of the environment variable AI21_TIMEOUT_SEC or 300 seconds.