Anthropic

Configure Anthropic specification.

When using Anthropic LLMs, you have the choice of using a built-in Graphlit model, which accrues credits for usage, or using your own Anthropic API key.

Graphlit currently supports these built-in Anthropic models via the model field: CLAUDE_3_OPUS, CLAUDE_3_SONNET, CLAUDE_3_HAIKU, CLAUDE_INSTANT_1_2, CLAUDE_2_0 and CLAUDE_2_1.

By assigning the model field to CUSTOM, you also will need to assign the key and modelName to use your own Anthropic developer account.

You can find the list of current Anthropic models here, and use the model name syntax such as claude-3-opus-20240229.

Create Built-In Model Specification

Mutation:

mutation CreateSpecification($specification: SpecificationInput!) {
  createSpecification(specification: $specification) {
    id
    name
    state
    type
    serviceType
  }
}

Variables:

{
  "specification": {
    "type": "COMPLETION",
    "serviceType": "ANTHROPIC",
    "anthropic": {
      "model": "CLAUDE_3_OPUS"
    },
    "name": "Anthropic"
  }
}

Response:

{
  "type": "COMPLETION",
  "serviceType": "ANTHROPIC",
  "id": "a87ce6cd-75f4-4391-8d00-33149e9afc86",
  "name": "Anthropic",
  "state": "ENABLED"
}
Create Custom Model Specification

Mutation:

mutation CreateSpecification($specification: SpecificationInput!) {
  createSpecification(specification: $specification) {
    id
    name
    state
    type
    serviceType
  }
}

Variables:

{
  "specification": {
    "type": "COMPLETION",
    "serviceType": "ANTHROPIC",
    "anthropic": {
      "key": "redacted",
      "modelName": "claude-3-opus-20240229",
      "model": "CUSTOM"
    },
    "name": "Anthropic Custom"
  }
}

Response:

{
  "type": "COMPLETION",
  "serviceType": "ANTHROPIC",
  "id": "3c7d107c-cc9f-4c2f-8ac5-0b0b7ddd2ddf",
  "name": "Anthropic Custom",
  "state": "ENABLED"
}

Last updated