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
0b4d82e9
authored
Feb 03, 2026
by
Calcium-Ion
Committed by
GitHub
Feb 03, 2026
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2814 from thirking/fix/remove-unescape-function
fix: 移除不必要的 unescapeMapOrSlice 调用,修复 Windows 路径转义问题
parents
ddeacccc
4108c404
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
relay/channel/gemini/relay-gemini.go
+3
-5
No files found.
relay/channel/gemini/relay-gemini.go
View file @
0b4d82e9
...
@@ -988,11 +988,9 @@ func unescapeMapOrSlice(data interface{}) interface{} {
...
@@ -988,11 +988,9 @@ func unescapeMapOrSlice(data interface{}) interface{} {
func
getResponseToolCall
(
item
*
dto
.
GeminiPart
)
*
dto
.
ToolCallResponse
{
func
getResponseToolCall
(
item
*
dto
.
GeminiPart
)
*
dto
.
ToolCallResponse
{
var
argsBytes
[]
byte
var
argsBytes
[]
byte
var
err
error
var
err
error
if
result
,
ok
:=
item
.
FunctionCall
.
Arguments
.
(
map
[
string
]
interface
{});
ok
{
// 移除 unescapeMapOrSlice 调用,直接使用 json.Marshal
argsBytes
,
err
=
json
.
Marshal
(
unescapeMapOrSlice
(
result
))
// JSON 序列化/反序列化已经正确处理了转义字符
}
else
{
argsBytes
,
err
=
json
.
Marshal
(
item
.
FunctionCall
.
Arguments
)
argsBytes
,
err
=
json
.
Marshal
(
item
.
FunctionCall
.
Arguments
)
}
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
return
nil
...
...
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