Skip to content

Commit

Permalink
Renamed chat -> gogpt
Browse files Browse the repository at this point in the history
  • Loading branch information
Nemoden committed Mar 2, 2023
1 parent 35abfeb commit 175c38f
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion chat/main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package chat

import (
"github.com/nemoden/chat/config"
"github.com/nemoden/gogpt/config"
gogpt "github.com/sashabaranov/go-gpt3"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"strings"

"github.com/AlecAivazis/survey/v2"
"github.com/nemoden/chat/config"
"github.com/nemoden/gogpt/config"
"github.com/spf13/cobra"
"gopkg.in/yaml.v2"
)
Expand Down
8 changes: 4 additions & 4 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ import (

"os"

"github.com/nemoden/chat/chat"
"github.com/nemoden/chat/config"
"github.com/nemoden/chat/util"
"github.com/nemoden/gogpt/chat"
"github.com/nemoden/gogpt/config"
"github.com/nemoden/gogpt/util"

"github.com/spf13/cobra"
)

// rootCmd represents the base command when called without any subcommands
var rootCmd = &cobra.Command{
Use: "chat",
Use: "gogpt",
Short: "ChatGPT CLI and REPL",
Long: `Use ChatGPT not leaving your terminal`,
FParseErrWhitelist: cobra.FParseErrWhitelist{
Expand Down
16 changes: 8 additions & 8 deletions config/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"runtime"
"strings"

"github.com/nemoden/chat/renderer"
"github.com/nemoden/gogpt/renderer"
gogpt "github.com/sashabaranov/go-gpt3"
"gopkg.in/yaml.v2"
)
Expand All @@ -18,9 +18,9 @@ var (
ConfigDir string = getConfigDir()
CacheDir string = getCacheDir()
ApiKeyFilePath string = getApiKeyFilePath()
InitPrompt string = `Please initialise chat using the config command:
InitPrompt string = `Please initialise GoGPT using the config command:
$ chat config
$ gogpt config
`
// @TODO revisit instructions
TokenFileDoesntExistPrompt string = fmt.Sprintf(`Oops. Looks like your token file %s doesn't exist.
Expand All @@ -31,9 +31,9 @@ Once you have the API key, you can either add it manually to %s:
$ echo "<your-api-key>" > %s
Or, if you didn't run chat config, it's adviced that you do this instead:
Or, if you didn't run gogpt config, it's adviced that you do this instead:
$ chat config
$ gogpt config
Alternatively, you can provide a token using environment variable %s. How to set it depends on your shell, i.e.
Expand All @@ -44,7 +44,7 @@ Alternatively, you can provide a token using environment variable %s. How to set

TokenFileNotReadablePrompt string = fmt.Sprintf(`Oops. Looks like your token file %s is not readable.
chat stores the api token in that file.
GoGPT stores the api token in that file.
Another option is to store the API key in the environment variable. How to set it depends on your shell, i.e.
Expand All @@ -60,8 +60,8 @@ var (
)

const (
APP_NAME = "chat"
API_KEY_ENV_VAR_NAME = "CHAT_GPT_API_TOKEN"
APP_NAME = "gogpt"
API_KEY_ENV_VAR_NAME = "GOGPT_API_TOKEN"
)

type ApiKeySource int
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/nemoden/chat
module github.com/nemoden/gogpt

go 1.19

Expand Down
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
"os"
"strings"

"github.com/nemoden/chat/chat"
"github.com/nemoden/chat/cmd"
"github.com/nemoden/chat/config"
"github.com/nemoden/chat/util"
"github.com/nemoden/gogpt/chat"
"github.com/nemoden/gogpt/cmd"
"github.com/nemoden/gogpt/config"
"github.com/nemoden/gogpt/util"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion util/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"os"

"github.com/nemoden/chat/config"
"github.com/nemoden/gogpt/config"
)

func Hangup(err error) {
Expand Down

0 comments on commit 175c38f

Please sign in to comment.