chore: improve conversation list and rename docs (#11187)

This commit is contained in:
非法操作 2024-11-29 09:22:08 +08:00 committed by GitHub
parent 2d6865d421
commit e576d32fb6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 109 additions and 74 deletions

View File

@ -648,16 +648,13 @@ Chat applications support session persistence, allowing previous chat history to
Should be uniquely defined by the developer within the application. Should be uniquely defined by the developer within the application.
</Property> </Property>
<Property name='last_id' type='string' key='last_id'> <Property name='last_id' type='string' key='last_id'>
The ID of the last record on the current page, default is null. (Optional) The ID of the last record on the current page, default is null.
</Property> </Property>
<Property name='limit' type='int' key='limit'> <Property name='limit' type='int' key='limit'>
How many records to return in one request, default is the most recent 20 entries. (Optional) How many records to return in one request, default is the most recent 20 entries. Maximum 100, minimum 1.
</Property>
<Property name='pinned' type='bool' key='pinned'>
Return only pinned conversations as `true`, only non-pinned as `false`
</Property> </Property>
<Property name='sort_by' type='string' key='sort_by'> <Property name='sort_by' type='string' key='sort_by'>
Sorting Field (Optional), Default: -updated_at (sorted in descending order by update time) (Optional) Sorting Field, Default: -updated_at (sorted in descending order by update time)
- Available Values: created_at, -created_at, updated_at, -updated_at - Available Values: created_at, -created_at, updated_at, -updated_at
- The symbol before the field represents the order or reverse, "-" represents reverse order. - The symbol before the field represents the order or reverse, "-" represents reverse order.
</Property> </Property>
@ -668,8 +665,10 @@ Chat applications support session persistence, allowing previous chat history to
- `id` (string) Conversation ID - `id` (string) Conversation ID
- `name` (string) Conversation name, by default, is generated by LLM. - `name` (string) Conversation name, by default, is generated by LLM.
- `inputs` (array[object]) User input parameters. - `inputs` (array[object]) User input parameters.
- `status` (string) Conversation status
- `introduction` (string) Introduction - `introduction` (string) Introduction
- `created_at` (timestamp) Creation timestamp, e.g., 1705395332 - `created_at` (timestamp) Creation timestamp, e.g., 1705395332
- `updated_at` (timestamp) Update timestamp, e.g., 1705395332
- `has_more` (bool) - `has_more` (bool)
- `limit` (int) Number of entries returned, if input exceeds system limit, system limit number is returned - `limit` (int) Number of entries returned, if input exceeds system limit, system limit number is returned
@ -699,7 +698,8 @@ Chat applications support session persistence, allowing previous chat history to
"myName": "Lucy" "myName": "Lucy"
}, },
"status": "normal", "status": "normal",
"created_at": 1679667915 "created_at": 1679667915,
"updated_at": 1679667915
}, },
{ {
"id": "hSIhXBhNe8X1d8Et" "id": "hSIhXBhNe8X1d8Et"
@ -781,10 +781,10 @@ Chat applications support session persistence, allowing previous chat history to
<Properties> <Properties>
<Property name='name' type='string' key='name'> <Property name='name' type='string' key='name'>
The name of the conversation. This parameter can be omitted if `auto_generate` is set to `true`. (Optional) The name of the conversation. This parameter can be omitted if `auto_generate` is set to `true`.
</Property> </Property>
<Property name='auto_generate' type='bool' key='auto_generate'> <Property name='auto_generate' type='bool' key='auto_generate'>
Automatically generate the title, default is `false` (Optional) Automatically generate the title, default is `false`
</Property> </Property>
<Property name='user' type='string' key='user'> <Property name='user' type='string' key='user'>
The user identifier, defined by the developer, must ensure uniqueness within the application. The user identifier, defined by the developer, must ensure uniqueness within the application.
@ -794,13 +794,15 @@ Chat applications support session persistence, allowing previous chat history to
### Response ### Response
- `id` (string) Conversation ID - `id` (string) Conversation ID
- `name` (string) Conversation name - `name` (string) Conversation name
- `inputs` array[object] User input parameters. - `inputs` array[object] User input parameters
- `status` (string) Conversation status
- `introduction` (string) Introduction - `introduction` (string) Introduction
- `created_at` (timestamp) Creation timestamp, e.g., 1705395332 - `created_at` (timestamp) Creation timestamp, e.g., 1705395332
- `updated_at` (timestamp) Update timestamp, e.g., 1705395332
</Col> </Col>
<Col sticky> <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' }} ```bash {{ title: 'cURL' }}
curl -X POST '${props.appDetail.api_base_url}/conversations/{conversation_id}/name' \ curl -X POST '${props.appDetail.api_base_url}/conversations/{conversation_id}/name' \
@ -808,6 +810,7 @@ Chat applications support session persistence, allowing previous chat history to
--header 'Authorization: Bearer {api_key}' \ --header 'Authorization: Bearer {api_key}' \
--data-raw '{ --data-raw '{
"name": "", "name": "",
"auto_generate": true,
"user": "abc-123" "user": "abc-123"
}' }'
``` ```
@ -820,8 +823,10 @@ Chat applications support session persistence, allowing previous chat history to
"id": "cd78daf6-f9e4-4463-9ff2-54257230a0ce", "id": "cd78daf6-f9e4-4463-9ff2-54257230a0ce",
"name": "Chat vs AI", "name": "Chat vs AI",
"inputs": {}, "inputs": {},
"status": "normal",
"introduction": "", "introduction": "",
"created_at": 1705569238 "created_at": 1705569238,
"updated_at": 1705569238
} }
``` ```
</CodeGroup> </CodeGroup>

