Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
llm-server-test
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
duanjinfei
llm-server-test
Commits
cde21103
Commit
cde21103
authored
Jan 27, 2024
by
duanjinfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change resp res
parent
f69c335a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
4 deletions
+9
-4
BaseController.go
controllers/BaseController.go
+2
-2
LLMController.go
controllers/LLMController.go
+1
-2
response.go
models/response.go
+6
-0
No files found.
controllers/BaseController.go
View file @
cde21103
...
...
@@ -13,10 +13,10 @@ func (d *BaseController) ResponseInfo(code int, msg interface{}, result interfac
switch
code
{
case
500
:
logs
.
Error
(
msg
,
result
)
d
.
Data
[
"json"
]
=
result
d
.
Data
[
"json"
]
=
map
[
string
]
interface
{}{
"code"
:
"500"
,
"msg"
:
msg
,
"content"
:
result
}
case
200
:
logs
.
Info
(
msg
,
result
)
d
.
Data
[
"json"
]
=
result
d
.
Data
[
"json"
]
=
map
[
string
]
interface
{}{
"code"
:
"200"
,
"msg"
:
msg
,
"content"
:
result
}
}
d
.
ServeJSON
()
}
controllers/LLMController.go
View file @
cde21103
...
...
@@ -34,7 +34,7 @@ func (c *LLMController) GetContainerSign() {
func
(
c
*
LLMController
)
GetExecRes
()
{
time
.
Sleep
(
time
.
Second
*
5
)
c
.
ResponseInfo
(
200
,
"OK"
,
"
Task successfully
"
)
c
.
ResponseInfo
(
200
,
"OK"
,
"
https://paint4art.oss-cn-beijing.aliyuncs.com/aiimages/SN90P6aKwh.jpg
"
)
}
func
stringToPrivateKey
(
privateKeyStr
string
)
*
ecdsa
.
PrivateKey
{
...
...
@@ -47,5 +47,4 @@ func stringToPrivateKey(privateKeyStr string) *ecdsa.PrivateKey {
return
nil
}
return
privateKey
}
models/response.go
View file @
cde21103
...
...
@@ -12,3 +12,9 @@ type TaskInfo struct {
ImageID
string
`json:"image_id"`
ImageUri
string
`json:"image_uri"`
}
type
ModelInfo
struct
{
ModelType
string
`json:"modelType"`
Model
string
`json:"model"`
Desc
string
`json:"desc"`
}
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