diff options
Diffstat (limited to 'testing/test.py')
-rw-r--r-- | testing/test.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/testing/test.py b/testing/test.py new file mode 100644 index 00000000..ebb2b16d --- /dev/null +++ b/testing/test.py @@ -0,0 +1,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)
\ No newline at end of file |