Merge branch 'dev' of github.com:m5stack/StackFlow into dev

This commit is contained in:
dianjixz
2025-03-31 12:00:55 +08:00
2 changed files with 73 additions and 0 deletions
@@ -53,6 +53,43 @@ Response JSON:
- created: Message creation time, UNIX time.
- work_id: Successfully created work_id unit.
## inference
### streaming input
```json
{
"request_id": "2",
"work_id": "melotts.1003",
"action": "inference",
"object": "melotts.utf-8.stream",
"data": {
"delta": "What's ur name?",
"index": 0,
"finish": true
}
}
```
- object: The data type transmitted is melotts.utf-8.stream, indicating a streaming input from the user's UTF-8.
- delta: Segment data of the streaming input.
- index: Index of the segment in the streaming input.
- finish: A flag indicating whether the streaming input has completed.
### non-streaming input
```json
{
"request_id": "2",
"work_id": "melotts.1003",
"action": "inference",
"object": "melotts.utf-8",
"data": "What's ur name?"
}
```
- object: The data type transmitted is melotts.utf-8, indicating a non-streaming input from the user's UTF-8.
- data: Data for non-streaming input.
## link
Link the output of the upper-level unit.
@@ -51,6 +51,42 @@
- created:消息创建时间,unix 时间。
- work_id:返回成功创建的 work_id 单元。
## inference
### 流式输入
```json
{
"request_id": "2",
"work_id": "melotts.1003",
"action": "inference",
"object": "melotts.utf-8.stream",
"data": {
"delta": "今天天气真好!",
"index": 0,
"finish": true
}
}
```
- object:传输的数据类型为 `melotts.utf-8.stream` 代表的是从用户 utf-8 的流式输入
- delta:流式输入的分段数据
- index:流式输入的分段索引
- finish:流式输入是否完成的标志位
### 非流式输入
```json
{
"request_id": "2",
"work_id": "melotts.1003",
"action": "inference",
"object": "melotts.utf-8",
"data": "今天天气真好!"
}
```
- object:传输的数据类型为 `melotts.utf-8` 代表的是从用户 utf-8 的非流式输入
- data:非流式输入的数据
## link
链接上级单元的输出。