Skip to main content

Witty API (0.1.0)

Through the Witty API, you will be able to interact with essential parts of the Witty module.

Witty

API endpoints useful for Witty module

Get all agents

Retrieve a list of all agents in the Agents Catalog.

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new agent

Create a new agent.

Authorizations:
bearerAuth
Request Body schema: application/json
required
name
required
string
description
required
string
endpoint
required
string
need_authentication
required
boolean
payload
required
object
active
boolean

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "endpoint": "string",
  • "need_authentication": true,
  • "payload": { },
  • "active": true
}

Get agent by ID

Get agent by ID

Authorizations:
bearerAuth
path Parameters
id
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "description": "string",
  • "endpoint": "string",
  • "payload": { },
  • "need_authentication": true,
  • "active": true
}

Update agent by ID

Update agent by ID. You can edit a single field or multiple fields.

Authorizations:
bearerAuth
path Parameters
id
required
string <uuid>
Request Body schema: application/json
required
name
string
description
string
endpoint
string
need_authentication
boolean
payload
object
active
boolean

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "endpoint": "string",
  • "need_authentication": true,
  • "payload": { },
  • "active": true
}

Delete agent by ID

Authorizations:
bearerAuth
path Parameters
id
required
string <uuid>

Responses

Create a task

Create a task for the witty in a natual language.

Authorizations:
bearerAuth
Request Body schema: application/json
required
message
required
string
session_id
string

Responses

Request samples

Content type
application/json
{
  • "message": "string",
  • "session_id": "string"
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "session_id": "string",
  • "result": "success",
  • "error_message": "string"
}

Get message history

Retrieve message history for a given session ID.

Authorizations:
bearerAuth
path Parameters
session_id
required
string

Responses

Response samples

Content type
application/json
{
  • "session_id": "string",
  • "messages": [
    ],
  • "result": "success"
}

Get my sessions

Retrieve all session IDs for the authenticated user.

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "user_id": "string",
  • "sessions": [
    ],
  • "result": "string"
}

Get user sessions

Retrieve all session IDs for a given user ID.

Authorizations:
bearerAuth
path Parameters
user_id
required
string

Responses

Response samples

Content type
application/json
{
  • "user_id": "string",
  • "sessions": [
    ],
  • "result": "string"
}

Update session title

Update the title of a session by session ID.

Authorizations:
bearerAuth
path Parameters
session_id
required
string
Request Body schema: application/json
required
title
required
string

Responses

Request samples

Content type
application/json
{
  • "title": "string"
}

Response samples

Content type
application/json
{
  • "user_id": "string",
  • "session_id": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "last_activity": "2019-08-24T14:15:22Z"
}

Delete session

Delete a session by session ID.

Authorizations:
bearerAuth
path Parameters
session_id
required
string

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "session_id": "string"
}

Get LLM configuration

Get the current LLM configuration

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "provider": "string",
  • "endpoint": "string",
  • "api_key": "string",
  • "deployment": "string",
  • "api_version": "string",
  • "model": "string"
}

Set LLM configuration

Set LLM configuration

Authorizations:
bearerAuth
Request Body schema: application/json
required
provider
string
endpoint
string
api_key
string
deployment
string
api_version
string
model
string

Responses

Request samples

Content type
application/json
{
  • "provider": "string",
  • "endpoint": "string",
  • "api_key": "string",
  • "deployment": "string",
  • "api_version": "string",
  • "model": "string"
}

Send a message to LLM

Send a message to LLM and get a response

Authorizations:
bearerAuth
Request Body schema: application/json
required
query
string

Responses

Request samples

Content type
application/json
{
  • "query": "string"
}

Response samples

Content type
application/json
{
  • "query": "string"
}

Get embedder configuration

Get the current embedder configuration

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "provider": "string",
  • "endpoint": "string",
  • "api_key": "string",
  • "deployment": "string",
  • "api_version": "string",
  • "model": "string"
}

Set embedder configuration

Set embedder configuration

Authorizations:
bearerAuth
Request Body schema: application/json
required
provider
string
endpoint
string
api_key
string
deployment
string
api_version
string
model
string

Responses

Request samples

Content type
application/json
{
  • "provider": "string",
  • "endpoint": "string",
  • "api_key": "string",
  • "deployment": "string",
  • "api_version": "string",
  • "model": "string"
}