Coder Social home page Coder Social logo

Comments (8)

pedrojlazevedo avatar pedrojlazevedo commented on August 29, 2024 2

I'm currently working on a solution.

Can be more complex, but I'm creating a specific twitch bot to actually reply instead of nightbot.

Twitch has the answer limit on 399 characters.
Nightbot has a timeout of 10sec. Sometimes OpenAI endpoint takes longer to answer.

I will let you know as soon as I push the changes to main :)

from twitch-chatgpt.

proximasix avatar proximasix commented on August 29, 2024 2

I'm currently working on a solution.

Can be more complex, but I'm creating a specific twitch bot to actually reply instead of nightbot.

Twitch has the answer limit on 399 characters. Nightbot has a timeout of 10sec. Sometimes OpenAI endpoint takes longer to answer.

I will let you know as soon as I push the changes to main :)

In case this information is useful: if you change GPT_MODE to PROMPT, then this error does not appear and the bot gives quick answers to EVERY request. However, the bot itself, due to a different model (davinci), seems less “smart”, responds rather primitively and does not take on the “character” from file_context.txt so well. With all this, it becomes significantly more expensive, so this is a rather dubious compromise.

from twitch-chatgpt.

yaorenmao avatar yaorenmao commented on August 29, 2024 1

Where do you put this?
in index.js
and you need to fetch it in your bot like continue command(nightbot example):
!gptcontinue
$(urlfetch https://your-url.cyclic.cloud/repeat)

from twitch-chatgpt.

takimate avatar takimate commented on August 29, 2024

I write this in my file context: "Important you can only respond with 380 or less characters!". I rarely get this error after I added this.

from twitch-chatgpt.

Meredith2k5 avatar Meredith2k5 commented on August 29, 2024

Similar issue, the errors less prominent if you include the above character limit but if you ask the chatbot to write a poem, song, story etc it hits the character limit almost every time. If you include 'less than 380 characters' in the Twitch chat prompt it will work however. Anyone figured a way around this?

from twitch-chatgpt.

yaorenmao avatar yaorenmao commented on August 29, 2024

That's how i solved it:
`
let mao_res = "wait ~25sec > !gptr"
//save response:
mao_res = sliced_agent_response
res.send(sliced_agent_response)

//repeat response:
app.all('/repeat/', (req, res) => {
res.send(mao_res)
})
`

have to type !gptr if error connecting to server

from twitch-chatgpt.

takimate avatar takimate commented on August 29, 2024

That's how i solved it: ` let mao_res = "wait ~25sec > !gptr" //save response: mao_res = sliced_agent_response res.send(sliced_agent_response)

//repeat response: app.all('/repeat/', (req, res) => { res.send(mao_res) }) `

have to type !gptr if error connecting to server

Where do you put this?

from twitch-chatgpt.

Meredith2k5 avatar Meredith2k5 commented on August 29, 2024

Where do you put this?
in index.js
and you need to fetch it in your bot like continue command(nightbot example):
!gptcontinue
$(urlfetch https://your-url.cyclic.cloud/repeat)

Hmm I had no luck with this, I did take a look at your .index.js but couldn't figure it out. Im still learning to code so I may have put it in the wrong location however.

Ive noticed that !continue works even if the bot times out, would it be possible to save the first message as a variable, then recall that variable in the $(urlfetch https://your-url.cyclic.app/variable)? That way it functions as normal but if you do get this error you can simply !recall or whatever you name the command in streamelements/nightbot.

Maybe thats what yaorenmao intended, im not sure how it works so only throwing ideas out there. Ive seen another implementation of Chat GPT on twitch that seems to do this though.

Also is there a way to get this to work with streamerbot? Ill probably do some digging at some point in how to implement apis and url answers in streamerbot at some point, most of the documentation are for the older version though unfortunately.

from twitch-chatgpt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.