Documentation
      ¶
    
    
  
    
  
    Index ¶
- Variables
 - type AppOption
 - func WithApiKeys(apiKeys []string) AppOption
 - func WithAudioDir(audioDir string) AppOption
 - func WithBackendAssets(f embed.FS) AppOption
 - func WithBackendAssetsOutput(out string) AppOption
 - func WithConfigFile(configFile string) AppOption
 - func WithContext(ctx context.Context) AppOption
 - func WithContextSize(ctxSize int) AppOption
 - func WithCors(b bool) AppOption
 - func WithCorsAllowOrigins(b string) AppOption
 - func WithDebug(debug bool) AppOption
 - func WithDisableMessage(disableMessage bool) AppOption
 - func WithExternalBackend(name string, uri string) AppOption
 - func WithF16(f16 bool) AppOption
 - func WithGalleries(galleries []gallery.Gallery) AppOption
 - func WithImageDir(imageDir string) AppOption
 - func WithJSONStringPreload(configFile string) AppOption
 - func WithMetrics(meter *metrics.Metrics) AppOption
 - func WithModelLoader(loader *model.ModelLoader) AppOption
 - func WithStringGalleries(galls string) AppOption
 - func WithThreads(threads int) AppOption
 - func WithUploadLimitMB(limit int) AppOption
 - func WithYAMLConfigPreload(configFile string) AppOption
 
- type Option
 
Constants ¶
This section is empty.
Variables ¶
      View Source
      
  
    var EnableGalleriesAutoload = func(o *Option) { o.AutoloadGalleries = true }
      View Source
      
  
var EnableSingleBackend = func(o *Option) { o.SingleBackend = true }
Functions ¶
This section is empty.
Types ¶
type AppOption ¶
type AppOption func(*Option)
func WithApiKeys ¶ added in v1.24.1
func WithAudioDir ¶
func WithBackendAssets ¶
func WithBackendAssetsOutput ¶
func WithConfigFile ¶
func WithContext ¶
func WithContextSize ¶
func WithCorsAllowOrigins ¶
func WithDisableMessage ¶
func WithExternalBackend ¶ added in v1.22.0
func WithGalleries ¶
func WithImageDir ¶
func WithJSONStringPreload ¶
func WithMetrics ¶ added in v1.40.0
func WithModelLoader ¶
func WithModelLoader(loader *model.ModelLoader) AppOption
func WithStringGalleries ¶
func WithThreads ¶
func WithUploadLimitMB ¶
func WithYAMLConfigPreload ¶
type Option ¶
type Option struct {
	Context                             context.Context
	ConfigFile                          string
	Loader                              *model.ModelLoader
	UploadLimitMB, Threads, ContextSize int
	F16                                 bool
	Debug, DisableMessage               bool
	ImageDir                            string
	AudioDir                            string
	CORS                                bool
	PreloadJSONModels                   string
	PreloadModelsFromPath               string
	CORSAllowOrigins                    string
	ApiKeys                             []string
	Metrics                             *metrics.Metrics
	Galleries []gallery.Gallery
	BackendAssets     embed.FS
	AssetsDestination string
	ExternalGRPCBackends map[string]string
	AutoloadGalleries bool
	SingleBackend bool
}
    func NewOptions ¶
 Click to show internal directories. 
   Click to hide internal directories.