Skip to content

Latest commit

 

History

History
80 lines (60 loc) · 3.08 KB

File metadata and controls

80 lines (60 loc) · 3.08 KB
page_title launchdarkly_ai_config_variation Resource - launchdarkly
subcategory
description Provides a LaunchDarkly AI Config variation resource. This resource allows you to create and manage AI Config variations within your LaunchDarkly project.

launchdarkly_ai_config_variation (Resource)

Provides a LaunchDarkly AI Config variation resource.

This resource allows you to create and manage AI Config variations within your LaunchDarkly project.

Example Usage

resource "launchdarkly_ai_config_variation" "example" {
  project_key      = launchdarkly_project.example.key
  config_key       = launchdarkly_ai_config.example.key
  key              = "helpful-v1"
  name             = "Helpful V1"
  model_config_key = launchdarkly_model_config.example.key

  messages {
    role    = "system"
    content = "You are a helpful customer support assistant."
  }

  messages {
    role    = "user"
    content = "{{ ldctx.query }}"
  }
}

Schema

Required

  • config_key (String) The AI Config key that this variation belongs to. A change in this field will force the destruction of the existing resource and the creation of a new one.
  • key (String) The variation's unique key. A change in this field will force the destruction of the existing resource and the creation of a new one.
  • name (String) The variation's human-readable name.
  • project_key (String) The project key. A change in this field will force the destruction of the existing resource and the creation of a new one.

Optional

  • description (String) The variation's description (used in agent mode).
  • instructions (String) The variation's instructions (used in agent mode).
  • messages (Block List) A list of messages for completion mode. Each message has a role and content. (see below for nested schema)
  • model (String) A JSON string representing the inline model configuration for the variation. Conflicts with model_config_key.
  • model_config_key (String) The key of a model config resource to use for this variation. Conflicts with model.
  • state (String) The state of the variation. Must be archived or published.
  • tool_keys (Set of String) A set of AI tool keys to associate with this variation.

Read-Only

  • creation_date (Number) The creation timestamp of the variation.
  • id (String) The ID of this resource.
  • variation_id (String) The internal ID of the variation.
  • version (Number) The version number of the variation.

Nested Schema for messages

Required:

  • content (String) The content of the message.
  • role (String) The role of the message. Must be one of system, user, assistant, or developer.

Import

Import is supported using the following syntax:

# LaunchDarkly AI Config variations can be imported using the format `project_key/config_key/variation_key`
terraform import launchdarkly_ai_config_variation.example example-project/customer-assistant/helpful-v1