This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

eggdrop connect with chatgpt

Help for those learning Tcl or writing their own scripts.
Post Reply
B
Baslerstab
Voice
Posts: 6
Joined: Mon Jan 29, 2024 4:06 pm

eggdrop connect with chatgpt

Post by Baslerstab »

hi

I'm trying to connect the eggdrop with api requests to chat-gpt or other services where possible and give answers when someone types !ask <blabla>. The answer should come back as a private message because the answers would be too large for public channels.
i've got keys. anyone would help me?

sorry for my bad english, i'm swissgerman.

thx
Nicci
User avatar
CrazyCat
Revered One
Posts: 1374
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Re: eggdrop connect with chatgpt

Post by CrazyCat »

I'll pass.
"chatgpt" is the best way to make me blind ;)
User avatar
MeinVali
Voice
Posts: 1
Joined: Tue Jan 30, 2024 1:33 am

Re: eggdrop connect with chatgpt

Post by MeinVali »

Hi Nicci,

No need to apologize for your English – it's perfectly fine! Connecting Eggdrop with ChatGPT through API requests sounds like an interesting project. To assist you, I'll need a bit more information:

ChatGPT API:

Do you have access to the ChatGPT API, and have you obtained the necessary API key?

Programming Language:
In which programming language are you planning to implement the connection? Common choices include Python, JavaScript, or TCL (since Eggdrop is TCL-scriptable).

Example Code:
If you've already written some code, could you share the snippet you're working on? This will help me understand your approach better.

Once you provide more details, I'll be happy to guide you further or help with any specific challenges you might be facing.

Best regards
B
Baslerstab
Voice
Posts: 6
Joined: Mon Jan 29, 2024 4:06 pm

Re: eggdrop connect with chatgpt

Post by Baslerstab »

sent you an pm. with some examples of code .-.-
check out!!
B
Baslerstab
Voice
Posts: 6
Joined: Mon Jan 29, 2024 4:06 pm

Re: eggdrop connect with chatgpt

Post by Baslerstab »

haha, steal my code.
-.- thx
U
Urores
Voice
Posts: 5
Joined: Mon Aug 12, 2024 7:32 pm

Re: eggdrop connect with chatgpt

Post by Urores »

I played with this a bit using Eggdrop + Tcl. The simplest way is to trigger on !ask, grab the text, then call the API using exec curl or http::geturl from Tcl. When the response comes back, just parse the JSON and send it with putserv "PRIVMSG $nick :$reply" so it stays private. Keep answers short or split them, since long messages can get cut.

Also watch rate limits and errors, or your bot will feel “dead” sometimes. Log failures so you know what’s happening behind the scenes.

In the world of IRC bots, keeping things simple is usually best. Once it works reliably, you can always expand features later.
Post Reply