View File

@ -648,16 +648,13 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from
アプリケーション内で開発者によって一意に定義されるべきです。 アプリケーション内で開発者によって一意に定義されるべきです。
</Property> </Property>
<Property name='last_id' type='string' key='last_id'> <Property name='last_id' type='string' key='last_id'>
現在のページの最後の記録のID、デフォルトはnullです。 (Optional)現在のページの最後の記録のID、デフォルトはnullです。
</Property> </Property>
<Property name='limit' type='int' key='limit'> <Property name='limit' type='int' key='limit'>
1回のリクエストで返す記録の数、デフォルトは最新の20件です。 (Optional)1回のリクエストで返す記録の数、デフォルトは最新の20件です。最大100、最小1。
</Property>
<Property name='pinned' type='bool' key='pinned'>
ピン留めされた会話のみを`true`として返し、非ピン留めを`false`として返します
</Property> </Property>
<Property name='sort_by' type='string' key='sort_by'> <Property name='sort_by' type='string' key='sort_by'>
ソートフィールド(オプション)、デフォルト:-updated_at更新時間で降順にソート (Optional)ソートフィールド、デフォルト:-updated_at更新時間で降順にソート
- 利用可能な値created_at, -created_at, updated_at, -updated_at - 利用可能な値created_at, -created_at, updated_at, -updated_at
- フィールドの前の記号は順序または逆順を表し、"-"は逆順を表します。 - フィールドの前の記号は順序または逆順を表し、"-"は逆順を表します。
</Property> </Property>
@ -670,6 +667,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from
- `inputs` (array[object]) ユーザー入力パラメータ。 - `inputs` (array[object]) ユーザー入力パラメータ。
- `introduction` (string) 紹介 - `introduction` (string) 紹介
- `created_at` (timestamp) 作成タイムスタンプ、例1705395332 - `created_at` (timestamp) 作成タイムスタンプ、例1705395332
- `updated_at` (timestamp) 更新タイムスタンプ、例1705395332
- `has_more` (bool) - `has_more` (bool)
- `limit` (int) 返されたエントリ数、入力がシステム制限を超える場合、システム制限数が返されます - `limit` (int) 返されたエントリ数、入力がシステム制限を超える場合、システム制限数が返されます
@ -699,7 +697,8 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from
"myName": "Lucy" "myName": "Lucy"
}, },
"status": "normal", "status": "normal",
"created_at": 1679667915 "created_at": 1679667915,
"updated_at": 1679667915
}, },
{ {
"id": "hSIhXBhNe8X1d8Et" "id": "hSIhXBhNe8X1d8Et"
@ -781,10 +780,10 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from
<Properties> <Properties>
<Property name='name' type='string' key='name'> <Property name='name' type='string' key='name'>
会話の名前。`auto_generate`が`true`に設定されている場合、このパラメータは省略できます。 (Optional)会話の名前。`auto_generate`が`true`に設定されている場合、このパラメータは省略できます。
</Property> </Property>
<Property name='auto_generate' type='bool' key='auto_generate'> <Property name='auto_generate' type='bool' key='auto_generate'>
タイトルを自動生成、デフォルトは`false` (Optional)タイトルを自動生成、デフォルトは`false`
</Property> </Property>
<Property name='user' type='string' key='user'> <Property name='user' type='string' key='user'>
ユーザー識別子、開発者によって定義され、アプリケーション内で一意であることを保証しなければなりません。 ユーザー識別子、開発者によって定義され、アプリケーション内で一意であることを保証しなければなりません。
@ -794,13 +793,15 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from
### 応答 ### 応答
- `id` (string) 会話ID - `id` (string) 会話ID
- `name` (string) 会話名 - `name` (string) 会話名
- `inputs` array[object] ユーザー入力パラメータ。 - `inputs` array[object] ユーザー入力パラメータ
- `status` (string) 会話状態
- `introduction` (string) 紹介 - `introduction` (string) 紹介
- `created_at` (timestamp) 作成タイムスタンプ、例1705395332 - `created_at` (timestamp) 作成タイムスタンプ、例1705395332
- `updated_at` (timestamp) 更新タイムスタンプ、例1705395332
</Col> </Col>
<Col sticky> <Col sticky>
<CodeGroup title="リクエスト" 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="リクエスト" 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' }} ```bash {{ title: 'cURL' }}
curl -X POST '${props.appDetail.api_base_url}/conversations/{conversation_id}/name' \ curl -X POST '${props.appDetail.api_base_url}/conversations/{conversation_id}/name' \
@ -808,6 +809,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from
--header 'Authorization: Bearer {api_key}' \ --header 'Authorization: Bearer {api_key}' \
--data-raw '{ --data-raw '{
"name": "", "name": "",
"auto_generate": true,
"user": "abc-123" "user": "abc-123"
}' }'
``` ```
@ -820,8 +822,10 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from
"id": "cd78daf6-f9e4-4463-9ff2-54257230a0ce", "id": "cd78daf6-f9e4-4463-9ff2-54257230a0ce",
"name": "チャット vs AI", "name": "チャット vs AI",
"inputs": {}, "inputs": {},
"status": "normal",
"introduction": "", "introduction": "",
"created_at": 1705569238 "created_at": 1705569238,
"updated_at": 1705569238
} }
``` ```
</CodeGroup> </CodeGroup>

