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
8ee5c23b
authored
Dec 24, 2025
by
Calcium-Ion
Committed by
GitHub
Dec 24, 2025
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2510 from feitianbubu/pr/0e7050dc89c1b761069f5e528d8ecf786e7008ae
修复claudeResponse流式请求空指针Panic
parents
d488a19e
1dc7ab9a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
relay/channel/claude/relay-claude.go
+5
-3
No files found.
relay/channel/claude/relay-claude.go
View file @
8ee5c23b
...
...
@@ -483,9 +483,11 @@ func StreamResponseClaude2OpenAI(reqMode int, claudeResponse *dto.ClaudeResponse
}
}
}
else
if
claudeResponse
.
Type
==
"message_delta"
{
finishReason
:=
stopReasonClaude2OpenAI
(
*
claudeResponse
.
Delta
.
StopReason
)
if
finishReason
!=
"null"
{
choice
.
FinishReason
=
&
finishReason
if
claudeResponse
.
Delta
!=
nil
&&
claudeResponse
.
Delta
.
StopReason
!=
nil
{
finishReason
:=
stopReasonClaude2OpenAI
(
*
claudeResponse
.
Delta
.
StopReason
)
if
finishReason
!=
"null"
{
choice
.
FinishReason
=
&
finishReason
}
}
//claudeUsage = &claudeResponse.Usage
}
else
if
claudeResponse
.
Type
==
"message_stop"
{
...
...
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