Giter VIP home page Giter VIP logo

Comments (11)

SethDusek avatar SethDusek commented on May 14, 2024

You should take a look at the twisted framework

from chatterbot.

bloodywing avatar bloodywing commented on May 14, 2024

There are a lot for python, I can try to write one. I already did some irc stuff in the past with python. But never really used twisted for this. Only circuits so far, which is async as well. The most straight forward way would be to use socket. http://wiki.shellium.org/w/Writing_an_IRC_bot_in_Python Without adding the twisted dependency or one for any other library. Keep in mind that the bot needs it's own loop.

from chatterbot.

gunthercox avatar gunthercox commented on May 14, 2024

I would be more than happy to accept a pull request if this can be accomplished. I have had people ask me about this before which is why I created the ticket. Again, I don't know a ton about IRC so I can't offer much help if you want to look into this.

One idea which might help is that I have been considering designing an adapter for email communication. The structure is set up so that there is a background thread that periodically checks for a new message. If it finds one, it saves it in a queue until a get_latest_message method is called. I'm wondering if a similar structure would work in this case?

from chatterbot.

bloodywing avatar bloodywing commented on May 14, 2024

I doubt that. IRC has a constant stream which you buffer periodically. I doubt your email adapter works like that. (If I understand the irc protocol correctly)

from chatterbot.

LucasZielke avatar LucasZielke commented on May 14, 2024

What I have researched of IRC is that it requires you to "Pong its Pings", which could really be a problem if you start to get more and more information in your database (because of processing time), so you would have to have it ping ponging and trying to find a proper response for the message in a different thread or vice versa

Working on it, and will a little tomorrow

from chatterbot.

bloodywing avatar bloodywing commented on May 14, 2024

In IRC your database can get easily > 1.3MB which gave me a processing time of more than 20 Minutes for a single response, even with MongoDB.

from chatterbot.

LucasZielke avatar LucasZielke commented on May 14, 2024

@bloodywing do you mean a tails file for the IRC? I am referring to accessing the MongoDB that holds all of the i/o for the chatbot itself

from chatterbot.

bloodywing avatar bloodywing commented on May 14, 2024

@LucasZielke Nope, I mean the json file handler but thats a problem with chatterbot itself when. What you want to do with the bot is idling in the irc and following conversations and respond when the boot sees a specific keyword (like the botname or !botrespond) I already did something similar with the bot on a simple website with message system and an API and parsed the conversation. But should the bot save all lines in irc? And use them to respond? This is what I mean, if you save everything in irc you DB would get huge.

from chatterbot.

LucasZielke avatar LucasZielke commented on May 14, 2024

@bloodywing Haha if it saved all of the convo from the irc channel youd make one cruel bot

Would the best way to implement the response while ping ponging be to multi thread the ping ponging and in the foreground be looking for the proper response?

from chatterbot.

Melanpan avatar Melanpan commented on May 14, 2024

Would the best way to implement the response while ping ponging be to multi thread the ping ponging and in the foreground be looking for the proper response?

This is how I do it in my IRC bot that is based on async. My bot is modular and threaded and It replies to the ping/pongs when needed, then feeds for example what is being said in a channel to any plugin that needs it (or only when there is a certain trigger).

from chatterbot.

lock avatar lock commented on May 14, 2024

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

from chatterbot.

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.