aixplain.utils.llm_utils
get_llm_instance
def get_llm_instance(llm_id: Text,
api_key: Optional[Text] = None,
use_cache: bool = True) -> LLM
Get an LLM instance with specific configuration.
Arguments:
llm_idText - ID of the LLM model to use.api_keyOptional[Text], optional - API key to use. Defaults to None.use_cachebool, optional - Whether to use caching for model retrieval. Defaults to True.
Returns:
LLM- Configured LLM instance.
Raises:
Exception- If the LLM model with the given ID is not found.