Skip to content

Commit

Permalink
fix: fix max_tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
mercury7720 committed Oct 14, 2024
1 parent 7fa53af commit 1ba6faa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions adapter/sparkdesk/chat.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ func GetToken(props *adaptercommon.ChatProps) *int {

switch props.Model {
case globals.SparkDeskLite, globals.SparkDeskPro128K:
if *props.MaxTokens > 8192 {
return utils.ToPtr(8192)
}
case globals.SparkDeskPro, globals.SparkDeskMax, globals.SparkDeskMax32K, globals.SparkDeskV4Ultra:
if *props.MaxTokens > 4096 {
return utils.ToPtr(4096)
}
case globals.SparkDeskPro, globals.SparkDeskMax, globals.SparkDeskMax32K, globals.SparkDeskV4Ultra:
if *props.MaxTokens > 8192 {
return utils.ToPtr(8192)
}
}

return props.MaxTokens
Expand Down

0 comments on commit 1ba6faa

Please sign in to comment.