Documentation ¶
Index ¶
- type Generate
- func (g *Generate) BuildPrompt() ([]llms.MessageContent, error)
- func (g *Generate) Generate() error
- func (g *Generate) GenerateFileName() string
- func (g *Generate) GetFileSuffix() string
- func (g *Generate) GetOutputFile() string
- func (g *Generate) GetOutputResults() string
- func (g *Generate) SaveAndPrintResults() error
- func (g *Generate) SaveFile(filename string, data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generate ¶
type Generate struct { Context context.Context AIClient ai.IAI AIProvider string PromptName string PromptVars any OutputType string Output any Results string RunningTime string }
func NewGenerate ¶
func (*Generate) BuildPrompt ¶
func (g *Generate) BuildPrompt() ([]llms.MessageContent, error)
BuildPrompt builds the prompt based on the prompt name and variables.
func (*Generate) GenerateFileName ¶
GenerateFileName generates the file name based on the prompt variables.
func (*Generate) GetFileSuffix ¶
GetFileSuffix returns the file suffix based on the output format.
func (*Generate) GetOutputFile ¶
GetOutputFile returns the output file path.
func (*Generate) GetOutputResults ¶
GetOutputResults returns the results.
func (*Generate) SaveAndPrintResults ¶
SaveAndPrintResults saves the results and errors to the files and prints the errors.
Click to show internal directories.
Click to hide internal directories.