AI Configs (beta)

Create AI Config variation

Create a new variation for a given AI Config.

The <code>model</code> in the request body requires a <code>modelName</code> and <code>parameters</code>, for example:

  "model": {
    "modelName": "claude-3-opus-20240229",
    "parameters": {
      "max_tokens": 1024
    }
  }
post/api/v2/projects/{projectKey}/ai-configs/{configKey}/variations

Path parameters

projectKeystring required
configKeystring required

Headers

LD-API-Version'beta' required

Version of the endpoint.

Request body

commentstring

Human-readable description of this variation

descriptionstring

Returns the description for the agent. This is only returned for agent variations.

instructionsstring

Returns the instructions for the agent. This is only returned for agent variations.

keystring required
modelobject
namestring required
modelConfigKeystring

Example request

{
  "instructions": "instructions",
  "name": "name",
  "description": "description",
  "messages": [
    {
      "role": "role",
      "content": "content"
    },
    {
      "role": "role",
      "content": "content"
    }
  ],
  "comment": "comment",
  "model": "{}",
  "modelConfigKey": "modelConfigKey",
  "key": "key"
}

Response

AI Config variation created

colorstring
commentstring
descriptionstring

Returns the description for the agent. This is only returned for agent variations.

instructionsstring

Returns the instructions for the agent. This is only returned for agent variations.

keystring required
_idstring required
modelobject required
modelConfigKeystring
namestring required
createdAtinteger required
versioninteger required
statestring
_archivedAtinteger
_publishedAtinteger

Example response

{
  "instructions": "instructions",
  "color": "color",
  "_links": {
    "parent": {
      "href": "href",
      "type": "type"
    }
  },
  "description": "description",
  "modelConfigKey": "modelConfigKey",
  "version": 1,
  "createdAt": 6,
  "_publishedAt": 5,
  "_archivedAt": 5,
  "name": "name",
  "messages": [
    {
      "role": "role",
      "content": "content"
    },
    {
      "role": "role",
      "content": "content"
    }
  ],
  "comment": "comment",
  "model": "{}",
  "_id": "_id",
  "state": "state",
  "key": "key"
}

Changes