blob: 727b92ac9fca3f3385a2dc8a40b5e34efde437fe (
plain) (
tree)
|
|
import g4f
# Set with provider
stream = False
response = g4f.ChatCompletion.create(model='gpt-3.5-turbo', provider=g4f.Provider.ChatgptLogin, messages=[
{"role": "user", "content": "hello"}], stream=stream)
if stream:
for message in response:
print(message)
else:
print(response)
|