Documentation
¶
Index ¶
- Constants
- func EmbeddingsMiddleware() gin.HandlerFunc
- func ListMiddleware() gin.HandlerFunc
- func PullModel(ctx context.Context, hf *model.HuggingFaceModel, fn func(api.ProgressResponse)) error
- func RetrieveMiddleware() gin.HandlerFunc
- type API
- func (s *API) ChatHandler(c *gin.Context)
- func (s *API) EmbedHandler(c *gin.Context)
- func (s *API) EmbeddingsHandler(c *gin.Context)
- func (s *API) GenerateHandler(c *gin.Context)
- func (s *API) HealthHandler(c *gin.Context)
- func (s *API) IndexHandler(c *gin.Context)
- func (s *API) ListHandler(c *gin.Context)
- func (s *API) ModelsLoadStubHandler(c *gin.Context)
- func (s *API) ModelsUnloadStubHandler(c *gin.Context)
- func (s *API) PropsChangeHandler(c *gin.Context)
- func (s *API) PropsHandler(c *gin.Context)
- func (s *API) PsHandler(c *gin.Context)
- func (s *API) PullHandler(c *gin.Context)
- func (s *API) Setup(r *gin.Engine)
- func (s *API) ShowHandler(c *gin.Context)
- func (s *API) SlotsHandler(c *gin.Context)
- func (s *API) Start() error
- func (s *API) V1ModelsWebUIHandler(c *gin.Context)
- func (s *API) VersionHandler(c *gin.Context)
- type BaseWriter
- type EmbedRequest
- type EmbedWriter
- type Embedding
- type EmbeddingList
- type EmbeddingUsage
- type Error
- type ErrorResponse
- type ImageData
- type ListCompletion
- type ListWriter
- type Model
- type RetrieveWriter
Constants ¶
View Source
const (
InvalidModelNameErrMsg = "invalid model name"
)
Variables ¶
This section is empty.
Functions ¶
func EmbeddingsMiddleware ¶
func EmbeddingsMiddleware() gin.HandlerFunc
func ListMiddleware ¶
func ListMiddleware() gin.HandlerFunc
func PullModel ¶
func PullModel(ctx context.Context, hf *model.HuggingFaceModel, fn func(api.ProgressResponse)) error
func RetrieveMiddleware ¶
func RetrieveMiddleware() gin.HandlerFunc
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
func (*API) ChatHandler ¶
func (*API) EmbedHandler ¶
func (*API) EmbeddingsHandler ¶
func (*API) GenerateHandler ¶
func (*API) HealthHandler ¶
func (*API) IndexHandler ¶
func (*API) ListHandler ¶
func (*API) ModelsLoadStubHandler ¶
func (*API) ModelsUnloadStubHandler ¶
func (*API) PropsChangeHandler ¶
func (*API) PropsHandler ¶
func (*API) PullHandler ¶
func (*API) ShowHandler ¶
func (*API) SlotsHandler ¶
func (*API) V1ModelsWebUIHandler ¶
V1ModelsWebUIHandler lists models in the shape expected by llama.cpp tools/server/webui (data[] with path, status, in_cache).
func (*API) VersionHandler ¶
type BaseWriter ¶
type BaseWriter struct {
gin.ResponseWriter
}
type EmbedRequest ¶
type EmbedWriter ¶
type EmbedWriter struct {
BaseWriter
// contains filtered or unexported fields
}
type EmbeddingList ¶
type EmbeddingList struct {
Object string `json:"object"`
Data []Embedding `json:"data"`
Model string `json:"model"`
Usage EmbeddingUsage `json:"usage,omitempty"`
}
type EmbeddingUsage ¶
type ErrorResponse ¶
type ErrorResponse struct {
Error Error `json:"error"`
}
func NewError ¶
func NewError(code int, message string) ErrorResponse
type ListCompletion ¶
type ListWriter ¶
type ListWriter struct {
BaseWriter
}
type RetrieveWriter ¶
type RetrieveWriter struct {
BaseWriter
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.