diff --git a/README.md b/README.md index edea6ac..4e071e5 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ bard () { } ``` -## [Developer Documentation](https://github.com/acheong08/Bard/blob/main/DOCUMENTATION.md) +### Implementation: ```python from os import environ from Bard import Chatbot @@ -54,9 +54,29 @@ Secure_1PSID = environ.get("BARD__Secure_1PSID") Secure_1PSIDTS = environ.get("BARD__Secure_1PSIDTS") chatbot = Chatbot(Secure_1PSID, Secure_1PSIDTS) -chatbot.ask("Hello, how are you?") +answer = chatbot.ask("Hello, how are you?") + +print(answer['content'] +``` + +### Async Implementation: +```python +import asyncio +from os import environ +from Bard import AsyncChatbot + +Secure_1PSID = environ.get("BARD__Secure_1PSID") +Secure_1PSIDTS = environ.get("BARD__Secure_1PSIDTS") + +async def main(): + chatbot = await AsyncChatbot.create(Secure_1PSID, Secure_1PSIDTS) + response = await chatbot.ask("Hello, how are you?") + print(response['content']) +asyncio.run(main()) ``` +## [Developer Documentation](https://github.com/acheong08/Bard/blob/main/DOCUMENTATION.md) + Credits: - [discordtehe](https://github.com/discordtehe) - Derivative of his original reverse engineering