Quick Start

Train and engage your first chatbot.

Start by creating a project in BoostGPT, which will provide you with a dedicated workspace for each of your applications. Within each project, you can create and train multiple chatbots.

To begin, create your initial project and copy its ID. Go to the project settings to copy your project ID or go here: https://app.boostgpt.co/settings.

For illustration purposes, let's say you created a project which has the ID: "13c8cc4a-ddef-11ed-b5a3-33d8a09a24e3".

Get your API Key

API requests require authentication via API keys. If an API key is not included in a request, an error message will be returned. To generate a new API key, go to the API keys page which can be found in your account settings, and create a new API key or go here: https://app.boostgpt.co/account/api-keys. Make sure to copy the API key once it's generated.

Create your first chatbot

You're all set to create your first chatbot on BoostGPT. To do so, send a POST request to the "create bot" endpoint. Once the chatbot has been successfully created, it will be visible on your BoostGPT dashboard.

curl --location 'http://api.boostgpt.co/v1/bot/create' \
--header 'Authorization: Bearer 8a79d8c2-e018-11ed-b5a3-33d8a09a24e3' \
--data '{
    "project_id": "13c8cc4a-ddef-11ed-b5a3-33d8a09a24e3",
    "name": "Example name",
    "model": "gpt-3.5-turbo",
    "instruction": "I want you to act as an AI assistant that I am having a conversation with. Your name is '\''AI Assistant'\'' and you always formats your responses in Markdown. You will provide me with answers from the given context. If the answer is not included, say exactly '\''Hmm, I am not sure.'\'' and stop after that. Refuse to answer any question not about the info. Never break character.",
    "status": 1
}'

This will output a response that looks like this.

{
    "bot": {
        "uuid": "fa155610-e2a2-11ed-8d7e-128759b35991",
        "name": "Example name",
        "model": "gpt-3.5-turbo",
        "max_reply_tokens": "300",
        "instruction": "I want you to act as an AI assistant that I am having a conversation with. Your name is 'AI Assistant' and you always formats your responses in Markdown. You will provide me with answers from the given context. If the answer is not included, say exactly 'Hmm, I am not sure.' and stop after that. Refuse to answer any question not about the info. Never break character.",
        "status": 1,
        "updated_at": "2023-04-24T13:21:52.000Z"
    }
}

Train your chatbot

In the following steps, we'll show you how to include training data in your chatbot. By following these instructions, you'll learn how to improve the accuracy and quality of your chatbot's responses by providing it with additional context and information.

curl --location 'http://api.boostgpt.co/v1/bot/source/create' \
--header 'Authorization: Bearer 8a79d8c2-e018-11ed-b5a3-33d8a09a24e3' \
--data '{
    "project_id": "13c8cc4a-ddef-11ed-b5a3-33d8a09a24e3",
    "bot_id": "8e9124a2-e0a3-11ed-b5a3-33d8a09a24e3",
    "tags": [],
    "type": "text",
    "source": "YOUR SOURCE DATA"
}'

This will output a response that looks like this.

{
    "source": {
        "uuid": "1f2fbbd2-e436-11ed-ad91-a2ce1f33a089",
        "source": "",
        "type": "text",
        "links_crawled": [],
        "links_crawled_count": "0",
        "tags": [],
        "tokens": 199
    }
}

Engage your chatbot

In the example provided below, we demonstrate how you can engage with a chatbot that has been trained using your specific data. This will enable you to witness how the chatbot performs in terms of providing appropriate and accurate responses based on the training data you've provided. You will need an Openai key to chat with a bot.

curl --location 'http://api.boostgpt.co/v1/bot/chat' \
--header 'Authorization: Bearer 8a79d8c2-e018-11ed-b5a3-33d8a09a24e3' \
--data '{
    "project_id": "13c8cc4a-ddef-11ed-b5a3-33d8a09a24e3",
    "bot_id": "8e9124a2-e0a3-11ed-b5a3-33d8a09a24e3",
    "openai_key": "YOUR-OPENAI-APIKEY", //OR
    "anthropic_key": "YOUR-ANTHROPIC-APIKEY", //OR
    "googleai_key": "YOUR-GOOGLEAI-APIKEY", //OR
    "xai_key": "YOUR-XAI-APIKEY",
    "model": "gpt-3.5-turbo", 
    "message":"USER MESSAGE",
    "source_ids": ["832146d2-e43c-11ed-ad91-a2ce1f33a089"],
    "tags": ["twitter"],
    "top":15,
    "instruction": "",
    "max_reply_tokens": 300,
    "chat_id": "example-chat-id",
    "stream": false
}'

A sample of how the response looks is shown below.

{
    "chat": {
        "reply": "BOT REPLY",
        "meta": [
            {
                "source_id": "832146d2-e43c-11ed-ad91-a2ce1f33a089",
                "tags": [
                    "twitter",
                    "revue"
                ]
            }
        ],
        "usage": {
            "prompt_tokens": 380,
            "completion_tokens": 82,
            "total_tokens": 462
        }
    }
}

Questions?

Join our Discord server.

Last updated

Was this helpful?