From 25870e7523e4427b084aa82d5e08cfdc41807da1 Mon Sep 17 00:00:00 2001 From: Bagus Indrayana Date: Tue, 11 Jul 2023 22:40:29 +0800 Subject: add provider and helper --- testing/binghuan/testing.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 testing/binghuan/testing.py (limited to 'testing/binghuan/testing.py') diff --git a/testing/binghuan/testing.py b/testing/binghuan/testing.py new file mode 100644 index 00000000..e69de29b -- cgit v1.2.3 From 42a5bad4eaf27af4b46811ca11bb8aab0d076a76 Mon Sep 17 00:00:00 2001 From: Bagus Indrayana Date: Tue, 11 Jul 2023 22:40:42 +0800 Subject: add testing --- testing/binghuan/testing.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'testing/binghuan/testing.py') diff --git a/testing/binghuan/testing.py b/testing/binghuan/testing.py index e69de29b..e03c598d 100644 --- a/testing/binghuan/testing.py +++ b/testing/binghuan/testing.py @@ -0,0 +1,30 @@ +from BingHuan import ChatCompletion + +# Test 1 +response = ChatCompletion.create(model="gpt-3.5-turbo", + provider="Wewordle", + stream=False, + messages=[{'role': 'user', 'content': 'who are you?'}]) + +print(response) + +# Test 2 +response = ChatCompletion.create(model="gpt-3.5-turbo", + provider="Wewordle", + stream=False, + messages=[{'role': 'user', 'content': 'what you can do?'}]) + +print(response) + + +# Test 3 +response = ChatCompletion.create(model="gpt-3.5-turbo", + provider="Wewordle", + stream=False, + messages=[ + {'role': 'user', 'content': 'now your name is Bob'}, + {'role': 'assistant', 'content': 'Hello Im Bob, you asistant'}, + {'role': 'user', 'content': 'what your name again?'}, + ]) + +print(response) \ No newline at end of file -- cgit v1.2.3 From 9c5ead57b65ad8d236706fe1b1c7071f4440ab17 Mon Sep 17 00:00:00 2001 From: Bagus Indrayana Date: Tue, 11 Jul 2023 22:54:25 +0800 Subject: udate testing --- testing/binghuan/testing.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'testing/binghuan/testing.py') diff --git a/testing/binghuan/testing.py b/testing/binghuan/testing.py index e03c598d..d10b0e96 100644 --- a/testing/binghuan/testing.py +++ b/testing/binghuan/testing.py @@ -2,7 +2,7 @@ from BingHuan import ChatCompletion # Test 1 response = ChatCompletion.create(model="gpt-3.5-turbo", - provider="Wewordle", + provider="BingHuan", stream=False, messages=[{'role': 'user', 'content': 'who are you?'}]) @@ -10,7 +10,7 @@ print(response) # Test 2 response = ChatCompletion.create(model="gpt-3.5-turbo", - provider="Wewordle", + provider="BingHuan", stream=False, messages=[{'role': 'user', 'content': 'what you can do?'}]) @@ -18,8 +18,8 @@ print(response) # Test 3 -response = ChatCompletion.create(model="gpt-3.5-turbo", - provider="Wewordle", +response = ChatCompletion.create(model="gpt-4", + provider="BingHuan", stream=False, messages=[ {'role': 'user', 'content': 'now your name is Bob'}, -- cgit v1.2.3 From 659e2f4ff08b46bdcc2420b705eac47da683a3a4 Mon Sep 17 00:00:00 2001 From: Bagus Indrayana Date: Wed, 12 Jul 2023 01:13:24 +0800 Subject: emojin encoding problem idk how to fix it --- testing/binghuan/testing.py | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) (limited to 'testing/binghuan/testing.py') diff --git a/testing/binghuan/testing.py b/testing/binghuan/testing.py index d10b0e96..6c84cfae 100644 --- a/testing/binghuan/testing.py +++ b/testing/binghuan/testing.py @@ -1,12 +1,14 @@ from BingHuan import ChatCompletion +# text = "Hello, this is Bing. I can help you find information on the web, generate content such as poems, stories, code, essays, songs, celebrity parodies and more. I can also help you with rewriting, improving, or optimizing your content. Is there anything specific you would like me to help you with? 😊" +# print(text.encode('utf-8')) -# Test 1 -response = ChatCompletion.create(model="gpt-3.5-turbo", - provider="BingHuan", - stream=False, - messages=[{'role': 'user', 'content': 'who are you?'}]) +# # Test 1 +# response = ChatCompletion.create(model="gpt-3.5-turbo", +# provider="BingHuan", +# stream=False, +# messages=[{'role': 'user', 'content': 'who are you?'}]) -print(response) +# print(response) # Test 2 response = ChatCompletion.create(model="gpt-3.5-turbo", @@ -18,13 +20,13 @@ print(response) # Test 3 -response = ChatCompletion.create(model="gpt-4", - provider="BingHuan", - stream=False, - messages=[ - {'role': 'user', 'content': 'now your name is Bob'}, - {'role': 'assistant', 'content': 'Hello Im Bob, you asistant'}, - {'role': 'user', 'content': 'what your name again?'}, - ]) +# response = ChatCompletion.create(model="gpt-4", +# provider="BingHuan", +# stream=False, +# messages=[ +# {'role': 'user', 'content': 'now your name is Bob'}, +# {'role': 'assistant', 'content': 'Hello Im Bob, you asistant'}, +# {'role': 'user', 'content': 'what your name again?'}, +# ]) -print(response) \ No newline at end of file +# print(response) \ No newline at end of file -- cgit v1.2.3 From 86088bef83fb70cbc84fd2475446ca9fb79c460b Mon Sep 17 00:00:00 2001 From: Bagus Indrayana Date: Wed, 12 Jul 2023 01:13:45 +0800 Subject: update testing --- testing/binghuan/testing.py | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) (limited to 'testing/binghuan/testing.py') diff --git a/testing/binghuan/testing.py b/testing/binghuan/testing.py index 6c84cfae..2c510914 100644 --- a/testing/binghuan/testing.py +++ b/testing/binghuan/testing.py @@ -1,14 +1,12 @@ from BingHuan import ChatCompletion -# text = "Hello, this is Bing. I can help you find information on the web, generate content such as poems, stories, code, essays, songs, celebrity parodies and more. I can also help you with rewriting, improving, or optimizing your content. Is there anything specific you would like me to help you with? 😊" -# print(text.encode('utf-8')) -# # Test 1 -# response = ChatCompletion.create(model="gpt-3.5-turbo", -# provider="BingHuan", -# stream=False, -# messages=[{'role': 'user', 'content': 'who are you?'}]) +# Test 1 +response = ChatCompletion.create(model="gpt-3.5-turbo", + provider="BingHuan", + stream=False, + messages=[{'role': 'user', 'content': 'who are you?'}]) -# print(response) +print(response) # Test 2 response = ChatCompletion.create(model="gpt-3.5-turbo", @@ -19,14 +17,14 @@ response = ChatCompletion.create(model="gpt-3.5-turbo", print(response) -# Test 3 -# response = ChatCompletion.create(model="gpt-4", -# provider="BingHuan", -# stream=False, -# messages=[ -# {'role': 'user', 'content': 'now your name is Bob'}, -# {'role': 'assistant', 'content': 'Hello Im Bob, you asistant'}, -# {'role': 'user', 'content': 'what your name again?'}, -# ]) +Test 3 +response = ChatCompletion.create(model="gpt-4", + provider="BingHuan", + stream=False, + messages=[ + {'role': 'user', 'content': 'now your name is Bob'}, + {'role': 'assistant', 'content': 'Hello Im Bob, you asistant'}, + {'role': 'user', 'content': 'what your name again?'}, + ]) -# print(response) \ No newline at end of file +print(response) \ No newline at end of file -- cgit v1.2.3 From 45787b4f0d0efeb72681c58ae3c350168b867752 Mon Sep 17 00:00:00 2001 From: Bagus Indrayana Date: Wed, 12 Jul 2023 01:16:45 +0800 Subject: update testing --- testing/binghuan/testing.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'testing/binghuan/testing.py') diff --git a/testing/binghuan/testing.py b/testing/binghuan/testing.py index 2c510914..2db0b427 100644 --- a/testing/binghuan/testing.py +++ b/testing/binghuan/testing.py @@ -9,6 +9,7 @@ response = ChatCompletion.create(model="gpt-3.5-turbo", print(response) # Test 2 +# this prompt will return emoji in end of response response = ChatCompletion.create(model="gpt-3.5-turbo", provider="BingHuan", stream=False, @@ -17,7 +18,7 @@ response = ChatCompletion.create(model="gpt-3.5-turbo", print(response) -Test 3 +# Test 3 response = ChatCompletion.create(model="gpt-4", provider="BingHuan", stream=False, -- cgit v1.2.3