Witty API
note
Read this page in wide view mode from here
Witty API (0.1.0)
Through the Witty API, you will be able to interact with essential parts of the Witty module.
Get all agents
Retrieve a list of all agents in the Agents Catalog.
Authorizations:
bearerAuth
Responses
Response samples
- 200
Content type
application/json
[- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "description": "string",
- "endpoint": "string",
- "payload": { },
- "need_authentication": true,
- "active": true
}
]Create a new agent
Create a new agent.
Authorizations:
bearerAuth
Request Body schema: application/jsonrequired
| name required | string |
| description required | string |
| endpoint required | string |
| need_authentication required | boolean |
| payload required | object |
| active | boolean |
Responses
Request samples
- Payload
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
- 200
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/jsonrequired
| name | string |
| description | string |
| endpoint | string |
| need_authentication | boolean |
| payload | object |
| active | boolean |
Responses
Request samples
- Payload
Content type
application/json
{- "name": "string",
- "description": "string",
- "endpoint": "string",
- "need_authentication": true,
- "payload": { },
- "active": true
}Create a task
Create a task for the witty in a natual language.
Authorizations:
bearerAuth
Request Body schema: application/jsonrequired
| message required | string |
| session_id | string |
Responses
Request samples
- Payload
Content type
application/json
{- "message": "string",
- "session_id": "string"
}Response samples
- 200
Content type
application/json
{- "message": "string",
- "session_id": "string",
- "result": "success",
- "error_message": "string"
}Get my sessions
Retrieve all session IDs for the authenticated user.
Authorizations:
bearerAuth
Responses
Response samples
- 200
Content type
application/json
{- "user_id": "string",
- "sessions": [
- {
- "user_id": "string",
- "session_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "last_activity": "2019-08-24T14:15:22Z"
}
], - "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
- 200
Content type
application/json
{- "user_id": "string",
- "sessions": [
- {
- "user_id": "string",
- "session_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "last_activity": "2019-08-24T14:15:22Z"
}
], - "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/jsonrequired
| title required | string |
Responses
Request samples
- Payload
Content type
application/json
{- "title": "string"
}Response samples
- 200
Content type
application/json
{- "user_id": "string",
- "session_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "last_activity": "2019-08-24T14:15:22Z"
}Set LLM configuration
Set LLM configuration
Authorizations:
bearerAuth
Request Body schema: application/jsonrequired
| provider | string |
| endpoint | string |
| api_key | string |
| deployment | string |
| api_version | string |
| model | string |
Responses
Request samples
- Payload
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/jsonrequired
| provider | string |
| endpoint | string |
| api_key | string |
| deployment | string |
| api_version | string |
| model | string |
Responses
Request samples
- Payload
Content type
application/json
{- "provider": "string",
- "endpoint": "string",
- "api_key": "string",
- "deployment": "string",
- "api_version": "string",
- "model": "string"
}