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
93e99fb3
Unverified
Commit
93e99fb3
authored
May 25, 2023
by
Joel
Committed by
GitHub
May 25, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: generation support gpt4 (#200)
parent
b9ebce7a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
index.tsx
web/app/components/app/configuration/config-model/index.tsx
+3
-2
No files found.
web/app/components/app/configuration/config-model/index.tsx
View file @
93e99fb3
...
@@ -29,6 +29,7 @@ const options = [
...
@@ -29,6 +29,7 @@ const options = [
{
id
:
'gpt-4'
,
name
:
'gpt-4'
,
type
:
AppType
.
chat
},
// 8k version
{
id
:
'gpt-4'
,
name
:
'gpt-4'
,
type
:
AppType
.
chat
},
// 8k version
{
id
:
'gpt-3.5-turbo'
,
name
:
'gpt-3.5-turbo'
,
type
:
AppType
.
completion
},
{
id
:
'gpt-3.5-turbo'
,
name
:
'gpt-3.5-turbo'
,
type
:
AppType
.
completion
},
{
id
:
'text-davinci-003'
,
name
:
'text-davinci-003'
,
type
:
AppType
.
completion
},
{
id
:
'text-davinci-003'
,
name
:
'text-davinci-003'
,
type
:
AppType
.
completion
},
{
id
:
'gpt-4'
,
name
:
'gpt-4'
,
type
:
AppType
.
completion
},
// 8k version
]
]
const
ModelIcon
=
({
className
}:
{
className
?:
string
})
=>
(
const
ModelIcon
=
({
className
}:
{
className
?:
string
})
=>
(
...
@@ -205,14 +206,14 @@ const ConifgModel: FC<IConifgModelProps> = ({
...
@@ -205,14 +206,14 @@ const ConifgModel: FC<IConifgModelProps> = ({
<
div
className=
"flex items-center justify-between my-5 h-9"
>
<
div
className=
"flex items-center justify-between my-5 h-9"
>
<
div
>
{
t
(
'appDebug.modelConfig.model'
)
}
</
div
>
<
div
>
{
t
(
'appDebug.modelConfig.model'
)
}
</
div
>
{
/* model selector */
}
{
/* model selector */
}
<
div
className=
"relative"
>
<
div
className=
"relative"
style=
{
{
zIndex
:
30
}
}
>
<
div
ref=
{
triggerRef
}
onClick=
{
()
=>
!
selectModelDisabled
&&
toogleOption
()
}
className=
{
cn
(
selectModelDisabled
?
'cursor-not-allowed'
:
'cursor-pointer'
,
"flex items-center h-9 px-3 space-x-2 rounded-lg bg-gray-50 "
)
}
>
<
div
ref=
{
triggerRef
}
onClick=
{
()
=>
!
selectModelDisabled
&&
toogleOption
()
}
className=
{
cn
(
selectModelDisabled
?
'cursor-not-allowed'
:
'cursor-pointer'
,
"flex items-center h-9 px-3 space-x-2 rounded-lg bg-gray-50 "
)
}
>
<
ModelIcon
/>
<
ModelIcon
/>
<
div
className=
"text-sm gray-900"
>
{
selectedModel
?.
name
}
</
div
>
<
div
className=
"text-sm gray-900"
>
{
selectedModel
?.
name
}
</
div
>
{
!
selectModelDisabled
&&
<
ChevronDownIcon
className=
{
cn
(
isShowOption
&&
'rotate-180'
,
'w-[14px] h-[14px] text-gray-500'
)
}
/>
}
{
!
selectModelDisabled
&&
<
ChevronDownIcon
className=
{
cn
(
isShowOption
&&
'rotate-180'
,
'w-[14px] h-[14px] text-gray-500'
)
}
/>
}
</
div
>
</
div
>
{
isShowOption
&&
(
{
isShowOption
&&
(
<
div
className=
{
cn
(
isChatApp
?
'w-[159px]'
:
'w-[179px]'
,
"absolute right-0 bg-gray-50 rounded-lg"
)
}
>
<
div
className=
{
cn
(
isChatApp
?
'w-[159px]'
:
'w-[179px]'
,
"absolute right-0 bg-gray-50 rounded-lg
shadow
"
)
}
>
{
availableModels
.
map
(
item
=>
(
{
availableModels
.
map
(
item
=>
(
<
div
key=
{
item
.
id
}
onClick=
{
handleSelectModel
(
item
.
id
)
}
className=
"flex items-center h-9 px-3 rounded-lg cursor-pointer hover:bg-gray-100"
>
<
div
key=
{
item
.
id
}
onClick=
{
handleSelectModel
(
item
.
id
)
}
className=
"flex items-center h-9 px-3 rounded-lg cursor-pointer hover:bg-gray-100"
>
<
ModelIcon
className=
'mr-2'
/>
<
ModelIcon
className=
'mr-2'
/>
...
...
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