Closed mepwang closed 1 year ago
i cant see white spaces or empty lines with my eyes in token.txt, but strings.TrimSpace works.
i cant see white spaces or empty lines with my eyes in token.txt, but strings.TrimSpace works.
Cool maybe will add it soon. PR is welcome :)
Fixed in v0.5.1, thanks.
OS: ubuntu 20.04 go: go version go1.20.2 linux/amd64 running command: ./cgp token.txt and topic.txt is ready and in current directory build command: go build ./cmd/cgp version: HEAD
panic: start preparing ... panic: Post "https://api.openai.com/v1/chat/completions": net/http: invalid header field value for "Authorization"
goroutine 1 [running]: main.panicIfErr(...) /home/mep/ppt/chat-gpt-ppt/cmd/cgp/main.go:59 main.main.func1(0xc0000be000?) /home/mep/ppt/chat-gpt-ppt/cmd/cgp/main.go:47 +0xd5 github.com/abiosoft/ishell/v2.(Shell).handleCommand(0xc0000be000, {0xc000014e80, 0x1, 0x1}) /home/mep/go/pkg/mod/github.com/abiosoft/ishell/v2@v2.0.2/ishell.go:279 +0x226 github.com/abiosoft/ishell/v2.handleInput(0xc0000be000, {0xc000014e80, 0x1, 0x1}) /home/mep/go/pkg/mod/github.com/abiosoft/ishell/v2@v2.0.2/ishell.go:233 +0x31 github.com/abiosoft/ishell/v2.(Shell).Process(...) /home/mep/go/pkg/mod/github.com/abiosoft/ishell/v2@v2.0.2/ishell.go:229 main.main() /home/mep/ppt/chat-gpt-ppt/cmd/cgp/main.go:53 +0x538