From f6ef3cb2237d8c336e915ef77ddbe6f37934c4fd Mon Sep 17 00:00:00 2001 From: MIDORIBIN Date: Fri, 28 Jul 2023 19:07:17 +0900 Subject: refactor: refactor provider --- testing/test_chat_completion.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 testing/test_chat_completion.py (limited to 'testing/test_chat_completion.py') diff --git a/testing/test_chat_completion.py b/testing/test_chat_completion.py new file mode 100644 index 00000000..cc705f07 --- /dev/null +++ b/testing/test_chat_completion.py @@ -0,0 +1,17 @@ +import sys +from pathlib import Path + +sys.path.append(str(Path(__file__).parent.parent)) + +import g4f + +stream = False +response = g4f.ChatCompletion.create( + model="gpt-3.5-turbo", + provider=g4f.provider.Ails, + messages=[{"role": "user", "content": "hello"}], + stream=stream, + active_server=5, +) + +print(response) -- cgit v1.2.3 From a2496e3e4aa1fa00f2e6cf21e0592f53b36cab1e Mon Sep 17 00:00:00 2001 From: abc <98614666+xtekky@users.noreply.github.com> Date: Thu, 17 Aug 2023 15:02:19 +0200 Subject: ~ --- testing/test_chat_completion.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'testing/test_chat_completion.py') diff --git a/testing/test_chat_completion.py b/testing/test_chat_completion.py index cc705f07..d408d9ec 100644 --- a/testing/test_chat_completion.py +++ b/testing/test_chat_completion.py @@ -14,4 +14,4 @@ response = g4f.ChatCompletion.create( active_server=5, ) -print(response) +print(response) \ No newline at end of file -- cgit v1.2.3