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 自身的模型。
实施条件:
- 账号能够创建自定义 GPT 并使用 Actions。
- 服务通过公网 HTTPS 域名提供,证书有效。仅有本地地址或 HTTP 地址时,不能把下面的占位示例当作已配置完成的 Actions 入口。
- 提供操作说明文件,并在 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 入门、生产使用注意事项。
遇到问题
调用或配置遇到问题,请联系站内客服,提供模型名、出错时间和报错信息,便于协助排查。