Documentation
¶
Index ¶
- func AddBackendRoutes(mux *http.ServeMux, backendService backendservice.Service, ...)
- func AddModelRoutes(mux *http.ServeMux, stateService stateservice.Service, defaultModels ...string)
- func AddStateRoutes(mux *http.ServeMux, stateService stateservice.Service)
- type ObservedModel
- type OpenAICompatibleModelList
- type OpenAIModel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddBackendRoutes ¶
func AddBackendRoutes(mux *http.ServeMux, backendService backendservice.Service, stateService stateservice.Service)
func AddModelRoutes ¶
func AddModelRoutes(mux *http.ServeMux, stateService stateservice.Service, defaultModels ...string)
func AddStateRoutes ¶
func AddStateRoutes(mux *http.ServeMux, stateService stateservice.Service)
Types ¶
type ObservedModel ¶
type ObservedModel struct {
ID string `json:"id" example:"mistral:instruct"`
Model string `json:"model" example:"mistral:instruct"`
ContextLength int `json:"contextLength" example:"8192"`
CanChat bool `json:"canChat" example:"true"`
CanEmbed bool `json:"canEmbed" example:"false"`
CanPrompt bool `json:"canPrompt" example:"true"`
CanStream bool `json:"canStream" example:"true"`
}
func ListObservedModels ¶ added in v0.32.8
func ListObservedModels(states []statetype.BackendRuntimeState) []ObservedModel
type OpenAICompatibleModelList ¶
type OpenAICompatibleModelList struct {
Object string `json:"object" example:"list"`
Data []OpenAIModel `json:"data"`
}
type OpenAIModel ¶
type OpenAIModel struct {
ID string `json:"id" example:"mistral:latest"`
Object string `json:"object" example:"mistral:latest"`
Created int64 `json:"created" example:"1717020800"`
OwnedBy string `json:"owned_by" example:"system"`
}
func OpenAIModelsFromObserved ¶ added in v0.32.8
func OpenAIModelsFromObserved(observed []ObservedModel, defaultModel string, created int64) []OpenAIModel
Click to show internal directories.
Click to hide internal directories.