feat: refactor model manager
* chore: mv model icon * fix: model icon * fix: model icon * feat: refactor model manager * fix: model icon * fix: model icon * feat: refactor model manager See merge request: !905
This commit is contained in:
27
backend/infra/contract/modelmgr/modelmgr.go
Normal file
27
backend/infra/contract/modelmgr/modelmgr.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package modelmgr
|
||||
|
||||
import (
|
||||
"context"
|
||||
)
|
||||
|
||||
type Manager interface {
|
||||
ListModel(ctx context.Context, req *ListModelRequest) (*ListModelResponse, error)
|
||||
MGetModelByID(ctx context.Context, req *MGetModelRequest) ([]*Model, error)
|
||||
}
|
||||
|
||||
type ListModelRequest struct {
|
||||
FuzzyModelName *string
|
||||
Status []ModelStatus // default is default and in_use status
|
||||
Limit int
|
||||
Cursor *string
|
||||
}
|
||||
|
||||
type ListModelResponse struct {
|
||||
ModelList []*Model
|
||||
HasMore bool
|
||||
NextCursor *string
|
||||
}
|
||||
|
||||
type MGetModelRequest struct {
|
||||
IDs []int64
|
||||
}
|
||||
Reference in New Issue
Block a user