Skip to content

Whatsapp Framework simplifies development and deploying whatsapp based conversation agents.

License

Notifications You must be signed in to change notification settings

raven-consult/whatsapp-framework

Repository files navigation

Whatsapp Framework

Whatsapp Framework helps you quickly build and deploy whatsapp chatbots in python.

Get started

pip install whatsapp-framework

Example Usage

Here's a basic example of how to use Whatsapp Framework:

from datetime import datetime
from whatsapp import Conversation, instruction


class TimeCheckerBot(Conversation):
    token = "<whatsapp_admin_token>"
    whatsapp_number = "<whatsapp_number>"

    system_message = (
        "You are helpful conversation assistant for casual chat."
    )

    @instruction
    def check_time(self):
        current_time = datetime.now().strftime('%H:%M:%S')
        return f"The current time is {current_time}"

def main():
    chat_handler = RestaurantAttendantConversation(
        debug=True, start_proxy=True,
        gemini_model_name="models/gemini-1.5-flash",
    )
    chat_handler.start(5000)


if __name__ == "__main__":
    main()

License

Whatsapp Framework is licensed under the MIT License. See the LICENSE file for details.

Contact

If you have any questions or need support, please open an issue on GitHub Issues or contact us at [email protected].

About

Whatsapp Framework simplifies development and deploying whatsapp based conversation agents.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages