Documentation Index
Fetch the complete documentation index at: https://docs.chatfly.co/llms.txt
Use this file to discover all available pages before exploring further.
API Endpoint
The API endpoint for obtaining a streaming response with custom setting is:
https://backend.chatfly.co/api/chat/get-streaming-response-with-custom-settings
To get a streaming response, you need to send a POST request to the API endpoint with a Params and JSON request.
Here’s an example Params request:
- type_qa (string): type of question message.
And here’s an example JSON request:
{
"bot_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"message": "Hi",
"chat_history": [
{
"sender_type": "user",
"content": "Hi"
},
{
"sender_type": "assistant",
"content": "Hello! How can I assist you today?"
}],
"custom_prompt": "I want you to act as an assistant to a customer support agent by writing email responses...",
"gpt_model_name": "gpt-3.5-turbo-16k",
"temperature": 0,
"rules": []
}
Example Request
Here are example commands to obtain a streaming response with custom settings using the ChatFly API:
curl -X 'POST' \
'https://backend.chatfly.co/api/chat/get-streaming-response-with-custom-settings' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"type_qa": "string",
"bot_id": "xxxx-xxxx-xxxx-xxxx",
"message": "Hi",
"chat_history": [
{
"sender_type": "user",
"content": "Hi"
},
{
"sender_type": "assistant",
"content": "Hello! How can I assist you today?"
}],
"custom_prompt": "I want you to act as an assistant to a customer support agent by writing email responses...",
"gpt_model_name": "gpt-3.5-turbo-16k",
"temperature": 0,
"rules": []
}'
Response Body
The streaming response is as follows:
*Answer:* Hello! How can I assist you today?
*Suggest Questions:*
1. What specific information are you looking for?
2. Is there a particular department or service you need assistance with?
3. Can you provide more details about your inquiry or issue?
4. How can I help make your experience better?