API Endpoint

The API endpoint for obtaining a streaming response is:

https://backend.chatfly.co/api/chat/get-streaming-response-with-chat-history

Request Body

To get a streaming response, you need to send a POST request to the API endpoint with a JSON request. Here’s an example JSON request:

{
  "bot_id": "xxxx-xxxx-xxxx-xxxx",
  "message": "string",
  "chat_history": []
}
  • bot_id (string): ID of your bot.
  • message (string): Message from the user.
  • chat_history (list): List of the chat history with sender_type and content.

Example Request

Here are example commands to obtain a streaming response using the ChatFly API:

Response Body

The streaming response is as follows:

string
  • string (string): A string of the response.

Result with python, equivalent to javascript and curl:

response streaming