mirror of
				https://github.com/kardolus/chatgpt-cli.git
				synced 2024-09-08 23:15:00 +03:00 
			
		
		
		
	rename prompt config to command_prompt
				
					
				
			This commit is contained in:
		| @@ -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) | ||||
| 			} | ||||
|   | ||||
| @@ -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, | ||||
| 	} | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -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"` | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 David DeGraw
					David DeGraw