AsyncGPT is an open-source unofficial asynchronous framework for ChatGPT API written in Python 3.11 using asyncio and aiohttp
pip install git+https://github.com/Just1z/asyncgpt
The simplest usage for now:
import asyncio
import asyncgpt
async def main():
bot = asyncgpt.GPT(apikey="YOUR API KEY")
completion = await bot.chat_complete([{"role": "user", "content": "Hello!"}])
print(completion)
if __name__ == "__main__":
asyncio.run(main())
# Hello there! How can I assist you today?
You should get one on the official OpenAI site