Comments (8)
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.
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.
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.
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.
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.
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.
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.
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)
- maximum number HOT 3
- cyclic:prod Failure HOT 1
- Some way to get previous responses HOT 2
- Remote Server Returned Code 500
- Bot return HTML when "/" is in prompt HOT 2
- Remote Server Returned Code 500 HOT 6
- "Unable to get request" - Streamelements HOT 3
- Unable to get bot to respond only in English HOT 7
- New Idea: give the bot a chance to respond to a message without asking it. HOT 1
- Twitch Bot Connector HOT 4
- Idea: Make it possible to define user roles to react to
- TTS Improvements HOT 1
- [SUGGESTION] add bot cooldown and ability to use bot though channel points request HOT 6
- Respond to more than one activation command? For example 'chat' and 'Chat' HOT 4
- TTS set to false in Render however a request is still sent/charged to OpenAI HOT 2
- After writing a prompt, the bot will send 2 messages into the chat
- API error Remote Server Returned Code 500 HOT 2
- RequestError: Request path contains unescaped characters HOT 5
- not english characters HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from twitch-chatgpt.