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