mirror of
https://github.com/m5stack/StackFlow.git
synced 2026-05-20 11:32:11 -07:00
Merge branch 'dev' of github.com:m5stack/StackFlow into dev
This commit is contained in:
@@ -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
|
||||
|
||||
链接上级单元的输出。
|
||||
|
||||
Reference in New Issue
Block a user