View File

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

View File

@ -682,16 +682,13 @@ Chat applications support session persistence, allowing previous chat history to
Should be uniquely defined by the developer within the application. Should be uniquely defined by the developer within the application.
</Property> </Property>
<Property name='last_id' type='string' key='last_id'> <Property name='last_id' type='string' key='last_id'>
The ID of the last record on the current page, default is null. (Optional) The ID of the last record on the current page, default is null.
</Property> </Property>
<Property name='limit' type='int' key='limit'> <Property name='limit' type='int' key='limit'>
How many records to return in one request, default is the most recent 20 entries. (Optional) How many records to return in one request, default is the most recent 20 entries. Maximum 100, minimum 1.
</Property>
<Property name='pinned' type='bool' key='pinned'>
Return only pinned conversations as `true`, only non-pinned as `false`
</Property> </Property>
<Property name='sort_by' type='string' key='sort_by'> <Property name='sort_by' type='string' key='sort_by'>
Sorting Field (Optional), Default: -updated_at (sorted in descending order by update time) (Optional) Sorting Field, Default: -updated_at (sorted in descending order by update time)
- Available Values: created_at, -created_at, updated_at, -updated_at - Available Values: created_at, -created_at, updated_at, -updated_at
- The symbol before the field represents the order or reverse, "-" represents reverse order. - The symbol before the field represents the order or reverse, "-" represents reverse order.
</Property> </Property>
@ -702,8 +699,10 @@ Chat applications support session persistence, allowing previous chat history to
- `id` (string) Conversation ID - `id` (string) Conversation ID
- `name` (string) Conversation name, by default, is a snippet of the first question asked by the user in the conversation. - `name` (string) Conversation name, by default, is a snippet of the first question asked by the user in the conversation.
- `inputs` (array[object]) User input parameters. - `inputs` (array[object]) User input parameters.
- `status` (string) Conversation status
- `introduction` (string) Introduction - `introduction` (string) Introduction
- `created_at` (timestamp) Creation timestamp, e.g., 1705395332 - `created_at` (timestamp) Creation timestamp, e.g., 1705395332
- `updated_at` (timestamp) Update timestamp, e.g., 1705395332
- `has_more` (bool) - `has_more` (bool)
- `limit` (int) Number of entries returned, if input exceeds system limit, system limit number is returned - `limit` (int) Number of entries returned, if input exceeds system limit, system limit number is returned
@ -733,7 +732,8 @@ Chat applications support session persistence, allowing previous chat history to
"myName": "Lucy" "myName": "Lucy"
}, },
"status": "normal", "status": "normal",
"created_at": 1679667915 "created_at": 1679667915,
"updated_at": 1679667915
}, },
{ {
"id": "hSIhXBhNe8X1d8Et" "id": "hSIhXBhNe8X1d8Et"
@ -815,10 +815,10 @@ Chat applications support session persistence, allowing previous chat history to
<Properties> <Properties>
<Property name='name' type='string' key='name'> <Property name='name' type='string' key='name'>
The name of the conversation. This parameter can be omitted if `auto_generate` is set to `true`. (Optional) The name of the conversation. This parameter can be omitted if `auto_generate` is set to `true`.
</Property> </Property>
<Property name='auto_generate' type='bool' key='auto_generate'> <Property name='auto_generate' type='bool' key='auto_generate'>
Automatically generate the title, default is `false` (Optional) Automatically generate the title, default is `false`
</Property> </Property>
<Property name='user' type='string' key='user'> <Property name='user' type='string' key='user'>
The user identifier, defined by the developer, must ensure uniqueness within the application. The user identifier, defined by the developer, must ensure uniqueness within the application.
@ -828,13 +828,15 @@ Chat applications support session persistence, allowing previous chat history to
### Response ### Response
- `id` (string) Conversation ID - `id` (string) Conversation ID
- `name` (string) Conversation name - `name` (string) Conversation name
- `inputs` array[object] User input parameters. - `inputs` array[object] User input parameters
- `status` (string) Conversation status
- `introduction` (string) Introduction - `introduction` (string) Introduction
- `created_at` (timestamp) Creation timestamp, e.g., 1705395332 - `created_at` (timestamp) Creation timestamp, e.g., 1705395332
- `updated_at` (timestamp) Update timestamp, e.g., 1705395332
</Col> </Col>
<Col sticky> <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' }} ```bash {{ title: 'cURL' }}
curl -X POST '${props.appDetail.api_base_url}/conversations/{conversation_id}/name' \ curl -X POST '${props.appDetail.api_base_url}/conversations/{conversation_id}/name' \
@ -842,6 +844,7 @@ Chat applications support session persistence, allowing previous chat history to
--header 'Authorization: Bearer {api_key}' \ --header 'Authorization: Bearer {api_key}' \
--data-raw '{ --data-raw '{
"name": "", "name": "",
"auto_generate": true,
"user": "abc-123" "user": "abc-123"
}' }'
``` ```
@ -854,8 +857,10 @@ Chat applications support session persistence, allowing previous chat history to
"id": "cd78daf6-f9e4-4463-9ff2-54257230a0ce", "id": "cd78daf6-f9e4-4463-9ff2-54257230a0ce",
"name": "Chat vs AI", "name": "Chat vs AI",
"inputs": {}, "inputs": {},
"status": "normal",
"introduction": "", "introduction": "",
"created_at": 1705569238 "created_at": 1705569238,
"updated_at": 1705569238
} }
``` ```
</CodeGroup> </CodeGroup>

