requests
library to perform HTTP requests to the API endpoints.
Prerequisites
- Ensure that the Docker container is running.
-
Install the
requests
library if you haven’t already:
Base URL
Update theBASE_URL
variable to match the server’s actual address if necessary.
Creating a Chatbot Configuration
Sample Configuration
/create/config
endpoint.
Creating a Chatbot from PDF Files
To create a new chatbot instance from multiple PDF files, send a POST request to the/create/from-pdf/{config_id}
endpoint.
Checking Chatbot Status
To check if a chatbot instance exists, send a GET request to the/check/{chatbot_id}
endpoint.
Chatting with the Chatbot
To interact with a specific chatbot instance, send a POST request to the/chat/{chatbot_id}
endpoint with a message and chat history.
Health Check
To perform a health check on the API, send a GET request to the/health
endpoint.
Recreating a Chatbot with New Configuration
To recreate a chatbot instance with a new configuration, send a POST request to the/recreate/{chatbot_id}/{config_id}
endpoint with the new configuration.
Creating a Chatbot from DOCX Files
To create a new chatbot instance from multiple DOCX files, send a POST request to the/create/from-docx/{config_id}
endpoint.
Creating a Chatbot from Text Files
To create a new chatbot instance from multiple text files, send a POST request to the/create/from-text/{config_id}
endpoint.
BASE_URL
as necessary to match the server’s actual address.