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
e47b5b43
Unverified
Commit
e47b5b43
authored
Feb 14, 2024
by
Yeuoly
Committed by
GitHub
Feb 14, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: baichuan frequency_penalty (#2446)
parent
21c9d9e2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
baichuan_turbo.py
...el_runtime/model_providers/baichuan/llm/baichuan_turbo.py
+4
-2
No files found.
api/core/model_runtime/model_providers/baichuan/llm/baichuan_turbo.py
View file @
e47b5b43
...
@@ -128,8 +128,10 @@ class BaichuanModel:
...
@@ -128,8 +128,10 @@ class BaichuanModel:
'role'
:
message
.
role
,
'role'
:
message
.
role
,
})
})
# [baichuan] frequency_penalty must be between 1 and 2
# [baichuan] frequency_penalty must be between 1 and 2
if
'frequency_penalty'
in
parameters
:
if
parameters
[
'frequency_penalty'
]
<
1
or
parameters
[
'frequency_penalty'
]
>
2
:
if
parameters
[
'frequency_penalty'
]
<
1
or
parameters
[
'frequency_penalty'
]
>
2
:
parameters
[
'frequency_penalty'
]
=
1
parameters
[
'frequency_penalty'
]
=
1
# turbo api accepts flat parameters
# turbo api accepts flat parameters
return
{
return
{
'model'
:
self
.
_model_mapping
(
model
),
'model'
:
self
.
_model_mapping
(
model
),
...
...
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