diff options
author | abc <98614666+xtekky@users.noreply.github.com> | 2023-07-16 20:27:01 +0200 |
---|---|---|
committer | abc <98614666+xtekky@users.noreply.github.com> | 2023-07-16 20:27:01 +0200 |
commit | 76c7be3172f880932926a59e704e14a5f1f15067 (patch) | |
tree | 2b996520ea4c7b636644cd8433fc4dcef1ed4712 /testing/test.py | |
parent | Merge pull request #743 from bagusindrayana/refactor-provider (diff) | |
download | gpt4free-76c7be3172f880932926a59e704e14a5f1f15067.tar gpt4free-76c7be3172f880932926a59e704e14a5f1f15067.tar.gz gpt4free-76c7be3172f880932926a59e704e14a5f1f15067.tar.bz2 gpt4free-76c7be3172f880932926a59e704e14a5f1f15067.tar.lz gpt4free-76c7be3172f880932926a59e704e14a5f1f15067.tar.xz gpt4free-76c7be3172f880932926a59e704e14a5f1f15067.tar.zst gpt4free-76c7be3172f880932926a59e704e14a5f1f15067.zip |
Diffstat (limited to '')
-rw-r--r-- | testing/test.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/testing/test.py b/testing/test.py new file mode 100644 index 00000000..727b92ac --- /dev/null +++ b/testing/test.py @@ -0,0 +1,13 @@ +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) + |