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
22278f8e
Commit
22278f8e
authored
Jul 19, 2023
by
StyleZhang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix/application-configuration-preview-style' into deploy/dev
parents
8b42a89c
69391631
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
index.tsx
web/app/components/app/configuration/config/index.tsx
+3
-3
No files found.
web/app/components/app/configuration/config/index.tsx
View file @
22278f8e
...
...
@@ -40,7 +40,7 @@ const Config: FC = () => {
}
=
useContext
(
ConfigContext
)
const
isChatApp
=
mode
===
AppType
.
chat
const
{
data
:
userInfo
}
=
useSWR
({
url
:
'/info'
},
fetchTenantInfo
)
const
targetProvider
=
userInfo
?.
providers
?.
find
(({
token_is_set
,
is_valid
})
=>
token_is_set
&&
is_valid
)
const
openaiProvider
=
userInfo
?.
providers
?.
find
(({
token_is_set
,
is_valid
,
provider_name
})
=>
token_is_set
&&
is_valid
&&
provider_name
===
'openai'
)
const
promptTemplate
=
modelConfig
.
configs
.
prompt_template
const
promptVariables
=
modelConfig
.
configs
.
prompt_variables
...
...
@@ -92,7 +92,7 @@ const Config: FC = () => {
},
})
const
hasChatConfig
=
isChatApp
&&
(
featureConfig
.
openingStatement
||
featureConfig
.
suggestedQuestionsAfterAnswer
||
(
featureConfig
.
speechToText
&&
targetProvider
?.
provider_name
===
'openai'
))
const
hasChatConfig
=
isChatApp
&&
(
featureConfig
.
openingStatement
||
featureConfig
.
suggestedQuestionsAfterAnswer
||
(
featureConfig
.
speechToText
&&
openaiProvider
))
const
hasToolbox
=
false
const
[
showAutomatic
,
{
setTrue
:
showAutomaticTrue
,
setFalse
:
showAutomaticFalse
}]
=
useBoolean
(
false
)
...
...
@@ -122,7 +122,7 @@ const Config: FC = () => {
isChatApp=
{
isChatApp
}
config=
{
featureConfig
}
onChange=
{
handleFeatureChange
}
showSpeechToTextItem=
{
targetProvider
?.
provider_name
===
'openai'
}
showSpeechToTextItem=
{
!!
openaiProvider
}
/>
)
}
{
showAutomatic
&&
(
...
...
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