Skip to main content

A Python package that provides free access to GPT3, GPT4, and more models.

Project description

PyPI version Downloads

freeGPT

A Python package that gives access to GPT3 & GPT4 models for free.
Get started by doing: pip install freeGPT

Examples

GPT-3

from freeGPT import gpt3

chat = []

def send_prompt():
    try:
        prompt = input("> ")
        response = gpt3.Completion.create(prompt=prompt, chat=chat)
        print("Response:", response.text)
        chat.append({"question": prompt, "answer": response.text})
    except Exception as e:
        print("Error:", str(e))

while True:
    send_prompt()

GPT-4

from freeGPT import gpt4

token = gpt4.Account.create(logging=True)
print("Token:", token) 

def send_prompt():
    try:
        prompt = input("> ")
        for response in gpt4.StreamingCompletion.create(token=token, prompt=prompt, model="gpt-4"):
            print("Response:", response.text, end="")
    except Exception as e:
        print("Error:", str(e))

while True:
    send_prompt()

Source

Models Websites
GPT-3 you.com
GPT-4 forefront.ai

Conclusion

TODO-List:

  • Add GPT-4
  • Make the library well-documented
  • Make the over-all library easier to use
  • Make the over-all library easier to understand

Star History

Star History Chart

Original by xtekky, currently maintained by Ruu3f.

Completing the TODO-List when this repository hits 30 stars.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

freeGPT-1.0.0.0.tar.gz (18.8 kB view hashes)

Uploaded Source

Built Distribution

freeGPT-1.0.0.0-py3-none-any.whl (19.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page