Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GUI for my bot (Not a feature request I was just unsure where to ask) #303

Open
rsanche4 opened this issue Jan 20, 2022 · 1 comment
Open

Comments

@rsanche4
Copy link

Hey! I think this is a great program, and I am enjoying it. I wanted to ask, what if I wanted to create a GUI for my bot? When I was running the python-aiml library, (another different library from your own, that one only mimics AIML 1.0) I was able to simply import the module, load aiml using 1 line of code, and I would send an input() to the kernel function, in which case it would send a string back with the reply from the bot. This made it really easy to manipulate that string and easily convert it to a nice application with tkinter, all in one main bot.py that I created.

How could I accomplish this with programy? I can see I can edit the brains of the bot, and it reads AIML 2.0 and all, which is AWESOME, and it functions with many other scripts I dare NOT touch, but I have only been able to run the y-bot.cmd from the command line and it magically loads up the bot. It's great, but how could I control what gets sent to the bot and what the bot replies?

If this helps, this is more or less of what I would like to do:

import something-perhaps?
m=input("send something to the bot?")

reply = bot.send(m)

then reply has that respone from the bot, and I can use reply and do whatever I want with it. In this script if I want to combine it with tkinter for a small chatbot application, I can do that as well.

Again, this is NOT a feature I want you to implement. Not at all. This is for me. I will like to see how I can manipulate in a python script what gets sent to the bot and what the bot sends back.

A million thanks for this!! And I love your work, keep it up!

@rsanche4
Copy link
Author

rsanche4 commented Jan 20, 2022

I forgot to add, by "control what the bot replies" I do not mean the AIML files. I know those files, and I know AIML. I am talking about once the bot has replied already, I want to store that in some sort of variable, and edit it, inside a python script.

I am assuming I could import os and perhaps use os.system() and maybe send a command to the cmd to send something to the bot and perhaps see what I get back, and somehow manipulate it that way, but that seems really weird. I more or less want what I already explained above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant