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
2c3464c2
authored
Jun 06, 2025
by
RedwindA
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
清理注释
parent
f24e2b0d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
15 deletions
+0
-15
relay/channel/gemini/dto.go
+0
-5
relay/channel/gemini/relay-gemini.go
+0
-10
No files found.
relay/channel/gemini/dto.go
View file @
2c3464c2
...
@@ -27,11 +27,6 @@ type FunctionCall struct {
...
@@ -27,11 +27,6 @@ type FunctionCall struct {
Arguments
any
`json:"args"`
Arguments
any
`json:"args"`
}
}
// type GeminiFunctionResponseContent struct {
// Name string `json:"name"`
// Content any `json:"content"`
// }
type
FunctionResponse
struct
{
type
FunctionResponse
struct
{
Name
string
`json:"name"`
Name
string
`json:"name"`
Response
map
[
string
]
interface
{}
`json:"response"`
Response
map
[
string
]
interface
{}
`json:"response"`
...
...
relay/channel/gemini/relay-gemini.go
View file @
2c3464c2
...
@@ -178,16 +178,6 @@ func CovertGemini2OpenAI(textRequest dto.GeneralOpenAIRequest, info *relaycommon
...
@@ -178,16 +178,6 @@ func CovertGemini2OpenAI(textRequest dto.GeneralOpenAIRequest, info *relaycommon
Name
:
name
,
Name
:
name
,
Response
:
contentMap
,
Response
:
contentMap
,
}
}
// If StrToMap returns nil because message.StringContent() is not a valid JSON object string,
// and Gemini strictly requires an object (e.g., {}), this might need adjustment.
// For example:
// if contentMap == nil && message.StringContent() != "" {
// // Option 1: Send an empty object if that's preferred over null
// // functionResp.Response = make(map[string]interface{})
// // Option 2: Wrap the plain string if that's ever the case and needs to be an object
// // functionResp.Response = map[string]interface{}{"text_content": message.StringContent()}
// }
// For now, directly assigning contentMap is the most straightforward fix for the reported issue.
*
parts
=
append
(
*
parts
,
GeminiPart
{
*
parts
=
append
(
*
parts
,
GeminiPart
{
FunctionResponse
:
functionResp
,
FunctionResponse
:
functionResp
,
...
...
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