Skip to content

Farizov/Gpt-Clinet

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gpt-Client

Author

👤 Anybodyy

Thanks to the @xtekky. I was inspired by his project(gpt4free)

Description

This is a powerful script to communicate with big text AI models like gpt4 or OpenChat for free

Installing

You can load this lib using pip:

pip install Gpt-Client

Docs

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

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%