Documentation
¶
Index ¶
- Constants
- Variables
- func ApplyFlagOverrides(pConf *Configurations, f *Flags)
- func Command(deps CommandDeps) *internal.Command
- func CreateQuerier(conf Configurations) (models.Querier, error)
- func ValidateOutputType(outputType OutputType) error
- type CommandDeps
- type Configurations
- type Flags
- type Output
- type OutputType
Constants ¶
Variables ¶
var DEFAULT = Configurations{ Model: "gpt-image-1", PromptFormat: "I NEED to test how the tool works with extremely simple prompts. DO NOT add any detail, just use it AS-IS: '%v'", Output: Output{ Type: UNSET, Dir: fmt.Sprintf("%v/Pictures", os.Getenv("HOME")), Prefix: "clai", }, }
Functions ¶
func ApplyFlagOverrides ¶ added in v1.11.0
func ApplyFlagOverrides(pConf *Configurations, f *Flags)
ApplyFlagOverrides applies the CLI flag values onto the file-loaded configuration (flags > file > default).
func Command ¶ added in v1.11.0
func Command(deps CommandDeps) *internal.Command
Command builds the photo command.
func CreateQuerier ¶ added in v1.11.0
func CreateQuerier(conf Configurations) (models.Querier, error)
CreateQuerier routes the model to a photo vendor querier.
func ValidateOutputType ¶
func ValidateOutputType(outputType OutputType) error
ValidateOutputType is kind of dumb. Why did I add this..?
Types ¶
type CommandDeps ¶ added in v1.11.0
type CommandDeps struct {
ConfigPrep func() (confDir string, err error)
LoadConfig func(confDir string) (Configurations, error)
}
CommandDeps are the composition-root collaborators: config loading (with the old-config migration) lives in internal/setup, which photo cannot import (setup imports photo), so internal/cli injects it.
type Configurations ¶
type Configurations = generic.Configurations
The configuration types are defined in photo/generic so the vendor clients can import them without importing this package (which would cycle: this package composes vendors).
type Flags ¶ added in v1.11.0
type Flags = internal.MediaFlags
Flags is the photo command's flag surface: the media group named for pictures.
type Output ¶
The configuration types are defined in photo/generic so the vendor clients can import them without importing this package (which would cycle: this package composes vendors).
type OutputType ¶
type OutputType = generic.OutputType
The configuration types are defined in photo/generic so the vendor clients can import them without importing this package (which would cycle: this package composes vendors).
Directories
¶
| Path | Synopsis |
|---|---|
|
Package generic holds photo's vendor-shared surface — the configuration types, image saving and the progress animation — below the vendor clients, so both vendors and internal/photo can import it (same layering as text with pkg/text/models).
|
Package generic holds photo's vendor-shared surface — the configuration types, image saving and the progress animation — below the vendor clients, so both vendors and internal/photo can import it (same layering as text with pkg/text/models). |