Skip to content

Latest commit

 

History

History
52 lines (34 loc) · 1.27 KB

README.md

File metadata and controls

52 lines (34 loc) · 1.27 KB

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].