Skip to content

Commit

Permalink
fix: update conversation session naming and API path in documentation (
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminX authored and jiangzhijie committed Nov 14, 2024
1 parent 8434593 commit ade8e32
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,10 @@ Chat applications support session persistence, allowing previous chat history to
<Row>
<Col>
### Request Body
Rename the session, the session name is used for display on clients that support multiple sessions.
### Path
- `conversation_id` (string) Conversation ID
<Properties>
<Property name='name' type='string' key='name'>
Expand All @@ -796,10 +800,10 @@ Chat applications support session persistence, allowing previous chat history to
</Col>
<Col sticky>
<CodeGroup title="Request" tag="POST" label="/conversations/:conversation_id/name" targetCode={`curl -X POST '${props.appDetail.api_base_url}/conversations/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 "user": "abc-123"\n}'`}>
```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' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {api_key}' \
--data-raw '{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -810,6 +810,9 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
<Col>
对会话进行重命名,会话名称用于显示在支持多会话的客户端上。

### Path
- `conversation_id` (string) 会话 ID

### Request Body

<Properties>
Expand All @@ -833,10 +836,10 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
</Col>
<Col sticky>

<CodeGroup title="Request" tag="POST" label="/conversations/:conversation_id/name" targetCode={`curl -X POST '${props.appDetail.api_base_url}/conversations/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 "user": "abc-123"\n}'`}>

```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' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: application/json' \
--data-raw '{
Expand Down
8 changes: 6 additions & 2 deletions web/app/components/develop/template/template_chat.en.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -808,6 +808,10 @@ Chat applications support session persistence, allowing previous chat history to
<Row>
<Col>
### Request Body
Rename the session, the session name is used for display on clients that support multiple sessions.
### Path
- `conversation_id` (string) Conversation ID
<Properties>
<Property name='name' type='string' key='name'>
Expand All @@ -830,10 +834,10 @@ Chat applications support session persistence, allowing previous chat history to
</Col>
<Col sticky>
<CodeGroup title="Request" tag="POST" label="/conversations/:conversation_id/name" targetCode={`curl -X POST '${props.appDetail.api_base_url}/conversations/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 "user": "abc-123"\n}'`}>
```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' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {api_key}' \
--data-raw '{
Expand Down
7 changes: 5 additions & 2 deletions web/app/components/develop/template/template_chat.zh.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -824,6 +824,9 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
<Col>
对会话进行重命名,会话名称用于显示在支持多会话的客户端上。

### Path
- `conversation_id` (string) 会话 ID

### Request Body

<Properties>
Expand All @@ -847,10 +850,10 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
</Col>
<Col sticky>

<CodeGroup title="Request" tag="POST" label="/conversations/:conversation_id/name" targetCode={`curl -X POST '${props.appDetail.api_base_url}/conversations/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 "user": "abc-123"\n}'`}>

```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' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: application/json' \
--data-raw '{
Expand Down

0 comments on commit ade8e32

Please sign in to comment.