|
|
|
|
@ -69,7 +69,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
|
|
|
|
|
<CodeGroup title="Request" tag="POST" label="/chat-messages" targetCode={`curl --location --request POST '${props.appDetail.api_base_url}/chat-messages' \\\n--header 'Authorization: Bearer ENTER-YOUR-SECRET-KEY' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n "inputs": ${JSON.stringify(props.inputs)},\n "query": "eh",\n "response_mode": "streaming",\n "conversation_id": "",\n "user": "abc-123"\n}'\n`}>
|
|
|
|
|
|
|
|
|
|
```bash {{ title: 'cURL' }}
|
|
|
|
|
curl --location --request POST 'https://cloud.langgenius.dev/api/chat-messages' \
|
|
|
|
|
curl --location --request POST '${props.appDetail.api_base_url}/chat-messages' \
|
|
|
|
|
--header 'Authorization: Bearer ENTER-YOUR-SECRET-KEY' \
|
|
|
|
|
--header 'Content-Type: application/json' \
|
|
|
|
|
--data-raw '{
|
|
|
|
|
@ -138,7 +138,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
|
|
|
|
|
<CodeGroup title="Request" tag="POST" label="/messages/{message_id}/feedbacks" targetCode={`curl --location --request POST '${props.appDetail.api_base_url}/messages/{message_id}/feedbacks \\\n--header 'Authorization: Bearer ENTER-YOUR-SECRET-KEY' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n "rating": "like",\n "user": "abc-123"\n}'`}>
|
|
|
|
|
|
|
|
|
|
```bash {{ title: 'cURL' }}
|
|
|
|
|
curl --location --request POST 'https://cloud.langgenius.dev/api/messages/{message_id}/feedbacks' \
|
|
|
|
|
curl --location --request POST '${props.appDetail.api_base_url}/messages/{message_id}/feedbacks' \
|
|
|
|
|
--header 'Authorization: Bearer ENTER-YOUR-SECRET-KEY' \
|
|
|
|
|
--header 'Content-Type: application/json' \
|
|
|
|
|
--data-raw '{
|
|
|
|
|
@ -176,6 +176,54 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
<Heading
|
|
|
|
|
url='/messages/{message_id}/suggested'
|
|
|
|
|
method='GET'
|
|
|
|
|
title='消息下一步问题建议'
|
|
|
|
|
name='#suggested'
|
|
|
|
|
/>
|
|
|
|
|
<Row>
|
|
|
|
|
<Col>
|
|
|
|
|
获取针对当前问题的下一步问题建议
|
|
|
|
|
|
|
|
|
|
### Path Params
|
|
|
|
|
|
|
|
|
|
<Properties>
|
|
|
|
|
<Property name='message_id' type='string' key='message_id'>
|
|
|
|
|
消息 ID
|
|
|
|
|
</Property>
|
|
|
|
|
</Properties>
|
|
|
|
|
</Col>
|
|
|
|
|
<Col sticky>
|
|
|
|
|
|
|
|
|
|
<CodeGroup title="Request" tag="GET" label="/messages/{message_id}/suggested" targetCode={`curl --location --request GET '${props.appDetail.api_base_url}/messages/{message_id}/suggested \\\n--header 'Authorization: Bearer ENTER-YOUR-SECRET-KEY' \\\n--header 'Content-Type: application/json'`}>
|
|
|
|
|
|
|
|
|
|
```bash {{ title: 'cURL' }}
|
|
|
|
|
curl --location --request GET '${props.appDetail.api_base_url}/messages/{message_id}/suggeste' \
|
|
|
|
|
--header 'Authorization: Bearer ENTER-YOUR-SECRET-KEY' \
|
|
|
|
|
--header 'Content-Type: application/json' \
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
</CodeGroup>
|
|
|
|
|
|
|
|
|
|
<CodeGroup title="Response">
|
|
|
|
|
```json {{ title: 'Response' }}
|
|
|
|
|
{
|
|
|
|
|
"result": "success",
|
|
|
|
|
"data": [
|
|
|
|
|
"a",
|
|
|
|
|
"b",
|
|
|
|
|
"c"
|
|
|
|
|
]
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
</CodeGroup>
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
<Heading
|
|
|
|
|
url='/messages'
|
|
|
|
|
method='GET'
|
|
|
|
|
@ -208,7 +256,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
|
|
|
|
|
<CodeGroup title="Request" tag="GET" label="/messages" targetCode={`curl --location --request GET '${props.appDetail.api_base_url}/messages?user=abc-123&conversation_id=' \\\n--header 'Authorization: Bearer ENTER-YOUR-SECRET-KEY'`}>
|
|
|
|
|
|
|
|
|
|
```bash {{ title: 'cURL' }}
|
|
|
|
|
curl --location --request GET 'https://cloud.langgenius.dev/api/messages?user=abc-123&conversation_id='
|
|
|
|
|
curl --location --request GET '${props.appDetail.api_base_url}/messages?user=abc-123&conversation_id='
|
|
|
|
|
--header 'Authorization: Bearer ENTER-YOUR-SECRET-KEY'
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
@ -270,7 +318,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
|
|
|
|
|
<CodeGroup title="Request" tag="GET" label="/conversations" targetCode={`curl --location --request GET '${props.appDetail.api_base_url}/conversations?user=abc-123&last_id=&limit=20'\\\n--header 'Authorization: Bearer ENTER-YOUR-SECRET-KEY'`}>
|
|
|
|
|
|
|
|
|
|
```bash {{ title: 'cURL' }}
|
|
|
|
|
curl --location --request GET 'https://cloud.langgenius.dev/api/conversations?user=abc-123&last_id=&limit=20' \
|
|
|
|
|
curl --location --request GET '${props.appDetail.api_base_url}/conversations?user=abc-123&last_id=&limit=20' \
|
|
|
|
|
--header 'Authorization: Bearer ENTER-YOUR-SECRET-KEY'
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
@ -331,7 +379,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
|
|
|
|
|
<CodeGroup title="Request" tag="POST" label="/conversations/{converation_id}/name" targetCode={`curl --location --request POST '${props.appDetail.api_base_url}/conversations/name' \\\n--header 'Authorization: Bearer ENTER-YOUR-SECRET-KEY' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{ \n "name": "", \n "user": "abc-123"\n}'`}>
|
|
|
|
|
|
|
|
|
|
```bash {{ title: 'cURL' }}
|
|
|
|
|
curl --location --request POST 'https://cloud.langgenius.dev/api/conversations/{converation_id}/name' \
|
|
|
|
|
curl --location --request POST '${props.appDetail.api_base_url}/conversations/{converation_id}/name' \
|
|
|
|
|
--header 'Authorization: Bearer ENTER-YOUR-SECRET-KEY' \
|
|
|
|
|
--header 'Content-Type: application/json' \
|
|
|
|
|
--data-raw '{
|
|
|
|
|
@ -377,7 +425,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
|
|
|
|
|
<CodeGroup title="Request" tag="DELETE" label="/conversations/{converation_id}" targetCode={`curl --location --request DELETE '${props.appDetail.api_base_url}/conversations/{conversation_id}' \\\n--header 'Authorization: Bearer ENTER-YOUR-SECRET-KEY' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{ \n "user": "abc-123"\n}'`}>
|
|
|
|
|
|
|
|
|
|
```bash {{ title: 'cURL' }}
|
|
|
|
|
curl --location --request DELETE 'https://cloud.langgenius.dev/api/conversations/{convsation_id}' \
|
|
|
|
|
curl --location --request DELETE '${props.appDetail.api_base_url}/conversations/{convsation_id}' \
|
|
|
|
|
--header 'Content-Type: application/json' \
|
|
|
|
|
--header 'Accept: application/json' \
|
|
|
|
|
--header 'Authorization: Bearer ENTER-YOUR-SECRET-KEY' \
|
|
|
|
|
@ -414,7 +462,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
|
|
|
|
|
|
|
|
|
|
<Properties>
|
|
|
|
|
<Property name='file' type='file' key='file'>
|
|
|
|
|
语音文件。
|
|
|
|
|
语音文件。
|
|
|
|
|
文件上传当前限制为 15 MB,并且支持以下输入文件类型:mp3、mp4、mpeg、mpga、m4a、wav 和 webm。
|
|
|
|
|
</Property>
|
|
|
|
|
</Properties>
|
|
|
|
|
@ -424,7 +472,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
|
|
|
|
|
<CodeGroup title="Request" tag="POST" label="/audio-to-text" targetCode={`curl --location --request POST '${props.appDetail.api_base_url}/audio-to-text' \\\n--header 'Authorization: Bearer ENTER-YOUR-SECRET-KEY' \\\n--form 'file=@localfile;type=audio/[mp3|mp4|mpeg|mpga|m4a|wav|webm]`}>
|
|
|
|
|
|
|
|
|
|
```bash {{ title: 'cURL' }}
|
|
|
|
|
curl --location --request POST 'https://cloud.langgenius.dev/api/conversations/name' \
|
|
|
|
|
curl --location --request POST '${props.appDetail.api_base_url}/conversations/name' \
|
|
|
|
|
--header 'Authorization: Bearer ENTER-YOUR-SECRET-KEY' \
|
|
|
|
|
--form 'file=@localfile;type=audio/mp3'
|
|
|
|
|
```
|
|
|
|
|
@ -466,7 +514,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
|
|
|
|
|
<CodeGroup title="Request" tag="GET" label="/parameters" targetCode={` curl --location --request GET '${props.appDetail.api_base_url}/parameters'\\\n--header 'Authorization: Bearer ENTER-YOUR-SECRET-KEY'`}>
|
|
|
|
|
|
|
|
|
|
```bash {{ title: 'cURL' }}
|
|
|
|
|
curl --location --request GET 'https://cloud.langgenius.dev/api/parameters?user=abc-123' \
|
|
|
|
|
curl --location --request GET '${props.appDetail.api_base_url}/parameters?user=abc-123' \
|
|
|
|
|
--header 'Authorization: Bearer ENTER-YOUR-SECRET-KEY'
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|