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
88a095e4
Unverified
Commit
88a095e4
authored
Feb 29, 2024
by
takatost
Committed by
GitHub
Feb 29, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: wrong default model parameters when creating app (#2623)
parent
dd961985
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
40 deletions
+8
-40
model_template.py
api/constants/model_template.py
+8
-40
No files found.
api/constants/model_template.py
View file @
88a095e4
...
@@ -13,30 +13,14 @@ model_templates = {
...
@@ -13,30 +13,14 @@ model_templates = {
'status'
:
'normal'
'status'
:
'normal'
},
},
'model_config'
:
{
'model_config'
:
{
'provider'
:
'openai'
,
'provider'
:
''
,
'model_id'
:
'gpt-3.5-turbo-instruct'
,
'model_id'
:
''
,
'configs'
:
{
'configs'
:
{},
'prompt_template'
:
''
,
'prompt_variables'
:
[],
'completion_params'
:
{
'max_token'
:
512
,
'temperature'
:
1
,
'top_p'
:
1
,
'presence_penalty'
:
0
,
'frequency_penalty'
:
0
,
}
},
'model'
:
json
.
dumps
({
'model'
:
json
.
dumps
({
"provider"
:
"openai"
,
"provider"
:
"openai"
,
"name"
:
"gpt-3.5-turbo-instruct"
,
"name"
:
"gpt-3.5-turbo-instruct"
,
"mode"
:
"completion"
,
"mode"
:
"completion"
,
"completion_params"
:
{
"completion_params"
:
{}
"max_tokens"
:
512
,
"temperature"
:
1
,
"top_p"
:
1
,
"presence_penalty"
:
0
,
"frequency_penalty"
:
0
}
}),
}),
'user_input_form'
:
json
.
dumps
([
'user_input_form'
:
json
.
dumps
([
{
{
...
@@ -64,30 +48,14 @@ model_templates = {
...
@@ -64,30 +48,14 @@ model_templates = {
'status'
:
'normal'
'status'
:
'normal'
},
},
'model_config'
:
{
'model_config'
:
{
'provider'
:
'openai'
,
'provider'
:
''
,
'model_id'
:
'gpt-3.5-turbo'
,
'model_id'
:
''
,
'configs'
:
{
'configs'
:
{},
'prompt_template'
:
''
,
'prompt_variables'
:
[],
'completion_params'
:
{
'max_token'
:
512
,
'temperature'
:
1
,
'top_p'
:
1
,
'presence_penalty'
:
0
,
'frequency_penalty'
:
0
,
}
},
'model'
:
json
.
dumps
({
'model'
:
json
.
dumps
({
"provider"
:
"openai"
,
"provider"
:
"openai"
,
"name"
:
"gpt-3.5-turbo"
,
"name"
:
"gpt-3.5-turbo"
,
"mode"
:
"chat"
,
"mode"
:
"chat"
,
"completion_params"
:
{
"completion_params"
:
{}
"max_tokens"
:
512
,
"temperature"
:
1
,
"top_p"
:
1
,
"presence_penalty"
:
0
,
"frequency_penalty"
:
0
}
})
})
}
}
},
},
...
...
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