Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
88f6d29d
authored
Jul 16, 2025
by
Glaxy
Committed by
GitHub
Jul 16, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update relay-claude.go
优化claude messages接口启用思考时的参数设置
parent
4a02c5e2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
+4
-1
relay/channel/claude/relay-claude.go
+4
-1
No files found.
relay/channel/claude/relay-claude.go
View file @
88f6d29d
...
@@ -118,7 +118,10 @@ func RequestOpenAI2ClaudeMessage(textRequest dto.GeneralOpenAIRequest) (*dto.Cla
...
@@ -118,7 +118,10 @@ func RequestOpenAI2ClaudeMessage(textRequest dto.GeneralOpenAIRequest) (*dto.Cla
}
}
// TODO: 临时处理
// TODO: 临时处理
// https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking#important-considerations-when-using-extended-thinking
// https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking#important-considerations-when-using-extended-thinking
claudeRequest
.
TopP
=
0
// Anthropic 要求去掉 top_k
claudeRequest
.
TopK
=
nil
//top_p值可以在0.95-1之间
claudeRequest
.
TopP
=
0.95
claudeRequest
.
Temperature
=
common
.
GetPointer
[
float64
](
1.0
)
claudeRequest
.
Temperature
=
common
.
GetPointer
[
float64
](
1.0
)
claudeRequest
.
Model
=
strings
.
TrimSuffix
(
textRequest
.
Model
,
"-thinking"
)
claudeRequest
.
Model
=
strings
.
TrimSuffix
(
textRequest
.
Model
,
"-thinking"
)
}
}
...
...
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