Bot

Test the OpenAI Chat Bot with custom text input

post/bot/test

Request

  • Base URL: https://api.carbonvoice.app
  • URL: https://api.carbonvoice.app/bot/test
  • Auth: one of:
    • API key in header pxtoken
    • OAuth 2 (implicit, authorization URL https://api.carbonvoice.app/oauth/authorize)

Request body

textstring required

The text to test with the chat bot

workspace_idstring required

Workspace ID to use for testing

chat_history_channel_idstring

Chat history channel ID to use for testing

languagestring

Language for the response

Example request

{
  "text": "Hey Carbon, what is the weather today?",
  "sources": [
    {
      "type": "channel_id",
      "value": "channel_123"
    },
    {
      "type": "message_id",
      "value": "message_123"
    },
    {
      "type": "user_id",
      "value": "user_123"
    }
  ],
  "workspace_id": "workspace_123",
  "chat_history_channel_id": "channel_123",
  "language": "english"
}

Response

Successfully generated response from the chat bot

textstring required

The answer text

message_idsstring[] required

List of message IDs that were used to generate the answer

channel_idsstring[] required

List of channel IDs that were searched

workspace_idstring required

The workspace ID that was searched

Example response

{
  "text": "Based on the conversation, you discussed the project timeline and agreed to complete the first phase by next Friday.",
  "message_ids": [
    "msg_123",
    "msg_456",
    "msg_789"
  ],
  "channel_ids": [
    "asdfasdfsdfsdf"
  ],
  "workspace_id": "wksp_123456789"
}

Changes

No recorded changes to this operation across all 1 revision of this API.