rename prompt config to command_prompt

This commit is contained in:
David DeGraw
2024-05-28 10:28:43 -06:00
parent 681aa22020
commit 2069abafb9
3 changed files with 5 additions and 5 deletions

View File

@@ -211,8 +211,8 @@ func run(cmd *cobra.Command, args []string) error {
prompt := func(counter string) string {
cm := configmanager.New(config.New())
if len(cm.Config.Prompt) != 0 {
return cm.Config.Prompt
if len(cm.Config.CommandPrompt) != 0 {
return cm.Config.CommandPrompt
} else {
return fmt.Sprintf("[%s] [%s]: ", time.Now().Format("2006-01-02 15:04:05"), counter)
}

View File

@@ -26,7 +26,7 @@ const (
openAITopP = 1.0
openAIFrequencyPenalty = 0.0
openAIPresencePenalty = 0.0
openAIPrompt = ""
openAICommandPrompt = ""
)
type ConfigStore interface {
@@ -115,7 +115,7 @@ func (f *FileIO) ReadDefaults() types.Config {
TopP: openAITopP,
FrequencyPenalty: openAIFrequencyPenalty,
PresencePenalty: openAIPresencePenalty,
Prompt: openAIPrompt,
CommandPrompt: openAICommandPrompt,
}
}

View File

@@ -18,5 +18,5 @@ type Config struct {
ModelsPath string `yaml:"models_path"`
AuthHeader string `yaml:"auth_header"`
AuthTokenPrefix string `yaml:"auth_token_prefix"`
Prompt string `yaml:"prompt"`
CommandPrompt string `yaml:"command_prompt"`
}