chore: improve conversation list and rename docs (#11187)
This commit is contained in:
@@ -683,16 +683,13 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
|
||||
用户标识,由开发者定义规则,需保证用户标识在应用内唯一。
|
||||
</Property>
|
||||
<Property name='last_id' type='string' key='last_id'>
|
||||
当前页最后面一条记录的 ID,默认 null
|
||||
(选填)当前页最后面一条记录的 ID,默认 null
|
||||
</Property>
|
||||
<Property name='limit' type='int' key='limit'>
|
||||
一次请求返回多少条记录
|
||||
</Property>
|
||||
<Property name='pinned' type='bool' key='pinned'>
|
||||
只返回置顶 true,只返回非置顶 false
|
||||
(选填)一次请求返回多少条记录,默认 20 条,最大 100 条,最小 1 条。
|
||||
</Property>
|
||||
<Property name='sort_by' type='string' key='sort_by'>
|
||||
排序字段(选题),默认 -updated_at(按更新时间倒序排列)
|
||||
(选填)排序字段,默认 -updated_at(按更新时间倒序排列)
|
||||
- 可选值:created_at, -created_at, updated_at, -updated_at
|
||||
- 字段前面的符号代表顺序或倒序,-代表倒序
|
||||
</Property>
|
||||
@@ -703,8 +700,10 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
|
||||
- `id` (string) 会话 ID
|
||||
- `name` (string) 会话名称,默认由大语言模型生成。
|
||||
- `inputs` (array[object]) 用户输入参数。
|
||||
- `status` (string) 会话状态
|
||||
- `introduction` (string) 开场白
|
||||
- `created_at` (timestamp) 创建时间
|
||||
- `updated_at` (timestamp) 更新时间
|
||||
- `has_more` (bool)
|
||||
- `limit` (int) 返回条数,若传入超过系统限制,返回系统限制数量
|
||||
|
||||
@@ -734,7 +733,8 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
|
||||
"myName": "Lucy"
|
||||
},
|
||||
"status": "normal",
|
||||
"created_at": 1679667915
|
||||
"created_at": 1679667915,
|
||||
"updated_at": 1679667915
|
||||
},
|
||||
{
|
||||
"id": "hSIhXBhNe8X1d8Et"
|
||||
@@ -817,10 +817,10 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
|
||||
|
||||
<Properties>
|
||||
<Property name='name' type='string' key='name'>
|
||||
名称,若 `auto_generate` 为 `true` 时,该参数可不传。
|
||||
(选填)名称,若 `auto_generate` 为 `true` 时,该参数可不传。
|
||||
</Property>
|
||||
<Property name='auto_generate' type='string' key='auto_generate'>
|
||||
自动生成标题,默认 false。
|
||||
<Property name='auto_generate' type='bool' key='auto_generate'>
|
||||
(选填)自动生成标题,默认 false。
|
||||
</Property>
|
||||
<Property name='user' type='string' key='user'>
|
||||
用户标识,由开发者定义规则,需保证用户标识在应用内唯一。
|
||||
@@ -830,13 +830,15 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
|
||||
### Response
|
||||
- `id` (string) 会话 ID
|
||||
- `name` (string) 会话名称
|
||||
- `inputs` array[object] 用户输入参数。
|
||||
- `inputs` array[object] 用户输入参数
|
||||
- `status` (string) 会话状态
|
||||
- `introduction` (string) 开场白
|
||||
- `created_at` (timestamp) 创建时间
|
||||
- `updated_at` (timestamp) 更新时间
|
||||
</Col>
|
||||
<Col sticky>
|
||||
|
||||
<CodeGroup title="Request" tag="POST" label="/conversations/:conversation_id/name" targetCode={`curl -X POST '${props.appDetail.api_base_url}/conversations/:conversation_id/name' \\\n--header 'Authorization: Bearer {api_key}' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{ \n "name": "", \n "user": "abc-123"\n}'`}>
|
||||
<CodeGroup title="Request" tag="POST" label="/conversations/:conversation_id/name" targetCode={`curl -X POST '${props.appDetail.api_base_url}/conversations/:conversation_id/name' \\\n--header 'Authorization: Bearer {api_key}' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{ \n "name": "", \n "auto_generate": true, \n "user": "abc-123"\n}'`}>
|
||||
|
||||
```bash {{ title: 'cURL' }}
|
||||
curl -X POST '${props.appDetail.api_base_url}/conversations/{conversation_id}/name' \
|
||||
@@ -844,6 +846,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"name": "",
|
||||
"auto_generate": true,
|
||||
"user": "abc-123"
|
||||
}'
|
||||
```
|
||||
@@ -853,7 +856,13 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
|
||||
<CodeGroup title="Response">
|
||||
```json {{ title: 'Response' }}
|
||||
{
|
||||
"result": "success"
|
||||
"id": "34d511d5-56de-4f16-a997-57b379508443",
|
||||
"name": "hello",
|
||||
"inputs": {},
|
||||
"status": "normal",
|
||||
"introduction": "",
|
||||
"created_at": 1732731141,
|
||||
"updated_at": 1732734510
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
Reference in New Issue
Block a user