-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
42 lines (32 loc) · 1.03 KB
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package main
import (
"fmt"
"github.com/fatih/color"
"github.com/joho/godotenv"
"go_openai_cli/pkgs/cmd"
"go_openai_cli/pkgs/config"
"go_openai_cli/pkgs/openai"
)
func main() {
for {
cmd.TalkToAi()
}
}
func init() {
// Set default data path based on user's home directory
// Load the .env file from the configuration path
config.SetConfig()
godotenv.Load()
openai.Init()
color.Set(color.FgHiCyan)
fmt.Println(`
╔════════════════════════════════════════════════════╗
║ Welcome to the Go Openai Client! ║
║ a client tool made by Dill-Dall ║
║ ║
║ https://github.com/Dill-Dall/go-openai-cli ║
╚════════════════════════════════════════════════════╝`)
fmt.Println()
color.Unset()
cmd.PrintHelpMessage()
}