From 76c7be3172f880932926a59e704e14a5f1f15067 Mon Sep 17 00:00:00 2001 From: abc <98614666+xtekky@users.noreply.github.com> Date: Sun, 16 Jul 2023 19:27:01 +0100 Subject: minor fixes ails, chatgptai ... --- testing/test.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 testing/test.py (limited to 'testing') 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) + -- cgit v1.2.3