ChatGPT icon indicating copy to clipboard operation
ChatGPT copied to clipboard

> Most basic example (I don't know async):

Open zjrwtx opened this issue 2 years ago • 1 comments

          > Most basic example (I don't know async):
from revChatGPT.Official import AsyncChatbot
import asyncio

async def main():
    bot = AsyncChatbot(api_key="sk-...")
    return await bot.ask("Hello World")

if __name__ == "__main__":
    print(asyncio.run(main()))

your origin code has error:loof is running,after i ask chatgpt,it gives me these code,but it seems that no respond,please help me image

Originally posted by @zjrwtx in https://github.com/acheong08/ChatGPT/issues/558#issuecomment-1417966843

zjrwtx avatar Feb 05 '23 14:02 zjrwtx

from revChatGPT.Official import Chatbot

bot = Chatbot(apikey)
r = bot.ask("How are you today?")
r

1beb avatar Feb 06 '23 05:02 1beb