{"modulePath":"github.com/loadfms/commitgpt","version":"v1.3.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package services\n\n## Constants\n\n```go\nconst (\n\tROUTE_COMPLETIONS = \"https://api.openai.com/v1/chat/completions\"\n)\n```\n\n## Functions\n\n```go\nfunc SaveConfigFile(filePath string, cfg FileConfig) error\n```\n\n## Types\n\n```go\ntype AiModel string\n```\n\n```go\nconst (\n\tAIMODEL_GPT35 AiModel = \"gpt-3.5-turbo-1106\"\n)\n```\n\n```go\ntype CommandsService struct {\n\t// contains filtered or unexported fields\n}\n```\nWe might want to pass args to the commands service if things get more complex\n\n```go\nfunc NewCommandsService(prompt *PromptService, openAiSvc *OpenAiService) *CommandsService\n```\n\n```go\nfunc (c *CommandsService) Auth() (string, error)\n```\n\n```go\nfunc (c *CommandsService) Help() (string, error)\n```\n\n```go\nfunc (c *CommandsService) Interactive(args []string) (string, error)\n```\n\n```go\nfunc (c *CommandsService) Version() (string, error)\n```\n\n```go\ntype ConfigService struct {\n\tApiKey       string\n\tCustomPrompt string\n}\n```\n\n```go\nfunc NewConfigService() (svc *ConfigService)\n```\n\n```go\ntype FileConfig struct {\n\tApiKey struct {\n\t\tKey string `toml:\"key\"`\n\t} `toml:\"apikey\"`\n\tPrompt struct {\n\t\tCustom string `toml:\"custom\"`\n\t} `toml:\"prompt\"`\n}\n```\n\n```go\ntype OpenAiService struct {\n\tOpenAiRequest models.OpenAIRequest\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewOpenAiService(cfg *ConfigService, aiModel AiModel, temperature float64) *OpenAiService\n```\n\n```go\nfunc (s *OpenAiService) GetResponse(prompt string) (string, error)\n```\n\n```go\ntype PromptService struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewPromptService(cfg *ConfigService) *PromptService\n```\n\n```go\nfunc (s *PromptService) GetAllChanges() (string, error)\n```\nThis 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.\n\n```go\nfunc (s *PromptService) GetChanges() (string, error)\n```\n\n```go\nfunc (s *PromptService) InteractivePrompt(arguments []string) (string, error)\n```\n\n","path":"github.com/loadfms/commitgpt/services","name":"services","synopsis":"","isRedistributable":true}
