blob: ebb2b16dfd448a7b37344315145860876e159280 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
|
import g4f
# Set with provider
stream = False
response = g4f.ChatCompletion.create(model='gpt-3.5-turbo', provider=g4f.Provider.Yqcloud, messages=[
{"role": "user", "content": "hello"}], stream=stream)
if stream:
for message in response:
print(message)
else:
print(response)
|