mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-12 22:59:03 +08:00
Fixed wrong /text-to-audio curl example (#5286)
This commit is contained in:
parent
baf5490504
commit
4f60fe7bc6
15
web/app/components/develop/template/template.en.mdx
Normal file → Executable file
15
web/app/components/develop/template/template.en.mdx
Normal file → Executable file
@ -515,14 +515,19 @@ The text generation application offers non-session support and is ideal for tran
|
||||
</Col>
|
||||
<Col sticky>
|
||||
|
||||
<CodeGroup title="Request" tag="POST" label="/text-to-audio" targetCode={`curl --location --request POST '${props.appDetail.api_base_url}/text-to-audio' \\\n--header 'Authorization: Bearer ENTER-YOUR-SECRET-KEY' \\\n--form 'text=Hello Dify;user=abc-123;streaming=false`}>
|
||||
<CodeGroup title="Request" tag="POST" label="/text-to-audio" targetCode={`curl -o text-to-audio.mp3 -X POST '${props.appDetail.api_base_url}/text-to-audio' \\\n--header 'Authorization: Bearer {api_key}' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n "text": "Hello Dify",\n "user": "abc-123",\n "streaming": false\n}'`}>
|
||||
|
||||
```bash {{ title: 'cURL' }}
|
||||
curl --location --request POST '${props.appDetail.api_base_url}/text-to-audio' \
|
||||
--header 'Authorization: Bearer ENTER-YOUR-SECRET-KEY' \
|
||||
--form 'file=Hello Dify;user=abc-123;streaming=false'
|
||||
curl -o text-to-audio.mp3 -X POST '${props.appDetail.api_base_url}/text-to-audio' \
|
||||
--header 'Authorization: Bearer {api_key}' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"text": "Hello Dify",
|
||||
"user": "abc-123",
|
||||
"streaming": false
|
||||
}'
|
||||
```
|
||||
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
<CodeGroup title="headers">
|
||||
|
15
web/app/components/develop/template/template.zh.mdx
Normal file → Executable file
15
web/app/components/develop/template/template.zh.mdx
Normal file → Executable file
@ -476,14 +476,19 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
|
||||
</Col>
|
||||
<Col sticky>
|
||||
|
||||
<CodeGroup title="Request" tag="POST" label="/text-to-audio" targetCode={`curl --location --request POST '${props.appDetail.api_base_url}/text-to-audio' \\\n--header 'Authorization: Bearer ENTER-YOUR-SECRET-KEY' \\\n--form 'text=你好Dify;user=abc-123;streaming=false`}>
|
||||
<CodeGroup title="Request" tag="POST" label="/text-to-audio" targetCode={`curl -o text-to-audio.mp3 -X POST '${props.appDetail.api_base_url}/text-to-audio' \\\n--header 'Authorization: Bearer {api_key}' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n "text": "你好Dify",\n "user": "abc-123",\n "streaming": false\n}'`}>
|
||||
|
||||
```bash {{ title: 'cURL' }}
|
||||
curl --location --request POST '${props.appDetail.api_base_url}/text-to-audio' \
|
||||
--header 'Authorization: Bearer ENTER-YOUR-SECRET-KEY' \
|
||||
--form 'file=你好Dify;user=abc-123;streaming=false'
|
||||
curl -o text-to-audio.mp3 -X POST '${props.appDetail.api_base_url}/text-to-audio' \
|
||||
--header 'Authorization: Bearer {api_key}' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"text": "你好Dify",
|
||||
"user": "abc-123",
|
||||
"streaming": false
|
||||
}'
|
||||
```
|
||||
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
<CodeGroup title="headers">
|
||||
|
@ -880,14 +880,18 @@ Chat applications support session persistence, allowing previous chat history to
|
||||
</Col>
|
||||
<Col sticky>
|
||||
|
||||
<CodeGroup title="Request" tag="POST" label="/text-to-audio" targetCode={`curl --location --request POST '${props.appDetail.api_base_url}/text-to-audio' \\\n--header 'Authorization: Bearer ENTER-YOUR-SECRET-KEY' \\\n--form 'text=Hello Dify;user=abc-123;streaming=false`}>
|
||||
<CodeGroup title="Request" tag="POST" label="/text-to-audio" targetCode={`curl -o text-to-audio.mp3 -X POST '${props.appDetail.api_base_url}/text-to-audio' \\\n--header 'Authorization: Bearer {api_key}' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n "text": "Hello Dify",\n "user": "abc-123",\n "streaming": false\n}'`}>
|
||||
|
||||
```bash {{ title: 'cURL' }}
|
||||
curl --location --request POST '${props.appDetail.api_base_url}/text-to-audio' \
|
||||
--header 'Authorization: Bearer ENTER-YOUR-SECRET-KEY' \
|
||||
--form 'file=Hello Dify;user=abc-123;streaming=false'
|
||||
curl -o text-to-audio.mp3 -X POST '${props.appDetail.api_base_url}/text-to-audio' \
|
||||
--header 'Authorization: Bearer {api_key}' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"text": "Hello Dify",
|
||||
"user": "abc-123",
|
||||
"streaming": false
|
||||
}'
|
||||
```
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
<CodeGroup title="headers">
|
||||
|
15
web/app/components/develop/template/template_advanced_chat.zh.mdx
Normal file → Executable file
15
web/app/components/develop/template/template_advanced_chat.zh.mdx
Normal file → Executable file
@ -911,14 +911,19 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
|
||||
</Col>
|
||||
<Col sticky>
|
||||
|
||||
<CodeGroup title="Request" tag="POST" label="/text-to-audio" targetCode={`curl --location --request POST '${props.appDetail.api_base_url}/text-to-audio' \\\n--header 'Authorization: Bearer ENTER-YOUR-SECRET-KEY' \\\n--form 'text=你好Dify;user=abc-123;streaming=false`}>
|
||||
<CodeGroup title="Request" tag="POST" label="/text-to-audio" targetCode={`curl -o text-to-audio.mp3 -X POST '${props.appDetail.api_base_url}/text-to-audio' \\\n--header 'Authorization: Bearer {api_key}' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n "text": "你好Dify",\n "user": "abc-123",\n "streaming": false\n}'`}>
|
||||
|
||||
```bash {{ title: 'cURL' }}
|
||||
curl --location --request POST '${props.appDetail.api_base_url}/text-to-audio' \
|
||||
--header 'Authorization: Bearer ENTER-YOUR-SECRET-KEY' \
|
||||
--form 'file=你好Dify;user=abc-123;streaming=false'
|
||||
curl -o text-to-audio.mp3 -X POST '${props.appDetail.api_base_url}/text-to-audio' \
|
||||
--header 'Authorization: Bearer {api_key}' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"text": "你好Dify",
|
||||
"user": "abc-123",
|
||||
"streaming": false
|
||||
}'
|
||||
```
|
||||
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
<CodeGroup title="headers">
|
||||
|
Loading…
x
Reference in New Issue
Block a user