Applications

Applications represent the settings such as language model, embedding model, chunking strategy, and retrieval strategy that are applied to your sources and conversations.

You can have many applications, each configured for a different use-case.

The application object

  • Name
    id
    Type
    string
    Description

    Unique identifier for the application.

  • Name
    name
    Type
    string
    Description

    Name of the application.

  • Name
    description
    Type
    string
    Description

    Description of the application.

  • Name
    model
    Type
    string
    Description

    Language model that powers the application. Can be 'gpt-3.5.turbo' or 'gpt-4'. Defaults to 'gpt-3.5-turbo'.

  • Name
    system_message
    Type
    string
    Description

    Directions for the language model to follow when generating completions. Included in each conversation.

  • Name
    created_at
    Type
    string
    Description

    Timestamp of when the application was created.

  • Name
    updated_at
    Type
    string
    Description

    Timestamp of when the application was last updated.


GET/applications

List applications

Returns a list of your applications.

Request

GET
/applications
curl https://api.chariotai.com/applications \
  -H "Authorization: Bearer {YOUR_API_KEY}"

Response

[
  {
        "id": "app_12345",
        "name": "My application",
        "description": "My application description",
        "model": "gpt-4",
        "system_message": "You are a helpful assistant. Please help the user with their task and answer questions.",
        "created_at": "2023-05-21T00:00:00.000Z",
        "updated_at": "2023-05-21T00:00:00.000Z"
  }
]

POST/applications

Create application

Creates a new application with the specified settings.

Required attributes

  • Name
    name
    Type
    string
    Description

    Name of the application.

Optional attributes

  • Name
    description
    Type
    string
    Description

    Description of the application.

  • Name
    model
    Type
    string
    Description

    Language model that powers the application. Can be 'gpt-3.5.turbo' or 'gpt-4'. Defaults to 'gpt-3.5-turbo'.

  • Name
    system_message
    Type
    string
    Description

    Directions for the language model to follow when generating completions. Included in each conversation.

Request

POST
/applications
curl https://api.chariotai.com/applications \
  -H "Authorization: Bearer {YOUR_API_KEY}"

Response

{
  "id": "app_12345",
  "name": "My application",
  "description": "My application description",
  "model": "gpt-4",
  "system_message": "You are a helpful assistant. Please help the user with their task and answer questions.",
  "created_at": "2023-05-21T00:00:00.000Z",
  "updated_at": "2023-05-21T00:00:00.000Z"
}

GET/applications/{id}

Get application

Retrieves a single application.

Request

GET
/applications/{id}
curl https://api.chariotai.com/applications/{id} \
  -H "Authorization: Bearer {YOUR_API_KEY}"

Response

{
  "id": "app_12345",
  "name": "My application",
  "description": "My application description",
  "model": "gpt-4",
  "system_message": "You are a helpful assistant. Please help the user with their task and answer questions.",
  "created_at": "2023-05-21T00:00:00.000Z",
  "updated_at": "2023-05-21T00:00:00.000Z"
}

PUT/applications/{id}

Update application

Updates the specified application.

Optional attributes

  • Name
    name
    Type
    string
    Description
  • Name
    description
    Type
    string
    Description
  • Name
    system_message
    Type
    string
    Description
  • Name
    model
    Type
    string
    Description

Request

PUT
/applications/{id}
curl https://api.chariotai.com/applications/{id} \
  -H "Authorization: Bearer {YOUR_API_KEY}"

Response

{
  "id": "app_12345",
  "name": "My application",
  "description": "My application description",
  "model": "gpt-4",
  "system_message": "You are a helpful assistant. Please help the user with their task and answer questions.",
  "created_at": "2023-05-21T00:00:00.000Z",
  "updated_at": "2023-05-21T00:00:00.000Z"
}

DELETE/applications/{id}

Delete application

Permanently deletes an application and all related conversations and sources. This cannot be undone.

Request

DELETE
/applications/{id}
curl https://api.chariotai.com/applications/{id} \
  -H "Authorization: Bearer {YOUR_API_KEY}"

GET/applications/{id}/conversations

List application conversations

Returns all conversations for an application. Does not include conversation messages. To get messages, use the conversations endpoint and get the conversation by id.

Request

GET
/applications/{id}/conversations
curl https://api.chariotai.com/applications/{id}/conversations \
  -H "Authorization: Bearer {YOUR_API_KEY}"

Response

[
  {
        "id": "string",
        "application_id": "app_123",
        "messages": [],
        "title": "string",
        "prompt_tokens": 0,
        "completion_tokens": 0,
        "total_tokens": 0,
        "created_at": "2023-05-21T00:00:00.000Z",
        "updated_at": "2023-05-21T00:00:00.000Z"
  }
]

GET/applications/{id}/sources

List application sources

Returns a list of all sources associated with the specified application.

Request

GET
/applications/{id}/sources
curl https://api.chariotai.com/applications/{id}/sources \
  -H "Authorization: Bearer {YOUR_API_KEY}"

Response

[
  {
        "id": "string",
        "application_id": "app_123",
        "name": "string",
        "type": "string",
        "content": null,
        "embed_status": "PENDING",
        "embed_status_message": "string",
        "updated_at": "2023-05-21T23:59:59",
        "created_at": "2023-05-19T23:59:59"
  }
]

DELETE/applications/{id}/sources

Delete application sources

Permanently deletes all sources and related embeddings for the specified application. This cannot be undone.

Request

DELETE
/applications/{id}/sources
curl https://api.chariotai.com/applications/{id}/sources \
  -H "Authorization: Bearer {YOUR_API_KEY}"