Closed damntourists closed 1 year ago
Hmm, I'm not sure off the top of my head nor can I reproduce it. Gotta love the hubris of "Impossible" though.
It looks like somehow the initial telegram.sendMessage()
is succeeding (else it would throw an error before reaching your error) but the response body.id
is somehow undefined.
Fwiw, this code works by creating an initial prevId = telegram.sendMessage().then(m => m.id)
message and then repeatedly using prevId
to edit it as new tokens stream in from OpenAI's API.
I would wonder what the msg
looks like in that code.
Maybe change this:
to this:
const body = await telegram
.sendMessage(chatId, prefix + cursor, initMessageId)
console.log('sent telegram message.response body:', body)
prevId = body.message_id
Might show what's going on.
Sorry, I wish I had this issue so I could make it more robust, myself. My bot annoyingly is humming along just fine.
Hey there, I wanted to let you know that I finally figured out what was wrong. My account had run out of credits, so I was no longer able to use the API key. It wasn't immediately obvious until I tried reusing the same key in a different app. I think we can close this!
Hi there!
I forked your repository the other week and have set up a couple of telegram bots running on kubernetes but noticed a couple of days ago that none of the bots can respond anymore due to the following error
I can take a stab at finding a fix for this unless you know of something off of the top of your head that will get them back up and running?