Model¶
-
class
oci.generative_ai.models.
Model
(**kwargs)¶ Bases:
object
You can create a custom model by using your dataset to fine-tune an out-of-the-box text generation base model. Have your dataset ready before you create a custom model. See Training Data Requirements.
To use any of the API operations, you must be authorized in an IAM policy. If you’re not authorized, talk to an administrator who gives OCI resource access to users. See Getting Started with Policies and Getting Access to Generative AI Resouces.
Attributes
CAPABILITIES_CHAT
A constant which can be used with the capabilities property of a Model. CAPABILITIES_FINE_TUNE
A constant which can be used with the capabilities property of a Model. CAPABILITIES_TEXT_EMBEDDINGS
A constant which can be used with the capabilities property of a Model. CAPABILITIES_TEXT_GENERATION
A constant which can be used with the capabilities property of a Model. CAPABILITIES_TEXT_SUMMARIZATION
A constant which can be used with the capabilities property of a Model. LIFECYCLE_STATE_ACTIVE
A constant which can be used with the lifecycle_state property of a Model. LIFECYCLE_STATE_CREATING
A constant which can be used with the lifecycle_state property of a Model. LIFECYCLE_STATE_DELETED
A constant which can be used with the lifecycle_state property of a Model. LIFECYCLE_STATE_DELETING
A constant which can be used with the lifecycle_state property of a Model. LIFECYCLE_STATE_FAILED
A constant which can be used with the lifecycle_state property of a Model. TYPE_BASE
A constant which can be used with the type property of a Model. TYPE_CUSTOM
A constant which can be used with the type property of a Model. base_model_id
Gets the base_model_id of this Model. capabilities
[Required] Gets the capabilities of this Model. compartment_id
[Required] Gets the compartment_id of this Model. defined_tags
Gets the defined_tags of this Model. description
Gets the description of this Model. display_name
Gets the display_name of this Model. fine_tune_details
Gets the fine_tune_details of this Model. freeform_tags
Gets the freeform_tags of this Model. id
[Required] Gets the id of this Model. is_long_term_supported
Gets the is_long_term_supported of this Model. lifecycle_details
Gets the lifecycle_details of this Model. lifecycle_state
[Required] Gets the lifecycle_state of this Model. model_metrics
Gets the model_metrics of this Model. previous_state
Gets the previous_state of this Model. system_tags
Gets the system_tags of this Model. time_created
[Required] Gets the time_created of this Model. time_deprecated
Gets the time_deprecated of this Model. time_updated
Gets the time_updated of this Model. type
[Required] Gets the type of this Model. vendor
Gets the vendor of this Model. version
Gets the version of this Model. Methods
__init__
(**kwargs)Initializes a new Model object with values from keyword arguments. -
CAPABILITIES_CHAT
= 'CHAT'¶ A constant which can be used with the capabilities property of a Model. This constant has a value of “CHAT”
-
CAPABILITIES_FINE_TUNE
= 'FINE_TUNE'¶ A constant which can be used with the capabilities property of a Model. This constant has a value of “FINE_TUNE”
-
CAPABILITIES_TEXT_EMBEDDINGS
= 'TEXT_EMBEDDINGS'¶ A constant which can be used with the capabilities property of a Model. This constant has a value of “TEXT_EMBEDDINGS”
-
CAPABILITIES_TEXT_GENERATION
= 'TEXT_GENERATION'¶ A constant which can be used with the capabilities property of a Model. This constant has a value of “TEXT_GENERATION”
-
CAPABILITIES_TEXT_SUMMARIZATION
= 'TEXT_SUMMARIZATION'¶ A constant which can be used with the capabilities property of a Model. This constant has a value of “TEXT_SUMMARIZATION”
-
LIFECYCLE_STATE_ACTIVE
= 'ACTIVE'¶ A constant which can be used with the lifecycle_state property of a Model. This constant has a value of “ACTIVE”
-
LIFECYCLE_STATE_CREATING
= 'CREATING'¶ A constant which can be used with the lifecycle_state property of a Model. This constant has a value of “CREATING”
-
LIFECYCLE_STATE_DELETED
= 'DELETED'¶ A constant which can be used with the lifecycle_state property of a Model. This constant has a value of “DELETED”
-
LIFECYCLE_STATE_DELETING
= 'DELETING'¶ A constant which can be used with the lifecycle_state property of a Model. This constant has a value of “DELETING”
-
LIFECYCLE_STATE_FAILED
= 'FAILED'¶ A constant which can be used with the lifecycle_state property of a Model. This constant has a value of “FAILED”
-
TYPE_BASE
= 'BASE'¶ A constant which can be used with the type property of a Model. This constant has a value of “BASE”
-
TYPE_CUSTOM
= 'CUSTOM'¶ A constant which can be used with the type property of a Model. This constant has a value of “CUSTOM”
-
__init__
(**kwargs)¶ Initializes a new Model object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):
Parameters: - id (str) – The value to assign to the id property of this Model.
- description (str) – The value to assign to the description property of this Model.
- compartment_id (str) – The value to assign to the compartment_id property of this Model.
- capabilities (list[str]) – The value to assign to the capabilities property of this Model. Allowed values for items in this list are: “TEXT_GENERATION”, “TEXT_SUMMARIZATION”, “TEXT_EMBEDDINGS”, “FINE_TUNE”, “CHAT”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- lifecycle_state (str) – The value to assign to the lifecycle_state property of this Model. Allowed values for this property are: “ACTIVE”, “CREATING”, “DELETING”, “DELETED”, “FAILED”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- lifecycle_details (str) – The value to assign to the lifecycle_details property of this Model.
- vendor (str) – The value to assign to the vendor property of this Model.
- version (str) – The value to assign to the version property of this Model.
- display_name (str) – The value to assign to the display_name property of this Model.
- time_created (datetime) – The value to assign to the time_created property of this Model.
- time_updated (datetime) – The value to assign to the time_updated property of this Model.
- base_model_id (str) – The value to assign to the base_model_id property of this Model.
- type (str) – The value to assign to the type property of this Model. Allowed values for this property are: “BASE”, “CUSTOM”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- fine_tune_details (oci.generative_ai.models.FineTuneDetails) – The value to assign to the fine_tune_details property of this Model.
- model_metrics (oci.generative_ai.models.ModelMetrics) – The value to assign to the model_metrics property of this Model.
- is_long_term_supported (bool) – The value to assign to the is_long_term_supported property of this Model.
- time_deprecated (datetime) – The value to assign to the time_deprecated property of this Model.
- previous_state (oci.generative_ai.models.Model) – The value to assign to the previous_state property of this Model.
- freeform_tags (dict(str, str)) – The value to assign to the freeform_tags property of this Model.
- defined_tags (dict(str, dict(str, object))) – The value to assign to the defined_tags property of this Model.
- system_tags (dict(str, dict(str, object))) – The value to assign to the system_tags property of this Model.
-
base_model_id
¶ Gets the base_model_id of this Model. The OCID of the base model that’s used for fine-tuning. For pretrained models, the value is null.
Returns: The base_model_id of this Model. Return type: str
-
capabilities
¶ [Required] Gets the capabilities of this Model. Describes what this model can be used for.
Allowed values for items in this list are: “TEXT_GENERATION”, “TEXT_SUMMARIZATION”, “TEXT_EMBEDDINGS”, “FINE_TUNE”, “CHAT”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
Returns: The capabilities of this Model. Return type: list[str]
-
compartment_id
¶ [Required] Gets the compartment_id of this Model. The compartment OCID for fine-tuned models. For pretrained models, this value is null.
Returns: The compartment_id of this Model. Return type: str
Gets the defined_tags of this Model. Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
Example: {“Operations”: {“CostCenter”: “42”}}
Returns: The defined_tags of this Model. Return type: dict(str, dict(str, object))
-
description
¶ Gets the description of this Model. An optional description of the model.
Returns: The description of this Model. Return type: str
-
display_name
¶ Gets the display_name of this Model. A user-friendly name.
Returns: The display_name of this Model. Return type: str
-
fine_tune_details
¶ Gets the fine_tune_details of this Model.
Returns: The fine_tune_details of this Model. Return type: oci.generative_ai.models.FineTuneDetails
Gets the freeform_tags of this Model. Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags.
Example: {“Department”: “Finance”}
Returns: The freeform_tags of this Model. Return type: dict(str, str)
-
id
¶ [Required] Gets the id of this Model. An ID that uniquely identifies a pretrained or fine-tuned model.
Returns: The id of this Model. Return type: str
-
is_long_term_supported
¶ Gets the is_long_term_supported of this Model. Whether a model is supported long-term. Only applicable to base models.
Returns: The is_long_term_supported of this Model. Return type: bool
-
lifecycle_details
¶ Gets the lifecycle_details of this Model. A message describing the current state of the model in more detail that can provide actionable information.
Returns: The lifecycle_details of this Model. Return type: str
-
lifecycle_state
¶ [Required] Gets the lifecycle_state of this Model. The lifecycle state of the model.
Allowed values for this property are: “ACTIVE”, “CREATING”, “DELETING”, “DELETED”, “FAILED”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
Returns: The lifecycle_state of this Model. Return type: str
-
model_metrics
¶ Gets the model_metrics of this Model.
Returns: The model_metrics of this Model. Return type: oci.generative_ai.models.ModelMetrics
-
previous_state
¶ Gets the previous_state of this Model.
Returns: The previous_state of this Model. Return type: oci.generative_ai.models.Model
Gets the system_tags of this Model. System tags for this resource. Each key is predefined and scoped to a namespace.
Example: {“orcl-cloud”: {“free-tier-retained”: “true”}}
Returns: The system_tags of this Model. Return type: dict(str, dict(str, object))
-
time_created
¶ [Required] Gets the time_created of this Model. The date and time that the model was created in the format of an RFC3339 datetime string.
Returns: The time_created of this Model. Return type: datetime
-
time_deprecated
¶ Gets the time_deprecated of this Model. Corresponds to the time when the custom model and its associated foundation model will be deprecated.
Returns: The time_deprecated of this Model. Return type: datetime
-
time_updated
¶ Gets the time_updated of this Model. The date and time that the model was updated in the format of an RFC3339 datetime string.
Returns: The time_updated of this Model. Return type: datetime
-
type
¶ [Required] Gets the type of this Model. The model type indicating whether this is a pretrained/base model or a custom/fine-tuned model.
Allowed values for this property are: “BASE”, “CUSTOM”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
Returns: The type of this Model. Return type: str
-
vendor
¶ Gets the vendor of this Model. The provider of the base model.
Returns: The vendor of this Model. Return type: str
-
version
¶ Gets the version of this Model. The version of the model.
Returns: The version of this Model. Return type: str
-