2024-03-01 15:19:53 +00:00
|
|
|
package schema
|
|
|
|
|
|
|
|
import (
|
|
|
|
gopsutil "github.com/shirou/gopsutil/v3/process"
|
|
|
|
)
|
|
|
|
|
|
|
|
type BackendMonitorRequest struct {
|
|
|
|
Model string `json:"model" yaml:"model"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type BackendMonitorResponse struct {
|
|
|
|
MemoryInfo *gopsutil.MemoryInfoStat
|
|
|
|
MemoryPercent float32
|
|
|
|
CPUPercent float64
|
|
|
|
}
|
|
|
|
|
|
|
|
type TTSRequest struct {
|
|
|
|
Model string `json:"model" yaml:"model"`
|
|
|
|
Input string `json:"input" yaml:"input"`
|
2024-03-14 22:08:34 +00:00
|
|
|
Voice string `json:"voice" yaml:"voice"`
|
2024-03-01 15:19:53 +00:00
|
|
|
Backend string `json:"backend" yaml:"backend"`
|
|
|
|
}
|
2024-03-22 20:14:04 +00:00
|
|
|
|
|
|
|
type StoresSet struct {
|
|
|
|
Store string `json:"store,omitempty" yaml:"store,omitempty"`
|
|
|
|
|
|
|
|
Keys [][]float32 `json:"keys" yaml:"keys"`
|
|
|
|
Values []string `json:"values" yaml:"values"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type StoresDelete struct {
|
|
|
|
Store string `json:"store,omitempty" yaml:"store,omitempty"`
|
|
|
|
|
|
|
|
Keys [][]float32 `json:"keys"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type StoresGet struct {
|
|
|
|
Store string `json:"store,omitempty" yaml:"store,omitempty"`
|
|
|
|
|
|
|
|
Keys [][]float32 `json:"keys" yaml:"keys"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type StoresGetResponse struct {
|
|
|
|
Keys [][]float32 `json:"keys" yaml:"keys"`
|
|
|
|
Values []string `json:"values" yaml:"values"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type StoresFind struct {
|
|
|
|
Store string `json:"store,omitempty" yaml:"store,omitempty"`
|
|
|
|
|
|
|
|
Key []float32 `json:"key" yaml:"key"`
|
|
|
|
Topk int `json:"topk" yaml:"topk"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type StoresFindResponse struct {
|
|
|
|
Keys [][]float32 `json:"keys" yaml:"keys"`
|
|
|
|
Values []string `json:"values" yaml:"values"`
|
|
|
|
Similarities []float32 `json:"similarities" yaml:"similarities"`
|
|
|
|
}
|