Module Values.PromptVariantSource

Contains details about a variant of the prompt.

Sourcetype nonrec t = {
  1. name : PromptVariantName.t;
    (*

    The name of the prompt variant.

    *)
  2. templateType : PromptTemplateType.t;
    (*

    The type of prompt template to use.

    *)
  3. templateConfiguration : PromptTemplateConfiguration.t;
    (*

    Contains configurations for the prompt template.

    *)
  4. modelId : PromptModelIdentifier.t option;
    (*

    The unique identifier of the model or inference profile with which to run inference on the prompt.

    *)
  5. inferenceConfiguration : PromptInferenceConfiguration.t option;
    (*

    Contains inference configurations for the prompt variant.

    *)
  6. metadata : PromptMetadataList.t option;
    (*

    An array of objects, each containing a key-value pair that defines a metadata tag and value to attach to a prompt variant.

    *)
  7. additionalModelRequestFields : Document.t option;
    (*

    Contains model-specific inference configurations that aren't in the inferenceConfiguration field. To see model-specific inference parameters, see Inference request parameters and response fields for foundation models.

    *)
  8. genAiResource : PromptGenAiResource.t option;
    (*

    Specifies a generative AI resource with which to use the prompt.

    *)
}
Sourceval context_ : string
Sourceval make : ?modelId:??? -> ?inferenceConfiguration:??? -> ?metadata:??? -> ?additionalModelRequestFields:??? -> ?genAiResource:??? -> name:PromptVariantName.t -> templateType:PromptTemplateType.t -> templateConfiguration:PromptTemplateConfiguration.t -> unit -> t
Sourceval to_value : t -> [> `Structure of (string * [> `Enum of string | `List of [> `Structure of (string * [> `String of PromptMetadataKey.t ]) list ] list | `String of PromptVariantName.t | `Structure of (string * [> `Structure of (string * [> `Float of Temperature.t | `Integer of MaximumLength.t | `List of [> `String of String_.t | `Structure of (string * [> `Enum of string | `List of [> `Structure of (string * [> `String of String_.t | `Structure of (string * [> `Enum of string ]) list ]) list ] list | `String of PromptInputVariableName.t | `Structure of (string * [> `Enum of string ]) list ]) list ] list | `String of TextPrompt.t | `Structure of (string * [> `Enum of string | `List of [> `Structure of (string * [> `Structure of (string * [> `Boolean of Boolean.t | `Enum of string | `String of ToolName.t | `Structure of (string * [> `Structure of 'a list ]) list ]) list ]) list ] list | `Structure of (string * [> `Structure of (string * [> `String of ToolName.t ]) list ]) list ]) list ]) list ]) list ]) list ]
Sourceval to_query : t -> Awso.Client.Query.t
Sourceval of_xml : Awso.Xml.t -> t
Sourceval of_string : string -> t
Sourceval of_json : Yojson.Safe.t -> t
Sourceval to_json : t -> Yojson.Safe.t