mirror of
https://github.com/LLM-Red-Team/step-free-api.git
synced 2025-10-14 07:01:16 +00:00
Update README_EN.md
This commit is contained in:
276
README_EN.md
276
README_EN.md
@@ -1,154 +1,139 @@
|
||||
# 跃问YueWen Free 服务
|
||||
|
||||
<hr>
|
||||
|
||||
<span>[ 中文 | <a href="README_EN.md">English</a> ]</span>
|
||||
# StepChat Free Service
|
||||
|
||||
[](LICENSE)
|
||||

|
||||

|
||||

|
||||
|
||||
支持高速流式输出、支持多轮对话、支持联网搜索、支持长文档解读、支持图像解析,零配置部署,多路token支持,自动清理会话痕迹。
|
||||
Supports high-speed streaming output, multi-turn dialogues, internet search, long document reading, image analysis, zero-configuration deployment, multi-token support, and automatic session trace cleanup.
|
||||
|
||||
与ChatGPT接口完全兼容。
|
||||
Fully compatible with the ChatGPT interface.
|
||||
|
||||
还有以下九个free-api欢迎关注:
|
||||
Also, the following free APIs are available for your attention:
|
||||
|
||||
Moonshot AI(Kimi.ai)接口转API [kimi-free-api](https://github.com/LLM-Red-Team/kimi-free-api)
|
||||
Moonshot AI (Kimi.ai) API to API [kimi-free-api](https://github.com/LLM-Red-Team/kimi-free-api/tree/master)
|
||||
|
||||
阿里通义 (Qwen) 接口转API [qwen-free-api](https://github.com/LLM-Red-Team/qwen-free-api)
|
||||
StepFun (StepChat) API to API [step-free-api](https://github.com/LLM-Red-Team/step-free-api)
|
||||
|
||||
智谱AI (智谱清言) 接口转API [glm-free-api](https://github.com/LLM-Red-Team/glm-free-api)
|
||||
Ali Tongyi (Qwen) API to API [qwen-free-api](https://github.com/LLM-Red-Team/qwen-free-api)
|
||||
|
||||
秘塔AI (Metaso) 接口转API [metaso-free-api](https://github.com/LLM-Red-Team/metaso-free-api)
|
||||
ZhipuAI (ChatGLM) API to API [glm-free-api](https://github.com/LLM-Red-Team/glm-free-api)
|
||||
|
||||
字节跳动(豆包)接口转API [doubao-free-api](https://github.com/LLM-Red-Team/doubao-free-api)
|
||||
Meta Sota (metaso) API to API [metaso-free-api](https://github.com/LLM-Red-Team/metaso-free-api)
|
||||
|
||||
讯飞星火(Spark)接口转API [spark-free-api](https://github.com/LLM-Red-Team/spark-free-api)
|
||||
Iflytek Spark (Spark) API to API [spark-free-api](https://github.com/LLM-Red-Team/spark-free-api)
|
||||
|
||||
MiniMax(海螺AI)接口转API [hailuo-free-api](https://github.com/LLM-Red-Team/hailuo-free-api)
|
||||
Lingxin Intelligence (Emohaa) API to API [emohaa-free-api](https://github.com/LLM-Red-Team/emohaa-free-api) (OUT OF ORDER)
|
||||
|
||||
深度求索(DeepSeek)接口转API [deepseek-free-api](https://github.com/LLM-Red-Team/deepseek-free-api)
|
||||
## Table of Contents
|
||||
|
||||
聆心智能 (Emohaa) 接口转API [emohaa-free-api](https://github.com/LLM-Red-Team/emohaa-free-api)
|
||||
|
||||
## 目录
|
||||
|
||||
* [免责声明](#免责声明)
|
||||
* [在线体验](#在线体验)
|
||||
* [效果示例](#效果示例)
|
||||
* [接入准备](#接入准备)
|
||||
* [多账号接入](#多账号接入)
|
||||
* [Docker部署](#Docker部署)
|
||||
* [Docker-compose部署](#Docker-compose部署)
|
||||
* [Render部署](#Render部署)
|
||||
* [Vercel部署](#Vercel部署)
|
||||
* [原生部署](#原生部署)
|
||||
* [推荐使用客户端](#推荐使用客户端)
|
||||
* [接口列表](#接口列表)
|
||||
* [对话补全](#对话补全)
|
||||
* [文档解读](#文档解读)
|
||||
* [图像解析](#图像解析)
|
||||
* [refresh_token存活检测](#refresh_token存活检测)
|
||||
* [注意事项](#注意事项)
|
||||
* [Nginx反代优化](#Nginx反代优化)
|
||||
* [Token统计](#Token统计)
|
||||
* [Announcement](#Announcement)
|
||||
* [Online experience](#Online-Experience)
|
||||
* [Effect Examples](#Effect-Examples)
|
||||
* [Access preparation](#Access-Preparation)
|
||||
* [Multiple account access](#Multi-Account-Access)
|
||||
* [Docker Deployment](#Docker-Deployment)
|
||||
* [Docker-compose Deployment](#Docker-compose-Deployment)
|
||||
* [Render Deployment](#Render-Deployment)
|
||||
* [Vercel Deployment](#Vercel-Deployment)
|
||||
* [Native Deployment](#Native-Deployment)
|
||||
* [Recommended Clients](#Recommended-Clients)
|
||||
* [Interface List](#Interface-List)
|
||||
* [Conversation completion](#conversation-completion)
|
||||
* [Document Interpretation](#document-interpretation)
|
||||
* [Image analysis](#image-analysis)
|
||||
* [refresh_token survival detection](#refresh_token-survival-detection)
|
||||
* [Precautions](#Precautions)
|
||||
* [Nginx anti-generation optimization](#Nginx-anti-generation-optimization)
|
||||
* [Token statistics](#Token-statistics)
|
||||
* [Star History](#star-history)
|
||||
|
||||
## 免责声明
|
||||
## Announcement
|
||||
|
||||
**逆向API是不稳定的,建议前往阶跃星辰官方 https://platform.stepfun.com/ 付费使用API,避免封禁的风险。**
|
||||
**This API is unstable. So we highly recommend you go to the [StepChat](https://platform.stepfun.com/) use the offical API, avoiding banned.**
|
||||
|
||||
**本组织和个人不接受任何资金捐助和交易,此项目是纯粹研究交流学习性质!**
|
||||
**This organization and individuals do not accept any financial donations and transactions. This project is purely for research, communication, and learning purposes!**
|
||||
|
||||
**仅限自用,禁止对外提供服务或商用,避免对官方造成服务压力,否则风险自担!**
|
||||
**For personal use only, it is forbidden to provide services or commercial use externally to avoid causing service pressure on the official, otherwise, bear the risk yourself!**
|
||||
|
||||
**仅限自用,禁止对外提供服务或商用,避免对官方造成服务压力,否则风险自担!**
|
||||
**For personal use only, it is forbidden to provide services or commercial use externally to avoid causing service pressure on the official, otherwise, bear the risk yourself!**
|
||||
|
||||
**仅限自用,禁止对外提供服务或商用,避免对官方造成服务压力,否则风险自担!**
|
||||
**For personal use only, it is forbidden to provide services or commercial use externally to avoid causing service pressure on the official, otherwise, bear the risk yourself!**
|
||||
|
||||
## 在线体验
|
||||
## Effect Examples
|
||||
|
||||
此链接仅临时测试功能,不可长期使用,长期使用请自行部署。
|
||||
### Identity Verification
|
||||
|
||||
https://udify.app/chat/RGqDVPHspgQgGSgf
|
||||

|
||||
|
||||
## 效果示例
|
||||
### Multi-turn Dialogue
|
||||
|
||||
### 验明正身Demo
|
||||

|
||||
|
||||

|
||||
### Internet Search
|
||||
|
||||
### 多轮对话Demo
|
||||

|
||||
|
||||

|
||||
### Long Document Reading
|
||||
|
||||
### 联网搜索Demo
|
||||

|
||||
|
||||

|
||||
### Image Analysis
|
||||
|
||||
### 长文档解读Demo
|
||||

|
||||
|
||||

|
||||
|
||||
### 图像解析Demo
|
||||
## Access Preparation
|
||||
|
||||

|
||||
Obtain `deviceId` and `Oasis-Token` from [yuewen.cn](https://yuewen.cn)
|
||||
|
||||
## 接入准备
|
||||
|
||||
从 [yuewen.cn](https://yuewen.cn) 获取deviceId和Oasis-Token
|
||||
|
||||
进入StepChat随便发起一个对话,然后F12打开开发者工具。
|
||||
|
||||
1. 从Application > LocalStorage中找到 `deviceId` 的值(去除双引号),如:`267bcc81a01c2032a11a3fc6ec3e372c380eb9d1`
|
||||
Enter StepChat and start a random conversation, then press F12 to open the developer tools.
|
||||
|
||||
1. Find the value of `deviceId` in Application > LocalStorage (remove quotation marks), for example: `267bcc81a01c2032a11a3fc6ec3e372c380eb9d1`
|
||||

|
||||
|
||||
2. 从Application > Cookies中找到 `Oasis-Token` 的值,如:`eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...`
|
||||
|
||||
2. Find the value of `Oasis-Token` in Application > Cookies, for example: `eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...`
|
||||

|
||||
|
||||
3. 将 `deviceId` 和 `Oasis-Token` 使用 `@` 拼接为Token,这将作为Authorization的Bearer Token值:`Authorization: Bearer 267bcc81a01c2032a11a3fc6ec3e372c380eb9d1@eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...`
|
||||
3. Concatenate `deviceId` and `Oasis-Token` using `@` to create the Token, which will be used as the Bearer Token value for Authorization: `Authorization: Bearer 267bcc81a01c2032a11a3fc6ec3e372c380eb9d1@eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...`
|
||||
|
||||
### 多账号接入
|
||||
### Multi-Account Access
|
||||
|
||||
你可以通过提供多个账号的refresh_token并使用`,`拼接提供:
|
||||
You can provide multiple account refresh_tokens and use `,` to join them:
|
||||
|
||||
`Authorization: Bearer TOKEN1,TOKEN2,TOKEN3`
|
||||
|
||||
每次请求服务会从中挑选一个。
|
||||
The service will pick one each time a request is made.
|
||||
|
||||
## Docker部署
|
||||
## Docker Deployment
|
||||
|
||||
请准备一台具有公网IP的服务器并将8000端口开放。
|
||||
Please prepare a server with a public IP and open port 8000.
|
||||
|
||||
拉取镜像并启动服务
|
||||
Pull the image and start the service
|
||||
|
||||
```shell
|
||||
docker run -it -d --init --name step-free-api -p 8000:8000 -e TZ=Asia/Shanghai vinlic/step-free-api:latest
|
||||
```
|
||||
|
||||
查看服务实时日志
|
||||
check real-time service logs
|
||||
|
||||
```shell
|
||||
docker logs -f step-free-api
|
||||
```
|
||||
|
||||
重启服务
|
||||
Restart service
|
||||
|
||||
```shell
|
||||
docker restart step-free-api
|
||||
```
|
||||
|
||||
停止服务
|
||||
Shut down service
|
||||
|
||||
```shell
|
||||
docker stop step-free-api
|
||||
```
|
||||
|
||||
### Docker-compose部署
|
||||
### Docker-compose Deployment
|
||||
|
||||
```yaml
|
||||
version: '3'
|
||||
@@ -164,24 +149,25 @@ services:
|
||||
- TZ=Asia/Shanghai
|
||||
```
|
||||
|
||||
### Render部署
|
||||
### Render Deployment
|
||||
|
||||
**注意:部分部署区域可能无法连接step,如容器日志出现请求超时或无法连接,请切换其他区域部署!**
|
||||
**注意:免费账户的容器实例将在一段时间不活动时自动停止运行,这会导致下次请求时遇到50秒或更长的延迟,建议查看[Render容器保活](https://github.com/LLM-Red-Team/free-api-hub/#Render%E5%AE%B9%E5%99%A8%E4%BF%9D%E6%B4%BB)**
|
||||
**Attention: Some deployment regions may not be able to connect to Kimi. If container logs show request timeouts or connection failures (Singapore has been tested and found unavailable), please switch to another deployment region!**
|
||||
|
||||
1. fork本项目到你的github账号下。
|
||||
**Attention: Container instances for free accounts will automatically stop after a period of inactivity, which may result in a 50-second or longer delay during the next request. It is recommended to check [Render Container Keepalive](https://github.com/LLM-Red-Team/free-api-hub/#Render%E5%AE%B9%E5%99%A8%E4%BF%9D%E6%B4%BB)**
|
||||
|
||||
2. 访问 [Render](https://dashboard.render.com/) 并登录你的github账号。
|
||||
1. Fork this project to your GitHub account.
|
||||
|
||||
3. 构建你的 Web Service(New+ -> Build and deploy from a Git repository -> Connect你fork的项目 -> 选择部署区域 -> 选择实例类型为Free -> Create Web Service)。
|
||||
2. Visit [Render](https://dashboard.render.com/) and log in with your GitHub account.
|
||||
|
||||
4. 等待构建完成后,复制分配的域名并拼接URL访问即可。
|
||||
3. Build your Web Service (`New+` -> `Build and deploy from a Git repository` -> `Connect your forked project` -> `Select deployment region` -> `Choose instance type as Free` -> `Create Web Service`).
|
||||
|
||||
### Vercel部署
|
||||
4. After the build is complete, copy the assigned domain and append the URL to access it.
|
||||
|
||||
**注意:Vercel免费账户的请求响应超时时间为10秒,但接口响应通常较久,可能会遇到Vercel返回的504超时错误!**
|
||||
### Vercel Deployment
|
||||
|
||||
请先确保安装了Node.js环境。
|
||||
**Note: Vercel free accounts have a request response timeout of 10 seconds, but interface responses are usually longer, which may result in a 504 timeout error from Vercel!**
|
||||
|
||||
Please ensure that Node.js environment is installed first.
|
||||
|
||||
```shell
|
||||
npm i -g vercel --registry http://registry.npmmirror.com
|
||||
@@ -191,82 +177,86 @@ cd step-free-api
|
||||
vercel --prod
|
||||
```
|
||||
|
||||
## 原生部署
|
||||
### Zeabur Deployment
|
||||
|
||||
请准备一台具有公网IP的服务器并将8000端口开放。
|
||||
[](https://zeabur.com/templates/GRFYBP)
|
||||
|
||||
请先安装好Node.js环境并且配置好环境变量,确认node命令可用。
|
||||
## Native Deployment
|
||||
|
||||
安装依赖
|
||||
Please prepare a server with a public IP and open port 8000.
|
||||
|
||||
Please install the Node.js environment and configure the environment variables first, and confirm that the node command is available.
|
||||
|
||||
Install dependencies
|
||||
|
||||
```shell
|
||||
npm i
|
||||
```
|
||||
|
||||
安装PM2进行进程守护
|
||||
Install PM2 for process guarding
|
||||
|
||||
```shell
|
||||
npm i -g pm2
|
||||
```
|
||||
|
||||
编译构建,看到dist目录就是构建完成
|
||||
Compile and build. When you see the dist directory, the build is complete.
|
||||
|
||||
```shell
|
||||
npm run build
|
||||
```
|
||||
|
||||
启动服务
|
||||
Start service
|
||||
|
||||
```shell
|
||||
pm2 start dist/index.js --name "step-free-api"
|
||||
```
|
||||
|
||||
查看服务实时日志
|
||||
View real-time service logs
|
||||
|
||||
```shell
|
||||
pm2 logs step-free-api
|
||||
```
|
||||
|
||||
重启服务
|
||||
Restart service
|
||||
|
||||
```shell
|
||||
pm2 reload step-free-api
|
||||
```
|
||||
|
||||
停止服务
|
||||
Shut down service
|
||||
|
||||
```shell
|
||||
pm2 stop step-free-api
|
||||
```
|
||||
|
||||
## 推荐使用客户端
|
||||
## Recommended Clients
|
||||
|
||||
使用以下二次开发客户端接入free-api系列项目更快更简单,支持文档/图像上传!
|
||||
Using the following second-developed clients for free-api series projects is faster and easier, and supports document/image uploads!
|
||||
|
||||
由 [Clivia](https://github.com/Yanyutin753/lobe-chat) 二次开发的LobeChat [https://github.com/Yanyutin753/lobe-chat](https://github.com/Yanyutin753/lobe-chat)
|
||||
[Clivia](https://github.com/Yanyutin753/lobe-chat)'s modified LobeChat [https://github.com/Yanyutin753/lobe-chat](https://github.com/Yanyutin753/lobe-chat)
|
||||
|
||||
由 [时光@](https://github.com/SuYxh) 二次开发的ChatGPT Web [https://github.com/SuYxh/chatgpt-web-sea](https://github.com/SuYxh/chatgpt-web-sea)
|
||||
[Time@](https://github.com/SuYxh)'s modified ChatGPT Web [https://github.com/SuYxh/chatgpt-web-sea](https://github.com/SuYxh/chatgpt-web-sea)
|
||||
|
||||
## 接口列表
|
||||
## interface list
|
||||
|
||||
目前支持与openai兼容的 `/v1/chat/completions` 接口,可自行使用与openai或其他兼容的客户端接入接口,或者使用 [dify](https://dify.ai/) 等线上服务接入使用。
|
||||
Currently, the `/v1/chat/completions` interface compatible with openai is supported. You can use the client access interface compatible with openai or other clients, or use online services such as [dify](https://dify.ai/) Access and use.
|
||||
|
||||
### 对话补全
|
||||
### Conversation completion
|
||||
|
||||
对话补全接口,与openai的 [chat-completions-api](https://platform.openai.com/docs/guides/text-generation/chat-completions-api) 兼容。
|
||||
Conversation completion interface, compatible with openai's [chat-completions-api](https://platform.openai.com/docs/guides/text-generation/chat-completions-api).
|
||||
|
||||
**POST /v1/chat/completions**
|
||||
|
||||
header 需要设置 Authorization 头部:
|
||||
The header needs to set the Authorization header:
|
||||
|
||||
```
|
||||
Authorization: Bearer [refresh_token]
|
||||
```
|
||||
|
||||
请求数据:
|
||||
Request data:
|
||||
```json
|
||||
{
|
||||
// 模型名称随意填写
|
||||
// Fill in the model name as you like.
|
||||
"model": "step",
|
||||
"messages": [
|
||||
{
|
||||
@@ -274,12 +264,12 @@ Authorization: Bearer [refresh_token]
|
||||
"content": "你是谁?"
|
||||
}
|
||||
],
|
||||
// 如果使用SSE流请设置为true,默认false
|
||||
// If using SSE stream, please set it to true, the default is false
|
||||
"stream": false
|
||||
}
|
||||
```
|
||||
|
||||
响应数据:
|
||||
Response data:
|
||||
```json
|
||||
{
|
||||
"id": "85466015488159744",
|
||||
@@ -290,7 +280,7 @@ Authorization: Bearer [refresh_token]
|
||||
"index": 0,
|
||||
"message": {
|
||||
"role": "assistant",
|
||||
"content": "我是跃问(StepChat),一个由阶跃星辰(StepFun)开发的多模态大模型。我可以回答您的问题,提供信息和帮助,同时支持多种模态的交互,如文字、图像等。如果您有任何问题或需要帮助,请随时向我提问。"
|
||||
"content": "I am StepChat, a large multimodal model developed by StepFun. I can answer your questions, provide information and help, as well as support multimodal interactions such as text, images, etc. If you have any questions or need help, please feel free to ask me."
|
||||
},
|
||||
"finish_reason": "stop"
|
||||
}
|
||||
@@ -304,22 +294,22 @@ Authorization: Bearer [refresh_token]
|
||||
}
|
||||
```
|
||||
|
||||
### 文档解读
|
||||
### Document interpretation
|
||||
|
||||
提供一个可访问的文件URL或者BASE64_URL进行解析。
|
||||
Provide an accessible file URL or BASE64_URL to parse.
|
||||
|
||||
**POST /v1/chat/completions**
|
||||
|
||||
header 需要设置 Authorization 头部:
|
||||
The header needs to set the Authorization header:
|
||||
|
||||
```
|
||||
Authorization: Bearer [refresh_token]
|
||||
```
|
||||
|
||||
请求数据:
|
||||
Request data:
|
||||
```json
|
||||
{
|
||||
// 模型名称随意填写
|
||||
// Fill in the model name as you like.
|
||||
"model": "step",
|
||||
"messages": [
|
||||
{
|
||||
@@ -333,7 +323,7 @@ Authorization: Bearer [refresh_token]
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"text": "文档里说了什么?"
|
||||
"text": "What does the document say?"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -341,7 +331,7 @@ Authorization: Bearer [refresh_token]
|
||||
}
|
||||
```
|
||||
|
||||
响应数据:
|
||||
Response data:
|
||||
```json
|
||||
{
|
||||
"id": "85774360661086208",
|
||||
@@ -352,7 +342,7 @@ Authorization: Bearer [refresh_token]
|
||||
"index": 0,
|
||||
"message": {
|
||||
"role": "assistant",
|
||||
"content": "这是一个关于爱情魔法的文档。它包含了四个部分:\n\n1. **PMG 4.1390 – 1495**:这是一个使用面包和咒语来吸引心仪女性的仪式。仪式中需要将面包分成七个小块,并在特定地点进行咒语的念诵和投掷。\n2. **PMG 4.1342 – 57**:这是一个召唤恶魔来使一个名叫Tereous的女性受到折磨,直到她与一个名叫Didymos的人相爱并结合的咒语。\n3. **PGM 4.1265 – 74**:这是关于如何赢得一个美丽的女人的咒语。它涉及到连续三天保持纯洁,向女神阿佛洛狄特(Aphrodite)供奉乳香,并在心中默念她的神秘名字。\n4. **PGM 4.1496 – 1**:这是一个使用没药来吸引一个特定女性的咒语。这个咒语需要在煤上焚烧没药的同时念诵,目的是让这个女性心中只想着施咒者,并最终与施咒者相爱。"
|
||||
"content": "This is a doc about the magic of love. balabala..."
|
||||
},
|
||||
"finish_reason": "stop"
|
||||
}
|
||||
@@ -366,24 +356,24 @@ Authorization: Bearer [refresh_token]
|
||||
}
|
||||
```
|
||||
|
||||
### 图像解析
|
||||
### Image analysis
|
||||
|
||||
提供一个可访问的图像URL或者BASE64_URL进行解析。
|
||||
Provide an accessible image URL or BASE64_URL to parse.
|
||||
|
||||
此格式兼容 [gpt-4-vision-preview](https://platform.openai.com/docs/guides/vision) API格式,您也可以用这个格式传送文档进行解析。
|
||||
This format is compatible with the [gpt-4-vision-preview](https://platform.openai.com/docs/guides/vision) API format. You can also use this format to transmit documents for parsing.
|
||||
|
||||
**POST /v1/chat/completions**
|
||||
|
||||
header 需要设置 Authorization 头部:
|
||||
The header needs to set the Authorization header:
|
||||
|
||||
```
|
||||
Authorization: Bearer [refresh_token]
|
||||
```
|
||||
|
||||
请求数据:
|
||||
Request data:
|
||||
```json
|
||||
{
|
||||
// 模型名称随意填写
|
||||
// Fill in the model name as you like.
|
||||
"model": "step",
|
||||
"messages": [
|
||||
{
|
||||
@@ -397,7 +387,7 @@ Authorization: Bearer [refresh_token]
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"text": "图像描述了什么?"
|
||||
"text": "What does the image describe?"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -405,7 +395,7 @@ Authorization: Bearer [refresh_token]
|
||||
}
|
||||
```
|
||||
|
||||
响应数据:
|
||||
Response data:
|
||||
```json
|
||||
{
|
||||
"id": "85773574417829888",
|
||||
@@ -416,7 +406,7 @@ Authorization: Bearer [refresh_token]
|
||||
"index": 0,
|
||||
"message": {
|
||||
"role": "assistant",
|
||||
"content": "这张图片展示了一个活动现场,似乎是某种新产品或技术的发布会。图片中央有一个大屏幕,上面写着“创新技术及产品首发”,屏幕上还展示了一些公司的标志或名称,如“RWKV”、“财跃星辰”、“阶跃星辰”、“商汤”和“零方科技”。在屏幕下方的舞台上,有几位穿着正装的人士正在进行互动,可能是在进行产品发布或演示。整个场景给人一种正式且科技感十足的印象。"
|
||||
"content": "This image shows the site of an event that appears to be the launch of some new product or technology."
|
||||
},
|
||||
"finish_reason": "stop"
|
||||
}
|
||||
@@ -430,48 +420,48 @@ Authorization: Bearer [refresh_token]
|
||||
}
|
||||
```
|
||||
|
||||
### refresh_token存活检测
|
||||
### refresh_token survival detection
|
||||
|
||||
检测refresh_token是否存活,如果存活live未true,否则为false,请不要频繁(小于10分钟)调用此接口。
|
||||
Check whether refresh_token is alive. If live is not true, otherwise it is false. Please do not call this interface frequently (less than 10 minutes).
|
||||
|
||||
**POST /token/check**
|
||||
|
||||
请求数据:
|
||||
Request data:
|
||||
```json
|
||||
{
|
||||
"token": "267bcc81a01c2032a11a3fc6ec3e372c380eb9d1@eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
|
||||
}
|
||||
```
|
||||
|
||||
响应数据:
|
||||
Response data:
|
||||
```json
|
||||
{
|
||||
"live": true
|
||||
}
|
||||
```
|
||||
|
||||
## 注意事项
|
||||
## Notification
|
||||
|
||||
### Nginx反代优化
|
||||
### Nginx anti-generation optimization
|
||||
|
||||
如果您正在使用Nginx反向代理step-free-api,请添加以下配置项优化流的输出效果,优化体验感。
|
||||
If you are using Nginx reverse proxy `step-free-api`, please add the following configuration items to optimize the output effect of the stream and optimize the experience.
|
||||
|
||||
```nginx
|
||||
# 关闭代理缓冲。当设置为off时,Nginx会立即将客户端请求发送到后端服务器,并立即将从后端服务器接收到的响应发送回客户端。
|
||||
# Turn off proxy buffering. When set to off, Nginx will immediately send client requests to the backend server and immediately send responses received from the backend server back to the client.
|
||||
proxy_buffering off;
|
||||
# 启用分块传输编码。分块传输编码允许服务器为动态生成的内容分块发送数据,而不需要预先知道内容的大小。
|
||||
# Enable chunked transfer encoding. Chunked transfer encoding allows servers to send data in chunks for dynamically generated content without knowing the size of the content in advance.
|
||||
chunked_transfer_encoding on;
|
||||
# 开启TCP_NOPUSH,这告诉Nginx在数据包发送到客户端之前,尽可能地发送数据。这通常在sendfile使用时配合使用,可以提高网络效率。
|
||||
# Turn on TCP_NOPUSH, which tells Nginx to send as much data as possible before sending the packet to the client. This is usually used in conjunction with sendfile to improve network efficiency.
|
||||
tcp_nopush on;
|
||||
# 开启TCP_NODELAY,这告诉Nginx不延迟发送数据,立即发送小数据包。在某些情况下,这可以减少网络的延迟。
|
||||
# Turn on TCP_NODELAY, which tells Nginx not to delay sending data and to send small data packets immediately. In some cases, this can reduce network latency.
|
||||
tcp_nodelay on;
|
||||
# 设置保持连接的超时时间,这里设置为120秒。如果在这段时间内,客户端和服务器之间没有进一步的通信,连接将被关闭。
|
||||
#Set the timeout to keep the connection, here it is set to 120 seconds. If there is no further communication between client and server during this time, the connection will be closed.
|
||||
keepalive_timeout 120;
|
||||
```
|
||||
|
||||
### Token统计
|
||||
|
||||
由于推理侧不在step-free-api,因此token不可统计,将以固定数字返回!!!!!
|
||||
Since the inference side is not in step-free-api, the token cannot be counted and will be returned as a fixed number!!!!!
|
||||
|
||||
## Star History
|
||||
|
||||
|
Reference in New Issue
Block a user