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