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
cdc6ab61
authored
Aug 07, 2025
by
Calcium-Ion
Committed by
GitHub
Aug 07, 2025
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1518 from RedwindA/fix/disable-gemini-sse
Fix/disable-gemini-ping
parents
ef2bed2f
342bf59c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
+3
-1
relay/channel/gemini/adaptor.go
+3
-1
No files found.
relay/channel/gemini/adaptor.go
View file @
cdc6ab61
...
...
@@ -120,6 +120,9 @@ func (a *Adaptor) GetRequestURL(info *relaycommon.RelayInfo) (string, error) {
action
:=
"generateContent"
if
info
.
IsStream
{
action
=
"streamGenerateContent?alt=sse"
if
info
.
RelayMode
==
constant
.
RelayModeGemini
{
info
.
DisablePing
=
true
}
}
return
fmt
.
Sprintf
(
"%s/%s/models/%s:%s"
,
info
.
BaseUrl
,
version
,
info
.
UpstreamModelName
,
action
),
nil
}
...
...
@@ -193,7 +196,6 @@ func (a *Adaptor) DoRequest(c *gin.Context, info *relaycommon.RelayInfo, request
func
(
a
*
Adaptor
)
DoResponse
(
c
*
gin
.
Context
,
resp
*
http
.
Response
,
info
*
relaycommon
.
RelayInfo
)
(
usage
any
,
err
*
types
.
NewAPIError
)
{
if
info
.
RelayMode
==
constant
.
RelayModeGemini
{
if
info
.
IsStream
{
info
.
DisablePing
=
true
return
GeminiTextGenerationStreamHandler
(
c
,
info
,
resp
)
}
else
{
return
GeminiTextGenerationHandler
(
c
,
info
,
resp
)
...
...
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