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
dd91799c
authored
Jul 18, 2024
by
CalciumIon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: log format
parent
d7b34f08
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
relay/relay-image.go
+1
-1
relay/relay-text.go
+1
-1
No files found.
relay/relay-image.go
View file @
dd91799c
...
...
@@ -179,7 +179,7 @@ func ImageHelper(c *gin.Context, relayMode int) *dto.OpenAIErrorWithStatusCode {
quality
=
"hd"
}
logContent
:=
fmt
.
Sprintf
(
"
,
大小 %s, 品质 %s"
,
imageRequest
.
Size
,
quality
)
logContent
:=
fmt
.
Sprintf
(
"大小 %s, 品质 %s"
,
imageRequest
.
Size
,
quality
)
postConsumeQuota
(
c
,
relayInfo
,
imageRequest
.
Model
,
usage
,
0
,
0
,
userQuota
,
0
,
groupRatio
,
modelPrice
,
true
,
logContent
)
return
nil
...
...
relay/relay-text.go
View file @
dd91799c
...
...
@@ -339,7 +339,7 @@ func postConsumeQuota(ctx *gin.Context, relayInfo *relaycommon.RelayInfo, modelN
logContent
+=
fmt
.
Sprintf
(
",模型 %s"
,
modelName
)
}
if
extraContent
!=
""
{
logContent
+=
extraContent
logContent
+=
", "
+
extraContent
}
other
:=
service
.
GenerateTextOtherInfo
(
ctx
,
relayInfo
,
modelRatio
,
groupRatio
,
completionRatio
,
modelPrice
)
model
.
RecordConsumeLog
(
ctx
,
relayInfo
.
UserId
,
relayInfo
.
ChannelId
,
promptTokens
,
completionTokens
,
logModel
,
...
...
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