Create chatbot
In this guide, we will walk through the process of creating a chatbot using an API.
Prerequisites
Before you begin, make sure you have the following:
- An API key for accessing the Chatwize API.
- A development environment or tool for making HTTP requests, such as Curl or a programming language like Python.
API Endpoint
The API endpoint for creating a chatbot is:
Request Body
To create a chatbot, you need to send a POST request to the API endpoint with a JSON request body. Here’s an example request body:
-
model (string, optional): Specify the model you want to use. In this example, we’re using
gpt-3.5-turbo
.Options available
gpt-3.5-turbo
,gpt-3.5-turbo-16k
,gpt-4
-
name (string, required): Provide a name for your chatbot.
-
prompt (string, optional): You can provide an initial prompt for your chatbot.
-
rate_limit (array, optional): Set the rate limit for the chatbot in messages per minute. It’s an array with two values: [20, 240].
First number: amount of messages. Min
1
- Max100
Second number: amount of seconds. Min1
- Max360
-
rate_limit_message (string, optional): Define a message to display when the rate limit is exceeded.
-
show_citations (boolean, optional): Set to true if you want the chatbot to show citations for its responses.
-
temperature (float, optional): You can adjust the temperature parameter for response randomness. A value of 0 makes responses deterministic, while higher values increase randomness.
Options are values as a float between
0
and1
-
visibility (string, optional): Set the visibility of your chatbot. Options are “private” or “public.”
Options available
private
,public
,hybrid
Example Request
Here’re example command sto create a chatbot using the Chatwize API:
That’s it! You’ve now learned how to create your own chatbot using the Chatwize API.