Optionalai21OptionalbaseOptionallogitOptionalstopGet the default parameters for calling AI21 API.
Get the identifying parameters for this LLM.
Call out to AI21's complete endpoint. Args: prompt: The prompt to pass into the model. stop: Optional list of stop words to use when generating.
Returns:
The string generated by the model.
Example: let response = ai21._call("Tell me a joke.");
Get the type of LLM.
Method to validate the environment. It checks if the AI21 API key is set. If not, it throws an error.
Staticget
Class representing the AI21 language model. It extends the LLM (Large Language Model) class, providing a standard interface for interacting with the AI21 language model.