Skip to content

Commit 1b41726

Browse files
committed
Replace ChatGPT with Otto in various command lines and messages
1 parent 7880a4d commit 1b41726

File tree

10 files changed

+22
-22
lines changed

10 files changed

+22
-22
lines changed

cmd/ask.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ Requires a path to a repository or file as a positional argument.`,
171171
}
172172
}
173173

174-
fmt.Print("ChatGPT: ")
174+
fmt.Print("Otto: ")
175175
_, err = utils.PrintChatCompletionStream(stream)
176176
if err != nil {
177177
log.Errorf("Error printing chat completion stream: %s", err)

cmd/chat.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ import (
2525
// chatCmd represents the chat command
2626
var chatCmd = &cobra.Command{
2727
Use: "chat",
28-
Short: "Talk with ChatGPT from the command line!",
29-
Long: `Talk with ChatGPT from the command line!
28+
Short: "Talk with Otto from the command line!",
29+
Long: `Talk with Otto from the command line!
3030
No code context is passed in this mode. Emulates web chat.`,
3131
PreRun: func(cmd *cobra.Command, args []string) {
3232
if verbose {
@@ -47,7 +47,7 @@ No code context is passed in this mode. Emulates web chat.`,
4747

4848
client := openai.NewClient(conf.APIKey)
4949

50-
fmt.Println("ChatGPT: Hello! I am ChatGPT. Use Ctrl+C to exit at any time.")
50+
fmt.Println("Otto: Hello! I am Otto. Use Ctrl+C to exit at any time.")
5151

5252
for {
5353
question, err := utils.Input("You: ")
@@ -56,7 +56,7 @@ No code context is passed in this mode. Emulates web chat.`,
5656
os.Exit(1)
5757
}
5858

59-
fmt.Print("ChatGPT: ")
59+
fmt.Print("Otto: ")
6060

6161
log.Debugf("Adding question '%s' to context...", question)
6262

cmd/cmd.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ import (
2222
// cmdCmd represents the cmd command
2323
var cmdCmd = &cobra.Command{
2424
Use: "cmd",
25-
Short: "Have ChatGPT suggest a command to run next",
26-
Long: `Have ChatGPT suggest a command to run next. This command will use your shell history to suggest a command to run next.
25+
Short: "Have Otto suggest a command to run next",
26+
Long: `Have Otto suggest a command to run next. This command will use your shell history to suggest a command to run next.
2727
This command is only supported on MacOS and Linux using Bash or Zsh. Windows and other shells coming soon!`,
2828
PreRun: func(cmd *cobra.Command, args []string) {
2929
if verbose {
@@ -52,7 +52,7 @@ This command is only supported on MacOS and Linux using Bash or Zsh. Windows and
5252
os.Exit(1)
5353
}
5454

55-
log.Debug("Asking ChatGPT for a command...")
55+
log.Debug("Asking Otto for a command...")
5656
stream, err := ai.CmdQuestion(history, chatPrompt, conf)
5757

5858
if err != nil {

cmd/commit.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ var commitCmd = &cobra.Command{
136136
log.Debugf("Diff tokens %d is less than the model maximum of tokens %d", diffTokens, calc.GetMaxTokens(conf.Model))
137137
}
138138

139-
log.Debug("Sending diff to ChatGPT...")
139+
log.Debug("Sending diff to Otto...")
140140
fmt.Print("Commit Msg: ")
141141
stream, err := ai.CommitMessage(diff, conventional, conf)
142142
if err != nil {

cmd/docs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ func init() {
224224
RootCmd.AddCommand(docsCmd)
225225

226226
// see cmd/vars for the definition of these flags
227-
docsCmd.Flags().StringVarP(&chatPrompt, "prompt", "p", "", "Prompt to use for the ChatGPT API")
227+
docsCmd.Flags().StringVarP(&chatPrompt, "prompt", "p", "", "Prompt to use for the Otto API")
228228
docsCmd.Flags().StringVarP(&outputFile, "output", "o", "", "Path to the output file. For use with --markdown")
229229
docsCmd.Flags().StringVarP(&ignoreFilePath, "ignore", "n", "", "path to .gptignore file")
230230
docsCmd.Flags().BoolVarP(&markdownMode, "markdown", "m", false, "Output in Markdown format")

cmd/issue.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ import (
2525
// issueCmd represents the issue command
2626
var issueCmd = &cobra.Command{
2727
Use: "issue",
28-
Short: "Get a prompt for or ask ChatGPT about a GitHub Issue.",
29-
Long: `Get a prompt for or ask ChatGPT about a GitHub Issue. Uses the current working directory's repo by default.`,
28+
Short: "Get a prompt for or ask Otto about a GitHub Issue.",
29+
Long: `Get a prompt for or ask Otto about a GitHub Issue. Uses the current working directory's repo by default.`,
3030
Aliases: []string{"i"},
3131
PreRun: func(cmd *cobra.Command, args []string) {
3232
if verbose {
@@ -224,15 +224,15 @@ var issueCmd = &cobra.Command{
224224
os.Exit(0)
225225
}
226226

227-
log.Debug("Asking ChatGPT...")
228-
// ask ChatGPT
227+
log.Debug("Asking Otto...")
228+
// ask Otto
229229
stream, err := ai.SimpleStreamRequest(prompt, c)
230230
if err != nil {
231231
log.Errorf("Error getting response: %s", err)
232232
os.Exit(1)
233233
}
234234

235-
fmt.Print("ChatGPT: ")
235+
fmt.Print("Otto: ")
236236
_, err = utils.PrintChatCompletionStream(stream)
237237
if err != nil {
238238
log.Errorf("Error printing response: %s", err)
@@ -245,9 +245,9 @@ func init() {
245245
RootCmd.AddCommand(issueCmd)
246246

247247
issueCmd.Flags().IntVarP(&issuePRNumber, "number", "n", 0, "the number of the issue to get")
248-
issueCmd.Flags().StringVarP(&question, "question", "q", "", "the question to ask ChatGPT")
248+
issueCmd.Flags().StringVarP(&question, "question", "q", "", "the question to ask Otto")
249249
issueCmd.Flags().BoolVarP(&useComments, "comments", "c", false, "use comments instead of git repo for context")
250-
issueCmd.Flags().BoolVarP(&promptOnly, "prompt-only", "p", false, "only generate a prompt, don't ask ChatGPT")
250+
issueCmd.Flags().BoolVarP(&promptOnly, "prompt-only", "p", false, "only generate a prompt, don't ask Otto")
251251
issueCmd.Flags().BoolVarP(&verbose, "verbose", "v", false, "verbose output")
252252
issueCmd.Flags().BoolVar(&countFinalTokens, "count", false, "count the number of tokens")
253253
}

cmd/pr.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ Requires Git to be installed on the system. If a title is not provided, one will
136136
log.Errorf("Error getting file diff: %s", err)
137137
continue
138138
}
139-
// compress the diff with ChatGPT
139+
// compress the diff with Otto
140140
compressedDiff, err := ai.CompressDiff(fileDiff, c)
141141
if err != nil {
142142
log.Errorf("Error compressing diff: %s", err)

cmd/prompt.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ import (
1616
// promptCmd represents the prompt command
1717
var promptCmd = &cobra.Command{
1818
Use: "prompt",
19-
Short: "Generates a ChatGPT prompt from a given Git repo",
20-
Long: `Generates a ChatGPT prompt from a given Git repo. Specify the path to the repo as the first positional argument.`,
19+
Short: "Generates a Otto prompt from a given Git repo",
20+
Long: `Generates a Otto prompt from a given Git repo. Specify the path to the repo as the first positional argument.`,
2121
Run: func(cmd *cobra.Command, args []string) {
2222
var repoPath string
2323
if len(args) > 0 {

pkg/ai/single_file.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func extractLineNumber(line string) (int, error) {
3131
return lineNumber, nil
3232
}
3333

34-
// Document a file using the OpenAI ChatGPT API. Takes a file path, a prompt, and an API key as arguments.
34+
// Document a file using the OpenAI Otto API. Takes a file path, a prompt, and an API key as arguments.
3535
func SingleFile(filePath, contents, chatPrompt string, conf *config.Config) (string, error) {
3636

3737
fileEnding := filepath.Ext(filePath)

pkg/utils/print_ai_stream.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func PrintChatCompletionStream(stream *openai.ChatCompletionStream) (string, err
2626
fmt.Print(msg.Choices[0].Delta.Content)
2727
completeStream += msg.Choices[0].Delta.Content
2828
} else {
29-
return "", errors.New("received multiple choices from ChatGPT")
29+
return "", errors.New("received multiple choices from Otto")
3030
}
3131
}
3232
}

0 commit comments

Comments
 (0)