Created
November 3, 2023 19:48
-
-
Save catvinyl/dd3e11952d0fb5f90fbf37b09596f1c0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# License: CC0 1.0 Universal (CC0 1.0) / Public domain (PD) | |
import g4f | |
import sys | |
content = sys.argv | |
content.pop(0) | |
content = ' '.join(content) | |
response = g4f.ChatCompletion.create( | |
model="gpt-3.5-turbo", | |
messages=[{"role": "user", "content": content}] | |
) | |
print(response) | |
# usage: python g4f.py Hello, who are you? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment