Migachat

On October 27, 2023, Posted by , In English, With Comments Off on Migachat

Migachat User Manual

The Migachat module is a versatile AI assistant and integration tool designed to empower businesses to handle user interactions through AI. It serves various use cases, including chatbot development, AI-driven customer support, educational platforms, and more.

 

SETTINGS

For detailed API configuration, please refer to the documentation: Link to Documentation.

  1. Backoffice settings

  1. Duration to maintain the history of chats

    • Here you can set the duration to maintain the history of chats. The chat history older than the duration will be deleted automatically.

  1. OpenAI models tokens limit

    • The OpenAI chat model’s token max limit is configured here. It is useful if in the future there are new models or changes in the limit of existing models.

  • MODULE CONFIGURATION

    ChatGPT API Setup 

    • In the Module Operation, select the ChatGPT API.
    • Add Organization ID: Obtain this from Organization Settings.
    • Add Secret Key: Retrieve this from API Keys.
    • History Tokens %: The tokens reserved for the history of messages are to be attached with API calls to preserve the context of the chat.
    • Max messages in history: no of messages to include in history.
    • System prompt tokens %: Token reserved for system prompt to be attached with the API call.
    • After saving the form, the system will verify the entered credentials. Incorrect credentials will prevent saving.

 

 Webhook & Web-Service Setup

    • In the Module Operation, select the Webhook.
    • Add a valid Webhook URL.
    • Use the provided Auth Token in the web service request, which can be regenerated at any time. 

 

OpenAI Configuration (Only Available if ChatGPT API is selected)

    • After setting up the module configuration, specify the AI model to use for your chatbot.
    • Select Model: Choose the OPEN AI ChatGPT Model.

 

System Prompt for OpenAI ChatGPT Configuration

    • Manage the system prompt by enabling or disabling it.
    •  Add the system prompt text.

    • You can optimize the System prompt by clicking the “Optimize system prompt”.
    • The ChatGPT API will optimize this. 
    • A popup model is displayed. Here you can keep the existing system prompt or save the new optimized system prompt
    • You can translate the System prompt by clicking the “Translate the system prompt into English”. 
    • A popup model is displayed. Here you can keep the existing system prompt or save the new translated system prompt.
    • Last saved tokens: The count of tokens after saving the system prompt is displayed plus the token reserved for the system prompt according to the set percentage and the Model’s total tokens.

Bridge API Configurations (API for 3rd Parties)

    • Configure security settings, including an authentication token and token limits for interactions.
    • Authentication Token: An API authentication token for request authentication.
    • Add Overall Duration for Tokens Limit: Set the duration for the token limit for all the CHAT IDs in an instance (default: 24 hours).
    • Add Overall Tokens Limit: Define the token limit for all the CHAT IDs in an instance (default: 2,500,000 Tokens). An email will be sent to the admins of the application if this limit is reached.
    • Select the Per Chat ID Tokens Limit Duration: Set the duration for the token limit of a single CHAT ID (default: 60 minutes).
    • Add Per Chat ID Tokens Limit: Specify the token limit for a single CHAT ID (default: 100,000 Tokens). An email will be sent to the admins of the application if this limit is reached.
    • Add User Chat Limit Exceed Response: Configure the response when a single CHAT ID reaches the token limit, and it will be automatically translated into the language of the previous chat.
    • Set the AI Answer Token Limit: Define the token limit for AI responses, which will be the same for all AI models.
    • Enable or Disable the Bridge API functionality.

Tokens Limit For fine-tuned Models

    • Here you can set the total tokens limit of custom fine-tuned openAi models.

GDPR Settings (only for bridge API)

In this module with GDPR privacy enabled, when a user sends a message via the bridge API, the system prompts the user for GDPR privacy consent. If consent is granted, the system may then ask for commercial consent if that feature is enabled. If a user declines GDPR consent, their data is flagged for deletion after a specified Reset Duration.
In the case of an agent initializing a new chat with a new chat ID, the system does not ask for GDPR consent from the user, and the consent is marked as external. This approach ensures compliance with GDPR principles by obtaining explicit user consent for data processing and respecting user preferences regarding commercial interactions.

    • Configure the GDPR settings.
    • GDPR privacy Enabled?: To enable or disable the GDPR consent from bridge API users.
    • GDPR privacy link: Privacy link to redirect the user if the user wants to read the privacy statement.
    • GDPR welcome text: Text to send the user for the first time to collect the GDPR consent.
    • GDPR accepts text: Text to be sent when the user accepts the GDPR Privacy consent.
    • GDPR denied text: Text to be sent when the user denies the GDPR Privacy consent.
    • Reset duration: Time in minutes to remove the user’s personal information and ask for the GDPR consent again.
    • COMMERCIAL CONSENT Enabled?: To enable/disable the COMMERCIAL consent from bridge API users.
    • COMMERCIAL welcome text: Text to send the user for the first time to collect the COMMERCIAL consent.

GDPR LOGS

    • You can check the GDPR consent USERS.
    • You can Force the Privacy consent for All CHAT IDS

App Chat Archive

