Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
aon-app-server
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
Odysseus
aon-app-server
Commits
8b8c8c98
Commit
8b8c8c98
authored
Jul 10, 2024
by
brent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add async
parent
858dc7dc
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
255 additions
and
96 deletions
+255
-96
replicate_models_version.yaml
conf/replicate_models_version.yaml
+20
-0
task.go
controllers/task.go
+196
-93
lastupdate.tmp
lastupdate.tmp
+1
-1
main.go
main.go
+5
-2
task.go
models/task.go
+1
-0
template.go
models/template.go
+32
-0
No files found.
conf/replicate_models_version.yaml
View file @
8b8c8c98
...
@@ -23,6 +23,11 @@ meta-llama-3-8b-instruct:
...
@@ -23,6 +23,11 @@ meta-llama-3-8b-instruct:
url
:
"
https://api.replicate.com/v1/models/meta/meta-llama-3-8b-instruct/predictions"
url
:
"
https://api.replicate.com/v1/models/meta/meta-llama-3-8b-instruct/predictions"
stream
:
false
stream
:
false
meta-llama-3-70b-instruct
:
version
:
"
"
url
:
"
https://api.replicate.com/v1/models/meta/meta-llama-3-70b-instruct/predictions"
stream
:
false
stable-diffusion-3
:
stable-diffusion-3
:
version
:
"
"
version
:
"
"
url
:
"
https://api.replicate.com/v1/models/stability-ai/stable-diffusion-3/predictions"
url
:
"
https://api.replicate.com/v1/models/stability-ai/stable-diffusion-3/predictions"
...
@@ -41,4 +46,19 @@ sadtalker:
...
@@ -41,4 +46,19 @@ sadtalker:
stable-diffusion
:
stable-diffusion
:
version
:
"
ac732df83cea7fff18b8472768c88ad041fa750ff7682a21affe81863cbe77e4"
version
:
"
ac732df83cea7fff18b8472768c88ad041fa750ff7682a21affe81863cbe77e4"
url
:
"
https://api.replicate.com/v1/predictions"
url
:
"
https://api.replicate.com/v1/predictions"
stream
:
false
qwen1.5-72b
:
version
:
"
f919d3c43a8758de744cf2908426dd744154120f0a22e457a3fa647acdfe33be"
url
:
"
https://api.replicate.com/v1/predictions"
stream
:
false
qwen1.5-7b
:
version
:
"
f85bec5b21ba0860e0f200be6ef5af9d5a65b974b9f99e36eb036d21eab884de"
url
:
"
https://api.replicate.com/v1/predictions"
stream
:
false
llava-13b
:
version
:
"
b5f6212d032508382d61ff00469ddda3e32fd8a0e75dc39d8a4191bb742157fb"
url
:
"
https://api.replicate.com/v1/predictions"
stream
:
false
stream
:
false
\ No newline at end of file
controllers/task.go
View file @
8b8c8c98
This diff is collapsed.
Click to expand it.
lastupdate.tmp
View file @
8b8c8c98
{"/Users/brent/Documents/wubanWork/aon_app_server/controllers":1719995732323745955}
{"/Users/brent/Documents/wubanWork/aon_app_server/controllers":1720592962344996898}
\ No newline at end of file
\ No newline at end of file
main.go
View file @
8b8c8c98
...
@@ -2,6 +2,7 @@ package main
...
@@ -2,6 +2,7 @@ package main
import
(
import
(
_
"aon_app_server/routers"
_
"aon_app_server/routers"
"github.com/beego/beego/v2/core/logs"
beego
"github.com/beego/beego/v2/server/web"
beego
"github.com/beego/beego/v2/server/web"
"github.com/beego/beego/v2/server/web/filter/cors"
"github.com/beego/beego/v2/server/web/filter/cors"
)
)
...
@@ -10,10 +11,12 @@ func init() {
...
@@ -10,10 +11,12 @@ func init() {
beego
.
InsertFilter
(
"*"
,
beego
.
BeforeRouter
,
cors
.
Allow
(
&
cors
.
Options
{
beego
.
InsertFilter
(
"*"
,
beego
.
BeforeRouter
,
cors
.
Allow
(
&
cors
.
Options
{
AllowAllOrigins
:
true
,
AllowAllOrigins
:
true
,
AllowMethods
:
[]
string
{
"GET"
,
"POST"
,
"PUT"
,
"DELETE"
,
"OPTIONS"
},
AllowMethods
:
[]
string
{
"GET"
,
"POST"
,
"PUT"
,
"DELETE"
,
"OPTIONS"
},
AllowHeaders
:
[]
string
{
"Origin"
,
"Authorization"
,
"Access-Control-Allow-Origin"
,
"Access-Control-Allow-Headers"
,
"Content-Type"
,
"X-Xsrf-Token"
},
AllowHeaders
:
[]
string
{
"Origin"
,
"Authorization"
,
"A
sync"
,
"A
ccess-Control-Allow-Origin"
,
"Access-Control-Allow-Headers"
,
"Content-Type"
,
"X-Xsrf-Token"
},
ExposeHeaders
:
[]
string
{
"Content-Length"
,
"Access-Control-Allow-Origin"
,
"Access-Control-Allow-Headers"
,
"Content-Type"
,
"X-Xsrf-Token"
,
"Authorization"
},
ExposeHeaders
:
[]
string
{
"Content-Length"
,
"Access-Control-Allow-Origin"
,
"Access-Control-Allow-Headers"
,
"Content-Type"
,
"X-Xsrf-Token"
,
"Authorization"
,
"Async"
},
AllowCredentials
:
true
,
AllowCredentials
:
true
,
}))
}))
timeout
:=
beego
.
BConfig
.
Listen
.
ServerTimeOut
logs
.
Debug
(
"timeout = "
,
timeout
)
}
}
func
main
()
{
func
main
()
{
...
...
models/task.go
View file @
8b8c8c98
...
@@ -60,6 +60,7 @@ type TaskReturn struct {
...
@@ -60,6 +60,7 @@ type TaskReturn struct {
TaskError
string
`json:"task_error"`
TaskError
string
`json:"task_error"`
ExecCode
int
`json:"exec_code"`
ExecCode
int
`json:"exec_code"`
ExecError
string
`json:"exec_error"`
ExecError
string
`json:"exec_error"`
Async
bool
`json:"async"`
ApiError
struct
{
ApiError
struct
{
RequestId
string
`json:"request_id"`
RequestId
string
`json:"request_id"`
Message
string
`json:"message"`
Message
string
`json:"message"`
...
...
models/template.go
0 → 100644
View file @
8b8c8c98
package
models
//type Position int
//
//const (
// TOPLEFT Position = iota + 1
// TOPRIGHT
// TOPMIDDLE
// LEFTMIDDLE
// LEFTBOTTOM
// BOTTOMMIDDLE
// RIGHTBOTTOM
// RIGHTMIDDLE
// CENTER
//)
type
Position
struct
{
X
int
`json:"x,omitempty" bson:"x"`
Y
int
`json:"y,omitempty" bson:"y"`
}
type
Template
struct
{
Id
interface
{}
`json:"id" bson:"_id,omitempty"`
Logo
string
`json:"logo,omitempty" bson:"logo"`
// 海报图片上展示的logo,非 应用logo
Image
string
`json:"image,omitempty" bson:"image"`
//模版展示的图片
Brand
string
`json:"brand,omitempty" bson:"brand"`
// 海报图片上展示的文字,非 应用标题
Watermark
string
`json:"watermark,omitempty" bson:"watermark"`
//商家 的 水印
WatermarkPosition
Position
`json:"watermark_position,omitempty" bson:"watermark_position"`
//商家 的 水印位置
Platform
string
`json:"platform,omitempty" bson:"platform"`
//平台 的 水印
PlatformPosition
Position
`json:"platform_position,omitempty" bson:"platform_position"`
Prompt
string
`json:"prompt" bson:"prompt"`
}
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