ChatGPT 與本站接口

ChatGPT 官方網頁和普通聊天應用程式沒有將其底層模型整體替換為本站 API 的通用設定。不能把本站令牌填進 ChatGPT 登入框,或把自訂供應商配置當成 ChatGPT 官方功能。

如果你使用的其實是另一個支援自訂 OpenAI 位址的聊天用戶端,填寫( SHANHAI_BASE_URL 須替換為你造訪ShangHai Do網站的真實根位址):

欄位 值
Base URL SHANHAI_BASE_URL/v1
API Key 本站令牌
型號 qwen3.8-flash 或其他對話模型
請求格式 Chat Completions

自訂 GPT 的 Actions

Actions 是讓自訂 GPT 呼叫外部服務的功能。它可以把本站當作外部操作使用,並且不會取代 ChatGPT 本身的模型。

實施條件:

  1. 帳號能夠建立自訂 GPT 並使用 Actions。
  2. 服務透過公網 HTTPS 網域提供,憑證有效。只有本地位址或 HTTP 位址時,不能把下面的佔位範例當作已設定完成的 Actions 入口。
  3. 提供操作說明文件,並在 Actions 中設定 API Key / Bearer 驗證。密鑰在身份驗證設定中填寫,不寫進公開說明文件。

運營方準備 HTTPS 入口後,可以使用下面的最小操作說明。 https://api.example.com 為佔位位址,必須取代:

openapi: 3.1.0
info:
  title: ShangHai Do模型调用
  version: 1.0.0
servers:
  - url: https://api.example.com
paths:
  /v1/chat/completions:
    post:
      operationId: askShanhaiModel
      summary: 调用ShangHai Do对话模型
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [model, messages]
              properties:
                model:
                  type: string
                  enum: [qwen3.8-flash]
                messages:
                  type: array
                  items:
                    type: object
                    required: [role, content]
                    properties:
                      role:
                        type: string
                        enum: [user]
                      content:
                        type: string
                stream:
                  type: boolean
                  enum: [false]
                max_tokens:
                  type: integer
                  minimum: 1
                  maximum: 1024
      responses:
        '200':
          description: 模型返回的对话结果
          content:
            application/json:
              schema:
                type: object
                properties:
                  choices:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: object
                          properties:
                            content:
                              type: string
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

這裡的最大輸出 1024 是這個操作自行設定的限制,不是模型的最大能力。配置後可在 Actions 的調試介面發起調用,檢查返回的內容。先使用非連續輸出的短對話,避免長耗時圖片和影片任務受到外部工具等待時間限制。

參考文獻:OpenAI GPT Actions介紹, 製作注意事項.

遇到問題

呼叫或配置遇到問題,請聯絡站內客服,提供模型名稱、出錯時間和報錯訊息,便於協助排查。