In this section, you can access application statistics, view reports, and explore customer chat logs.

    • Retrieve application chat stats and download CSV with stats such as Total Active customers, Total prompt tokens, and Total Completion Tokens.
    • Export a complete chat of active customers within a specified date range.
    • Get customer chat for a given date range, view chat history, and token usage. You can delete the complete chat history for a selected customer and download CSV for the date range and customer.

 

API Chat Archive (BridgeAPI)

In this section, you can access bridge API statistics, view reports, and explore CHAT ID chat logs.

    • Get BridgeAPI chat stats and download CSV, including Total Active CHAT IDs, Total prompt tokens, and Total Completion Tokens.
    • Export complete chat of active CHAT IDs within a specified date range.
    • Access customer chat for a given date range, view chat history, and token usage, and delete complete chat history for a selected customer.
    • You can delete the complete chat logs of API for an instance of the module by clicking “Delete API chat history”

Logs

    • The Logs section allows you to view logs for the last 30 chats across the system and see any errors encountered during interactions.
    • New received Messages push notification logs.

Operator Settings Documentation

  • Overview

The Operator Settings panel in the Migachat application allows you to configure various settings for operator interactions within the application, including enabling or disabling features for in-app and bridge API chats, setting up webhooks, configuring prompts and responses for user interactions, and managing email notifications.

  • Settings Form

  • In-App Chat
      1. Label: Enabled for In-App chat?
      2. Field Type: Dropdown (Yes/No)
      3. Description: Enable or disable operator settings for in-app chat.

  • Bridge API Chat
    1. Label: Enabled for Bridge API chat?
    2. Field Type: Dropdown (Yes/No)
    3. Description: Enable or disable operator settings for bridge API chat.

  • Webhook URL

    1. Label: Webhook URL
    2. Field Type: Text Input
    3. Description: The URL to which webhook notifications will be sent. This webhook must accept POST requests. The POST request will contain the following parameters:

  – `chat_type` (in_app, api)

  – `user_id`

  – `app_id`

  – `app_name`

  – `instance_id`

  – `operator_request_id`

  – `user_email`

  – `user_mobile`

  – `date_time`

  – `last_five_history`

  • System Prompt

    1. Label: System Prompt to check if user asked for operator to contact
    2. Field Type: Textarea
    3. Description: Custom prompt to analyze user input and determine if they want to speak to an operator. Default prompt: `Analyze this text string that a user wrote on our support chat (user prompt), reply with 1 if it is sufficiently probable that it means that the user wants to speak to an operator. If it is not clear enough and in all other cases reply with a 0.`
  • Ask for Call from Operator Message

    1. Label: Ask for call from operator text
    2. Field Type: Textarea
    3. Description: Custom message to ask users if they want a call from an operator. Default message: `Do you want me to have one of our operators call you? (Type Yes or No)`
  • Confirm Call from Operator Message

    1. Label: Confirm call from operator response text
    2. Field Type: Textarea
    3. Description: Custom message to confirm that an operator will contact the user. Default message: `Perfect, I warned my colleagues, they will be in touch very soon. Now you can continue to ask me for information if you want.`

  • Decline Call from Operator Message

    1. Label: Decline call from operator response text
    2. Field Type: Textarea
    3. Description: Custom message if the user declines a call from an operator. Default message: `From what I understand you are not interested in a call from one of our operators. We can continue to chat about other things if you want.`
  • Additional Emails

    1. Label: Add comma-separated emails to send notification
    2. Field Type: Textarea
    3. Description: List of additional email addresses to send notifications to. By default, the email will be sent to admins.
  • Email Subject

    1. Label: Email Subject
    2. Field Type: Textarea
    3. Description: Subject line for notification emails. Default subject: `Customer asked to contact operator.`
  • Email Template

    1. Label: Email Template
    2. Field Type: Textarea
    3. Description: Template for notification emails. The template can contain the following placeholders:
  •   – `@@app_id@@`
  •   – `@@app_name@@`
  •   – `@@instance_id@@`
  •   – `@@user_name@@`
  •   – `@@user_email@@`
  •   – `@@user_mobile@@`
  •   – `@@chat_id@@`
  •   – `@@chat_type@@`
  •   – `@@operator_request_id@@`
  •   – `@@date_time@@`
  •   – `@@last_five_history@@`

 

  • Call from Operator Requests

This section displays a table of operator request data, including:

  • – User Id
  • – Name
  • – Email
  • – Mobile
  • – Date Time
  • – Bot Type
  • – Status
  • – Action (e.g., accepting a pending request)

  • Handling User Prompts

    1. Initial Request: If the Bridge API is enabled and the user hasn’t already asked for an operator, analyze the user prompt using the configured system prompt. If the user likely wants to speak to an operator, set the `asked_for_operator` flag and prompt the user to confirm if they want a call from an operator.
    2.  User Confirmation: If the user has already asked for an operator, analyze the user’s response to confirm if they want a call. If confirmed, save the request, send webhook notifications, and email notifications, then reset the `asked_for_operator` flag and notify the user that an operator will contact them soon. If declined, reset the flag and inform the user that the request was not made.

Application Interface

  • The Application interface provides a user-friendly chatbot-like experience that you can access after logging in.
  • You can copy the AI response by clicking the clipboard icon.

LINK: https://support.migastone.com/en/hrf_faq/migachat/