aandrew-me / tgpt

AI Chatbots in terminal without needing API keys

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

panic: runtime error

liata1975 opened this issue · comments

panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
main.getData({0x14000190000, 0xb}, {0xb?, 0x104926dea?}, 0x0)
/home/runner/work/tgpt/tgpt/functions.go:99 +0x13bc
main.main()
/home/runner/work/tgpt/tgpt/main.go:208 +0x1434

my input was
echo "What is 42?" | tgpt

similar error when using interactive mode

tgpt -i
Interactive mode started. Press Ctrl + C or type exit to quit.
╭─ You
╰─> test
panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
main.getData({0x140000a4027, 0x4}, {0x1?, 0x1049a2dea?}, 0x1)
/home/runner/work/tgpt/tgpt/functions.go:99 +0x13bc
main.main()
/home/runner/work/tgpt/tgpt/main.go:142 +0x169c

Yeah looks like it was an error related to cookies and there was a pull request too. Should be fine from next update

Even I am getting same error , It just responds index[0] in output of string query.