View File

@ -682,16 +682,13 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from
アプリケーション内で開発者によって一意に定義される必要があります。 アプリケーション内で開発者によって一意に定義される必要があります。
</Property> </Property>
<Property name='last_id' type='string' key='last_id'> <Property name='last_id' type='string' key='last_id'>
現在のページの最後のレコードのID、デフォルトはnullです。 (Optional)現在のページの最後のレコードのID、デフォルトはnullです。
</Property> </Property>
<Property name='limit' type='int' key='limit'> <Property name='limit' type='int' key='limit'>
1回のリクエストで返すレコードの数、デフォルトは最新の20件です。 (Optional)1回のリクエストで返すレコードの数、デフォルトは最新の20件です。最大100、最小1。
</Property>
<Property name='pinned' type='bool' key='pinned'>
ピン留めされた会話のみを`true`として返し、ピン留めされていないもののみを`false`として返します
</Property> </Property>
<Property name='sort_by' type='string' key='sort_by'> <Property name='sort_by' type='string' key='sort_by'>
ソートフィールド(オプション)、デフォルト:-updated_at更新時間で降順にソート (Optional)ソートフィールド、デフォルト:-updated_at更新時間で降順にソート
- 利用可能な値created_at, -created_at, updated_at, -updated_at - 利用可能な値created_at, -created_at, updated_at, -updated_at
- フィールドの前の記号は順序または逆順を表し、"-"は逆順を表します。 - フィールドの前の記号は順序または逆順を表し、"-"は逆順を表します。
</Property> </Property>
@ -704,6 +701,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from
- `inputs` (array[object]) ユーザー入力パラメータ。 - `inputs` (array[object]) ユーザー入力パラメータ。
- `introduction` (string) 紹介 - `introduction` (string) 紹介
- `created_at` (timestamp) 作成タイムスタンプ、例1705395332 - `created_at` (timestamp) 作成タイムスタンプ、例1705395332
- `updated_at` (timestamp) 更新タイムスタンプ、例1705395332
- `has_more` (bool) - `has_more` (bool)
- `limit` (int) 返されたエントリの数、入力がシステム制限を超える場合、システム制限の数を返します - `limit` (int) 返されたエントリの数、入力がシステム制限を超える場合、システム制限の数を返します
@ -733,7 +731,8 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from
"myName": "Lucy" "myName": "Lucy"
}, },
"status": "normal", "status": "normal",
"created_at": 1679667915 "created_at": 1679667915,
"updated_at": 1679667915
}, },
{ {
"id": "hSIhXBhNe8X1d8Et" "id": "hSIhXBhNe8X1d8Et"
@ -815,10 +814,10 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from
<Properties> <Properties>
<Property name='name' type='string' key='name'> <Property name='name' type='string' key='name'>
会話の名前。このパラメータは、`auto_generate`が`true`に設定されている場合、省略できます。 (Optional)会話の名前。このパラメータは、`auto_generate`が`true`に設定されている場合、省略できます。
</Property> </Property>
<Property name='auto_generate' type='bool' key='auto_generate'> <Property name='auto_generate' type='bool' key='auto_generate'>
タイトルを自動生成します。デフォルトは`false`です。 (Optional)タイトルを自動生成します。デフォルトは`false`です。
</Property> </Property>
<Property name='user' type='string' key='user'> <Property name='user' type='string' key='user'>
ユーザー識別子、開発者によって定義され、アプリケーション内で一意である必要があります。 ユーザー識別子、開発者によって定義され、アプリケーション内で一意である必要があります。
@ -828,13 +827,15 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from
### 応答 ### 応答
- `id` (string) 会話ID - `id` (string) 会話ID
- `name` (string) 会話名 - `name` (string) 会話名
- `inputs` array[object] ユーザー入力パラメータ。 - `inputs` array[object] ユーザー入力パラメータ
- `status` (string) 会話状態
- `introduction` (string) 紹介 - `introduction` (string) 紹介
- `created_at` (timestamp) 作成タイムスタンプ、例1705395332 - `created_at` (timestamp) 作成タイムスタンプ、例1705395332
- `updated_at` (timestamp) 更新タイムスタンプ、例1705395332
</Col> </Col>
<Col sticky> <Col sticky>
<CodeGroup title="リクエスト" 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="リクエスト" 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' }} ```bash {{ title: 'cURL' }}
curl -X POST '${props.appDetail.api_base_url}/conversations/{conversation_id}/name' \ curl -X POST '${props.appDetail.api_base_url}/conversations/{conversation_id}/name' \
@ -842,6 +843,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from
--header 'Authorization: Bearer {api_key}' \ --header 'Authorization: Bearer {api_key}' \
--data-raw '{ --data-raw '{
"name": "", "name": "",
"auto_generate": true,
"user": "abc-123" "user": "abc-123"
}' }'
``` ```
@ -855,7 +857,8 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from
"name": "Chat vs AI", "name": "Chat vs AI",
"inputs": {}, "inputs": {},
"introduction": "", "introduction": "",
"created_at": 1705569238 "created_at": 1705569238,
"updated_at": 1705569238
} }
``` ```
</CodeGroup> </CodeGroup>

