opensistemas-hub / osbrain

osBrain - A general-purpose multi-agent system module written in Python
https://osbrain.readthedocs.io/en/stable/
Apache License 2.0
175 stars 43 forks source link

Doubts for using other external modules on Agents #352

Closed tfspire closed 4 years ago

tfspire commented 4 years ago

Hi,

I'm a beginner on python so I have some doubts how should I use osbrain.

I want for example to have an agent that the only thing that he do is to be waiting for messages from a specific telegram channel using the Telethon module.

I know that I can set up new classes and passing them to the agents, but how can I pass the imports? Because I would need to import on the agents the Telethon module in order to use it.

Or do I need to modify the agent.py to work for my use case?

Thanks

Peque commented 4 years ago

Hi,

I would suggest you to carefully read through the osBrain documentation to understand how to work with it. Read at least the first 5 sections (from "About osBrain" until "Timers").

You do not need to modify agent.py to use external modules on agents.

For your use case:

Good luck with your project! :blush:

tfspire commented 4 years ago

Hi,

Thank you so much for your reply. I will read better because I checked before and didn't find how to use the external modules.

Regarding telegram, I already using telethon module that generates events when a new message is received, so I will just adapt the stuff that I already have to use with osbrain (it looks awesome!! )

Regard :)