fix: blocking loading when input api key

This commit is contained in:
asrul10
2023-03-12 06:27:03 +07:00
parent a5459d9f14
commit dce4360043

View File

@@ -98,6 +98,7 @@ func main() {
return return
} }
gpt3.InitKey()
s := time.Now() s := time.Now()
done := make(chan bool) done := make(chan bool)
go func() { go func() {
@@ -116,7 +117,6 @@ func main() {
} }
}() }()
gpt3.InitKey()
r := gpt3.Completions(cmd) r := gpt3.Completions(cmd)
done <- true done <- true
if r == "" { if r == "" {