[3Chat_Copilot]解决方案_v1

3Chat Copilot User Guide

Overview:

  1. Control by setting the “Reply Strategy” to accountId does not contain copilot: Do not reply to User messages. When passing context, use copilot_{accountId} as the conversation’s userId to enable replies to 3Chat_Copilot messages.
  2. Disable the “Memory” feature.
  3. For configuration details, refer to: 在客户接待工作台控制 AI 上下线与联系人画像. Enter the following URL in the configuration field: https://assets.xinheyun.com/custom_html/3chat_copilot.html?oauth={Oauth_token}

1. System Introduction

3Chat Copilot is an AI reply assistance tool for private chat scenarios.

It reads the current session information and recent chat context, submits valid user/customer service messages to the Copilot Agent, generates reply suggestions, and displays them in the sidebar for users to copy and use.

Key capabilities:

  • Automatically identifies the current chat partner and session
  • Automatically reads the most recent Copilot reply suggestion
  • Supports custom context message count (1–30 messages, default 30)
  • One-click generation of new AI reply suggestions
  • Supports copying individual reply suggestions
  • Retains the last 100 API execution logs for troubleshooting

Currently, only private chats are supported; group chats are not yet supported.


2. System Logic

flowchart TD
    A[Open Copilot Sidebar] --> B[Read current chat information]
    B --> C{Is it a private chat?}

    C -- No --> D[Display message: Group chats are not yet supported]
    C -- Yes --> E{Is OAuth / session information complete?}

    E -- No --> F[Display message: Configuration or session information is abnormal]
    E -- Yes --> G[Query Copilot session]
    G --> H[Read recent Copilot history]
    H --> I[Display recent user messages and reply suggestions]

    I --> J{User clicks "Generate Reply Suggestion"?}
    J -- No --> I
    J -- Yes --> K[Read the most recent N messages from the current session]

    K --> L[Organize user / assistant context]
    L --> M[Submit to Copilot Agent]
    M --> N{Was a valid reply generated?}

    N -- No --> O[Display error and log]
    N -- Yes --> P[Display new reply suggestion]
    P --> Q[User copies the reply for use]
    P --> R[Sync refresh Copilot's latest history]

3. How to Use

  1. Enter a customer’s private chat session and open the 3Chat Copilot sidebar.
  2. The system will automatically read the current contact, session information, and recent Copilot reply suggestions.
  3. Set the “Context Message Count” as needed; it is recommended to keep the default value of 30.
  4. Click “Generate Reply Suggestion”.
  5. Wait for the system to generate reply suggestions, select the appropriate content, and click “Copy”.
  6. If an anomaly occurs, you can view the “API Execution Logs” at the bottom of the page to assist with troubleshooting.

4. Important Notes

  • Only private chats are supported; group chats are not supported.
  • The page must include a valid oauth parameter; otherwise, the API cannot be called.
  • Reply quality is affected by the completeness of the chat context.
  • The context reads a maximum of 30 messages.
  • If automatic copying is restricted by the browser, the system will display a text box for manual copying.