1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. GenerativeAi
  5. getModel
Oracle Cloud Infrastructure v2.4.0 published on Thursday, Jul 25, 2024 by Pulumi

oci.GenerativeAi.getModel

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.4.0 published on Thursday, Jul 25, 2024 by Pulumi

    This data source provides details about a specific Model resource in Oracle Cloud Infrastructure Generative AI service.

    Gets information about a custom model.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testModel = oci.GenerativeAi.getModel({
        modelId: testModelOciGenerativeAiModel.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_model = oci.GenerativeAi.get_model(model_id=test_model_oci_generative_ai_model["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/GenerativeAi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := GenerativeAi.GetModel(ctx, &generativeai.GetModelArgs{
    			ModelId: testModelOciGenerativeAiModel.Id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testModel = Oci.GenerativeAi.GetModel.Invoke(new()
        {
            ModelId = testModelOciGenerativeAiModel.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.GenerativeAi.GenerativeAiFunctions;
    import com.pulumi.oci.GenerativeAi.inputs.GetModelArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var testModel = GenerativeAiFunctions.getModel(GetModelArgs.builder()
                .modelId(testModelOciGenerativeAiModel.id())
                .build());
    
        }
    }
    
    variables:
      testModel:
        fn::invoke:
          Function: oci:GenerativeAi:getModel
          Arguments:
            modelId: ${testModelOciGenerativeAiModel.id}
    

    Using getModel

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getModel(args: GetModelArgs, opts?: InvokeOptions): Promise<GetModelResult>
    function getModelOutput(args: GetModelOutputArgs, opts?: InvokeOptions): Output<GetModelResult>
    def get_model(model_id: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetModelResult
    def get_model_output(model_id: Optional[pulumi.Input[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetModelResult]
    func GetModel(ctx *Context, args *GetModelArgs, opts ...InvokeOption) (*GetModelResult, error)
    func GetModelOutput(ctx *Context, args *GetModelOutputArgs, opts ...InvokeOption) GetModelResultOutput

    > Note: This function is named GetModel in the Go SDK.

    public static class GetModel 
    {
        public static Task<GetModelResult> InvokeAsync(GetModelArgs args, InvokeOptions? opts = null)
        public static Output<GetModelResult> Invoke(GetModelInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetModelResult> getModel(GetModelArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:GenerativeAi/getModel:getModel
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ModelId string
    The model OCID
    ModelId string
    The model OCID
    modelId String
    The model OCID
    modelId string
    The model OCID
    model_id str
    The model OCID
    modelId String
    The model OCID

    getModel Result

    The following output properties are available:

    BaseModelId string
    Capabilities List<string>
    Describes what this model can be used for.
    CompartmentId string
    The compartment OCID for fine-tuned models. For pretrained models, this value is null.
    DefinedTags Dictionary<string, object>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    Description string
    DisplayName string
    FineTuneDetails List<GetModelFineTuneDetail>
    FreeformTags Dictionary<string, object>
    Id string
    An ID that uniquely identifies a pretrained or fine-tuned model.
    IsLongTermSupported bool
    LifecycleDetails string
    ModelId string
    ModelMetrics List<GetModelModelMetric>
    State string
    The lifecycle state of the model.
    SystemTags Dictionary<string, object>
    TimeCreated string
    TimeDeprecated string
    Corresponds to the time when the custom model and its associated foundation model will be deprecated.
    TimeUpdated string
    Type string
    The model type indicating whether this is a pretrained/base model or a custom/fine-tuned model.
    Vendor string
    Version string
    The version of the model.
    BaseModelId string
    Capabilities []string
    Describes what this model can be used for.
    CompartmentId string
    The compartment OCID for fine-tuned models. For pretrained models, this value is null.
    DefinedTags map[string]interface{}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    Description string
    DisplayName string
    FineTuneDetails []GetModelFineTuneDetail
    FreeformTags map[string]interface{}
    Id string
    An ID that uniquely identifies a pretrained or fine-tuned model.
    IsLongTermSupported bool
    LifecycleDetails string
    ModelId string
    ModelMetrics []GetModelModelMetric
    State string
    The lifecycle state of the model.
    SystemTags map[string]interface{}
    TimeCreated string
    TimeDeprecated string
    Corresponds to the time when the custom model and its associated foundation model will be deprecated.
    TimeUpdated string
    Type string
    The model type indicating whether this is a pretrained/base model or a custom/fine-tuned model.
    Vendor string
    Version string
    The version of the model.
    baseModelId String
    capabilities List<String>
    Describes what this model can be used for.
    compartmentId String
    The compartment OCID for fine-tuned models. For pretrained models, this value is null.
    definedTags Map<String,Object>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description String
    displayName String
    fineTuneDetails List<GetModelFineTuneDetail>
    freeformTags Map<String,Object>
    id String
    An ID that uniquely identifies a pretrained or fine-tuned model.
    isLongTermSupported Boolean
    lifecycleDetails String
    modelId String
    modelMetrics List<GetModelModelMetric>
    state String
    The lifecycle state of the model.
    systemTags Map<String,Object>
    timeCreated String
    timeDeprecated String
    Corresponds to the time when the custom model and its associated foundation model will be deprecated.
    timeUpdated String
    type String
    The model type indicating whether this is a pretrained/base model or a custom/fine-tuned model.
    vendor String
    version String
    The version of the model.
    baseModelId string
    capabilities string[]
    Describes what this model can be used for.
    compartmentId string
    The compartment OCID for fine-tuned models. For pretrained models, this value is null.
    definedTags {[key: string]: any}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description string
    displayName string
    fineTuneDetails GetModelFineTuneDetail[]
    freeformTags {[key: string]: any}
    id string
    An ID that uniquely identifies a pretrained or fine-tuned model.
    isLongTermSupported boolean
    lifecycleDetails string
    modelId string
    modelMetrics GetModelModelMetric[]
    state string
    The lifecycle state of the model.
    systemTags {[key: string]: any}
    timeCreated string
    timeDeprecated string
    Corresponds to the time when the custom model and its associated foundation model will be deprecated.
    timeUpdated string
    type string
    The model type indicating whether this is a pretrained/base model or a custom/fine-tuned model.
    vendor string
    version string
    The version of the model.
    base_model_id str
    capabilities Sequence[str]
    Describes what this model can be used for.
    compartment_id str
    The compartment OCID for fine-tuned models. For pretrained models, this value is null.
    defined_tags Mapping[str, Any]
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description str
    display_name str
    fine_tune_details Sequence[generativeai.GetModelFineTuneDetail]
    freeform_tags Mapping[str, Any]
    id str
    An ID that uniquely identifies a pretrained or fine-tuned model.
    is_long_term_supported bool
    lifecycle_details str
    model_id str
    model_metrics Sequence[generativeai.GetModelModelMetric]
    state str
    The lifecycle state of the model.
    system_tags Mapping[str, Any]
    time_created str
    time_deprecated str
    Corresponds to the time when the custom model and its associated foundation model will be deprecated.
    time_updated str
    type str
    The model type indicating whether this is a pretrained/base model or a custom/fine-tuned model.
    vendor str
    version str
    The version of the model.
    baseModelId String
    capabilities List<String>
    Describes what this model can be used for.
    compartmentId String
    The compartment OCID for fine-tuned models. For pretrained models, this value is null.
    definedTags Map<Any>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description String
    displayName String
    fineTuneDetails List<Property Map>
    freeformTags Map<Any>
    id String
    An ID that uniquely identifies a pretrained or fine-tuned model.
    isLongTermSupported Boolean
    lifecycleDetails String
    modelId String
    modelMetrics List<Property Map>
    state String
    The lifecycle state of the model.
    systemTags Map<Any>
    timeCreated String
    timeDeprecated String
    Corresponds to the time when the custom model and its associated foundation model will be deprecated.
    timeUpdated String
    type String
    The model type indicating whether this is a pretrained/base model or a custom/fine-tuned model.
    vendor String
    version String
    The version of the model.

    Supporting Types

    GetModelFineTuneDetail

    GetModelFineTuneDetailTrainingConfig

    GetModelFineTuneDetailTrainingDataset

    Bucket string
    DatasetType string
    Namespace string
    Object string
    Bucket string
    DatasetType string
    Namespace string
    Object string
    bucket String
    datasetType String
    namespace String
    object String
    bucket string
    datasetType string
    namespace string
    object string
    bucket String
    datasetType String
    namespace String
    object String

    GetModelModelMetric

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v2.4.0 published on Thursday, Jul 25, 2024 by Pulumi