theAbdoSabbagh / UnlimitedGPT

An unofficial Python wrapper for OpenAI's ChatGPT API
https://pypi.org/project/UnlimitedGPT/
GNU General Public License v3.0
346 stars 43 forks source link

Add GPT-4, Attachments, and Fix WSL response retrival #46

Closed chavinlo closed 1 month ago

chavinlo commented 10 months ago

New Features:

Fixes:

chavinlo commented 10 months ago

Quick example of how to use attachments with GPT-4 Vision:

from UnlimitedGPT import ChatGPT

session_token = "token_goes_here"

api = ChatGPT(
    session_token=session_token,
    clipboard_retrival=False, # WSL
    model=2 # GPT-4
)

x = api.send_message(
    message="Describe this image.",
    attachment="/home/ubuntu/UnlimitedGPT/snailchan.jpg",
    input_mode="SLOW"
)

print(x.response)

snailchan.jpg : image

The image displays a vibrant and whimsical illustration of an animated character with predominantly pink and purple hues. The character has a playful appearance, featuring large, round eyes, one of which has a heart-shaped highlight, and vibrant purple hair with two ponytails. She's wearing what seems to be a pink outfit with heart motifs and rainbow patterns. The background is a dreamy blend of pastel colors with floating hearts, bubbles, and stars. On the left side, the word "-PIXELIZE-" is written in a stylized font. The overall mood of the image is cheerful and magical.