Documentation
¶
Index ¶
Constants ¶
View Source
const (
ROUTE_COMPLETIONS = "https://api.openai.com/v1/chat/completions"
)
Variables ¶
This section is empty.
Functions ¶
func SaveConfigFile ¶
func SaveConfigFile(filePath string, cfg FileConfig) error
Types ¶
type CommandsService ¶
type CommandsService struct {
// contains filtered or unexported fields
}
We might want to pass args to the commands service if things get more complex
func NewCommandsService ¶
func NewCommandsService(prompt *PromptService, openAiSvc *OpenAiService) *CommandsService
func (*CommandsService) Auth ¶
func (c *CommandsService) Auth() (string, error)
func (*CommandsService) Help ¶
func (c *CommandsService) Help() (string, error)
func (*CommandsService) Interactive ¶ added in v1.2.0
func (c *CommandsService) Interactive(args []string) (string, error)
func (*CommandsService) Version ¶ added in v1.3.0
func (c *CommandsService) Version() (string, error)
type ConfigService ¶
func NewConfigService ¶
func NewConfigService() (svc *ConfigService)
type FileConfig ¶
type OpenAiService ¶
type OpenAiService struct { OpenAiRequest models.OpenAIRequest // contains filtered or unexported fields }
func NewOpenAiService ¶
func NewOpenAiService(cfg *ConfigService, aiModel AiModel, temperature float64) *OpenAiService
func (*OpenAiService) GetResponse ¶
func (s *OpenAiService) GetResponse(prompt string) (string, error)
type PromptService ¶
type PromptService struct {
// contains filtered or unexported fields
}
func NewPromptService ¶
func NewPromptService(cfg *ConfigService) *PromptService
func (*PromptService) GetAllChanges ¶ added in v1.2.0
func (s *PromptService) GetAllChanges() (string, error)
This function should get the changes from git status just like the function above, but now, it will be allowed to add everything to staging in case nothing is in it.
func (*PromptService) GetChanges ¶
func (s *PromptService) GetChanges() (string, error)
func (*PromptService) InteractivePrompt ¶ added in v1.2.0
func (s *PromptService) InteractivePrompt(arguments []string) (string, error)
Click to show internal directories.
Click to hide internal directories.