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
74575506
Unverified
Commit
74575506
authored
Aug 12, 2023
by
Joel
Committed by
GitHub
Aug 12, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: frontend remove gpt4 check (#815)
parent
c13a90ee
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
14 deletions
+0
-14
index.tsx
web/app/components/app/configuration/config-model/index.tsx
+0
-10
index.tsx
web/app/components/app/configuration/index.tsx
+0
-4
No files found.
web/app/components/app/configuration/config-model/index.tsx
View file @
74575506
...
@@ -34,20 +34,15 @@ export type IConfigModelProps = {
...
@@ -34,20 +34,15 @@ export type IConfigModelProps = {
completionParams
:
CompletionParams
completionParams
:
CompletionParams
onCompletionParamsChange
:
(
newParams
:
CompletionParams
)
=>
void
onCompletionParamsChange
:
(
newParams
:
CompletionParams
)
=>
void
disabled
:
boolean
disabled
:
boolean
canUseGPT4
:
boolean
onShowUseGPT4Confirm
:
()
=>
void
}
}
const
ConfigModel
:
FC
<
IConfigModelProps
>
=
({
const
ConfigModel
:
FC
<
IConfigModelProps
>
=
({
// mode,
modelId
,
modelId
,
provider
,
provider
,
setModelId
,
setModelId
,
completionParams
,
completionParams
,
onCompletionParamsChange
,
onCompletionParamsChange
,
disabled
,
disabled
,
canUseGPT4
,
onShowUseGPT4Confirm
,
})
=>
{
})
=>
{
const
{
t
}
=
useTranslation
()
const
{
t
}
=
useTranslation
()
const
{
textGenerationModelList
}
=
useProviderContext
()
const
{
textGenerationModelList
}
=
useProviderContext
()
...
@@ -122,11 +117,6 @@ const ConfigModel: FC<IConfigModelProps> = ({
...
@@ -122,11 +117,6 @@ const ConfigModel: FC<IConfigModelProps> = ({
const
handleSelectModel
=
(
id
:
string
,
nextProvider
=
ProviderEnum
.
openai
)
=>
{
const
handleSelectModel
=
(
id
:
string
,
nextProvider
=
ProviderEnum
.
openai
)
=>
{
return
async
()
=>
{
return
async
()
=>
{
if
(
id
===
'gpt-4'
&&
!
canUseGPT4
)
{
hideConfig
()
onShowUseGPT4Confirm
()
return
}
const
prevParamsRule
=
getAllParams
()[
provider
]?.[
modelId
]
const
prevParamsRule
=
getAllParams
()[
provider
]?.[
modelId
]
setModelId
(
id
,
nextProvider
)
setModelId
(
id
,
nextProvider
)
...
...
web/app/components/app/configuration/index.tsx
View file @
74575506
...
@@ -292,10 +292,6 @@ const Configuration: FC = () => {
...
@@ -292,10 +292,6 @@ const Configuration: FC = () => {
setCompletionParams
(
newParams
)
setCompletionParams
(
newParams
)
}
}
}
}
disabled=
{
!
hasSetAPIKEY
}
disabled=
{
!
hasSetAPIKEY
}
canUseGPT4=
{
hasSetCustomAPIKEY
}
onShowUseGPT4Confirm=
{
()
=>
{
setShowUseGPT4Confirm
(
true
)
}
}
/>
/>
<
div
className=
'mx-3 w-[1px] h-[14px] bg-gray-200'
></
div
>
<
div
className=
'mx-3 w-[1px] h-[14px] bg-gray-200'
></
div
>
<
Button
onClick=
{
()
=>
setShowConfirm
(
true
)
}
className=
'shrink-0 mr-2 w-[70px] !h-8 !text-[13px] font-medium'
>
{
t
(
'appDebug.operation.resetConfig'
)
}
</
Button
>
<
Button
onClick=
{
()
=>
setShowConfirm
(
true
)
}
className=
'shrink-0 mr-2 w-[70px] !h-8 !text-[13px] font-medium'
>
{
t
(
'appDebug.operation.resetConfig'
)
}
</
Button
>
...
...
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