👤 Anybodyy
- Github: @Anybodyy
- Telegram: @User_With_Username
Thanks to the @xtekky. I was inspired by his project(gpt4free)
This is a powerful script to communicate with big text AI models like gpt4 or OpenChat for free
You can load this lib using pip:
pip install Gpt-Client
To communicate with AI, you can use this code:
import asyncio
from Gpt_Client import Completion
async def main() -> str:
async for chunk in Completion.create(
model="gpt-4-0613", # model
temperature=0.7, # temperature
system_prompt="You're ChatGpt, big trained AI.", # system prompt
messages=[{"role": "user", "content": "hello"}] # messages
):
print(chunk, flush=True, end='')
asyncio.run(main())
More examples in tests
dir
This project is licensed under the MIT License.