# LLM blueprints
URL: https://docs.datarobot.com/en/docs/api/reference/sdk/gen-llm-generation.html

# LLM Generation

### class datarobot.models.genai.custom_model_validation.CustomModelValidation

The validation record checking the ability of the deployment to serve
as a custom model LLM, custom model vector database, or custom model embedding.

- Variables:

#### classmethod get(validation_id)

Get the validation record by id.

- Parameters: validation_id ( Union[CustomModelValidation , str] ) – The CustomModelValidation to retrieve, either CustomModelValidation or validation ID.
- Return type: CustomModelValidation

#### classmethod get_by_values(prompt_column_name, target_column_name, deployment_id, model_id)

Get the validation record by field values.

- Parameters:
- Return type: CustomModelValidation

#### classmethod list(prompt_column_name=None, target_column_name=None, deployment=None, model=None, use_cases=None, playground=None, completed_only=False, search=None, sort=None)

List the validation records by field values.

- Parameters:
- Return type: List[CustomModelValidation]

#### classmethod revalidate(validation_id)

Revalidate an unlinked custom model vector database or LLM.
This method is helpful when a deployment used as vector database or LLM is accidentally
replaced with another model that stopped complying with the response schema requirements.

Replace the deployment’s model with a complying model and call this method instead of
creating a new custom model validation from scratch.

Another application is if the API token used to create a validation record got revoked and
no longer can be used to call the deployment.
Calling revalidate will update the validation record with the token currently in use.

- Parameters: validation_id ( str ) – The ID of the CustomModelValidation for revalidation.
- Return type: CustomModelValidation

#### delete()

Delete the custom model validation.

- Return type: None

### class datarobot.models.genai.custom_model_llm_validation.CustomModelLLMValidation

Validation record checking the ability of the deployment to serve
as a custom model LLM.

- Variables:

#### classmethod create(deployment_id, model=None, use_case=None, name=None, wait_for_completion=False, prediction_timeout=None, prompt_column_name=None, target_column_name=None, chat_model_id=None)

Start the validation of the deployment that will serve as an LLM.

- Parameters:
- Return type: CustomModelLLMValidation

#### update(name=None, prompt_column_name=None, target_column_name=None, chat_model_id=None, deployment=None, model=None, prediction_timeout=None)

Update a custom model validation.

- Parameters:
- Return type: CustomModelLLMValidation

### class datarobot.models.genai.llm_blueprint.LLMBlueprint

Metadata for a DataRobot GenAI LLM blueprint.

- Variables:

#### classmethod create(playground, name, prompt_type=PromptType.CHAT_HISTORY_AWARE, description='', llm=None, llm_settings=None, vector_database=None, vector_database_settings=None)

Create a new LLM blueprint.

- Parameters:
- Returns: llm_blueprint – The created LLM blueprint.
- Return type: LLMBlueprint

#### classmethod create_from_llm_blueprint(llm_blueprint, name, description='')

Create a new LLM blueprint from an existing LLM blueprint.

- Parameters:
- Returns: llm_blueprint – The created LLM blueprint.
- Return type: LLMBlueprint

#### classmethod get(llm_blueprint_id)

Retrieve a single LLM blueprint.

- Parameters: llm_blueprint_id ( str ) – The ID of the LLM blueprint you want to retrieve.
- Returns: llm_blueprint – The requested LLM blueprint.
- Return type: LLMBlueprint

#### classmethod list(playground=None, llms=None, vector_databases=None, is_saved=None, is_starred=None, sort=None)

Lists all LLM blueprints available to the user. If the playground is specified, then the
results are restricted to the LLM blueprints associated with the playground. If the
LLMs are specified, then the results are restricted to the LLM blueprints using those
LLM types. If vector_databases are specified, then the results are restricted to the
LLM blueprints using those vector databases.

- Parameters:
- Returns: playgrounds – A list of playgrounds available to the user.
- Return type: list[Playground]

#### update(name=None, description=None, llm=None, llm_settings=None, vector_database=None, vector_database_settings=None, is_saved=None, is_starred=None, prompt_type=None, remove_vector_database=False)

Update the LLM blueprint.

- Parameters:
- Returns: llm_blueprint – The updated LLM blueprint.
- Return type: LLMBlueprint

#### delete()

Delete the single LLM blueprint.

- Return type: None

#### register_custom_model(prompt_column_name=None, target_column_name=None, llm_test_configuration_ids=None, vector_database_default_prediction_server_id=None, vector_database_prediction_environment_id=None, vector_database_maximum_memory=None, vector_database_resource_bundle_id=None, vector_database_replicas=None, vector_database_network_egress_policy=None)

Create a new CustomModelVersion. This registers a custom model from the LLM blueprint.

If this LLM Blueprint uses a vector database and that vector database is not yet deployed,
this will also deploy that vector database.

- Parameters:
- Returns: custom_model – The registered custom model.
- Return type: CustomModelVersion

### class datarobot.models.genai.llm.LLMDefinition

Metadata for a DataRobot GenAI LLM.

- Variables:

#### classmethod list(use_case=None, as_dict=True, moderation_supported_only=False)

List all large language models (LLMs) available to the user.

- Parameters:
- Returns: llms – A list of large language models (LLMs) available to the user.
- Return type: list[LLMDefinition] or list[LLMDefinitionDict]

### class datarobot.models.genai.llm.LLMDefinitionDict

Dict representation of LLMDefinition.

---
