blob: 0a14417aa82c10b0551ca27698ac6949a50d5f18 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
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)
|