View File

@ -697,16 +697,13 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
用户标识,由开发者定义规则,需保证用户标识在应用内唯一。 用户标识,由开发者定义规则,需保证用户标识在应用内唯一。
</Property> </Property>
<Property name='last_id' type='string' key='last_id'> <Property name='last_id' type='string' key='last_id'>
当前页最后面一条记录的 ID默认 null (选填)当前页最后面一条记录的 ID默认 null
</Property> </Property>
<Property name='limit' type='int' key='limit'> <Property name='limit' type='int' key='limit'>
一次请求返回多少条记录 (选填)一次请求返回多少条记录,默认 20 条,最大 100 条,最小 1 条。
</Property>
<Property name='pinned' type='bool' key='pinned'>
只返回置顶 true只返回非置顶 false
</Property> </Property>
<Property name='sort_by' type='string' key='sort_by'> <Property name='sort_by' type='string' key='sort_by'>
排序字段(选题),默认 -updated_at(按更新时间倒序排列) (选填)排序字段,默认 -updated_at(按更新时间倒序排列)
- 可选值created_at, -created_at, updated_at, -updated_at - 可选值created_at, -created_at, updated_at, -updated_at
- 字段前面的符号代表顺序或倒序,-代表倒序 - 字段前面的符号代表顺序或倒序,-代表倒序
</Property> </Property>
@ -717,8 +714,10 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
- `id` (string) 会话 ID - `id` (string) 会话 ID
- `name` (string) 会话名称,默认为会话中用户最开始问题的截取。 - `name` (string) 会话名称,默认为会话中用户最开始问题的截取。
- `inputs` (array[object]) 用户输入参数。 - `inputs` (array[object]) 用户输入参数。
- `status` (string) 会话状态
- `introduction` (string) 开场白 - `introduction` (string) 开场白
- `created_at` (timestamp) 创建时间 - `created_at` (timestamp) 创建时间
- `updated_at` (timestamp) 更新时间
- `has_more` (bool) - `has_more` (bool)
- `limit` (int) 返回条数,若传入超过系统限制,返回系统限制数量 - `limit` (int) 返回条数,若传入超过系统限制,返回系统限制数量
@ -748,7 +747,8 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
"myName": "Lucy" "myName": "Lucy"
}, },
"status": "normal", "status": "normal",
"created_at": 1679667915 "created_at": 1679667915,
"updated_at": 1679667915
}, },
{ {
"id": "hSIhXBhNe8X1d8Et" "id": "hSIhXBhNe8X1d8Et"
@ -831,10 +831,10 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
<Properties> <Properties>
<Property name='name' type='string' key='name'> <Property name='name' type='string' key='name'>
名称,若 `auto_generate` 为 `true` 时,该参数可不传。 (选填)名称,若 `auto_generate` 为 `true` 时,该参数可不传。
</Property> </Property>
<Property name='auto_generate' type='string' key='auto_generate'> <Property name='auto_generate' type='bool' key='auto_generate'>
自动生成标题,默认 false。 (选填)自动生成标题,默认 false。
</Property> </Property>
<Property name='user' type='string' key='user'> <Property name='user' type='string' key='user'>
用户标识,由开发者定义规则,需保证用户标识在应用内唯一。 用户标识,由开发者定义规则,需保证用户标识在应用内唯一。
@ -844,13 +844,15 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
### Response ### Response
- `id` (string) 会话 ID - `id` (string) 会话 ID
- `name` (string) 会话名称 - `name` (string) 会话名称
- `inputs` array[object] 用户输入参数。 - `inputs` array[object] 用户输入参数
- `status` (string) 会话状态
- `introduction` (string) 开场白 - `introduction` (string) 开场白
- `created_at` (timestamp) 创建时间 - `created_at` (timestamp) 创建时间
- `updated_at` (timestamp) 更新时间
</Col> </Col>
<Col sticky> <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' }} ```bash {{ title: 'cURL' }}
curl -X POST '${props.appDetail.api_base_url}/conversations/{conversation_id}/name' \ curl -X POST '${props.appDetail.api_base_url}/conversations/{conversation_id}/name' \
@ -858,6 +860,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
--header 'Content-Type: application/json' \ --header 'Content-Type: application/json' \
--data-raw '{ --data-raw '{
"name": "", "name": "",
"auto_generate": true,
"user": "abc-123" "user": "abc-123"
}' }'
``` ```
@ -867,7 +870,13 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
<CodeGroup title="Response"> <CodeGroup title="Response">
```json {{ 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> </CodeGroup>