Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dify
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai-tech
dify
Commits
7444134b
Commit
7444134b
authored
Jul 26, 2023
by
StyleZhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
app api add speech to text
parent
f9412f5f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
90 additions
and
0 deletions
+90
-0
template_chat.en.mdx
web/app/components/develop/template/template_chat.en.mdx
+45
-0
template_chat.zh.mdx
web/app/components/develop/template/template_chat.zh.mdx
+45
-0
No files found.
web/app/components/develop/template/template_chat.en.mdx
View file @
7444134b
...
@@ -380,6 +380,51 @@ For versatile conversational apps using a Q&A format, call the chat-messages API
...
@@ -380,6 +380,51 @@ For versatile conversational apps using a Q&A format, call the chat-messages API
</Col>
</Col>
</Row>
</Row>
---
<Heading
url='/audio-to-text'
method='POST'
title='speech to text'
name='#audio'
/>
<Row>
<Col>
Speech to text, only supports openai model.
### Request Body
<Properties>
<Property name='file' type='file' key='file'>
audio file
</Property>
</Properties>
</Col>
<Col sticky>
<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-F file=@localfilename`}>
```bash {{ title: 'cURL' }}
curl --location --request POST 'https://cloud.langgenius.dev/api/conversations/name' \
--header 'Authorization: Bearer ENTER-YOUR-SECRET-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "",
"user": "abc-123"
}'
```
</CodeGroup>
<CodeGroup title="Response">
```json {{ title: 'Response' }}
{
"text": ""
}
```
</CodeGroup>
</Col>
</Row>
---
---
...
...
web/app/components/develop/template/template_chat.zh.mdx
View file @
7444134b
...
@@ -379,6 +379,51 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
...
@@ -379,6 +379,51 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
</Col>
</Col>
</Row>
</Row>
---
<Heading
url='/audio-to-text'
method='POST'
title='语音转文字'
name='#audio'
/>
<Row>
<Col>
语音转文字,仅支持 openai 模型。
### Request Body
<Properties>
<Property name='file' type='file' key='file'>
语音文件
</Property>
</Properties>
</Col>
<Col sticky>
<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-F file=@localfilename`}>
```bash {{ title: 'cURL' }}
curl --location --request POST 'https://cloud.langgenius.dev/api/conversations/name' \
--header 'Authorization: Bearer ENTER-YOUR-SECRET-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "",
"user": "abc-123"
}'
```
</CodeGroup>
<CodeGroup title="Response">
```json {{ title: 'Response' }}
{
"text": ""
}
```
</CodeGroup>
</Col>
</Row>
---
---
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment