code

package
v0.0.0-...-1a4fc59 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 29, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CodeConfig

type CodeConfig struct {
	CodePrompt       string // The prompt to use when generating code
	OpenAIAPIKey     string // The OpenAI API key to use when generating code
	GenerationFolder string // The folder to generate code in
}

func LoadCodeConfig

func LoadCodeConfig(generationFolder string) (*CodeConfig, error)

func NewCodeConfig

func NewCodeConfig(generationFolder string, openAIAPIKey string) *CodeConfig

func (*CodeConfig) ToAIConfig

func (c *CodeConfig) ToAIConfig() *ai.AIConfig

type CodeGenerator

type CodeGenerator struct {
	Conversation *chat.Conversation

	ProjectState string
	// contains filtered or unexported fields
}

func NewCodeGenerator

func NewCodeGenerator(generationFolder string, config *CodeConfig) *CodeGenerator

Creates a new CodeGenerator The code generator will use the given input data to generate the code for the project.

func (*CodeGenerator) Generate

func (c *CodeGenerator) Generate() error

Generates the code for the project based on the given directory state.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL