summaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--testing/forefront_test.py2
-rw-r--r--testing/poe_account_create_test.py4
-rw-r--r--testing/poe_test.py2
-rw-r--r--testing/quora_test_2.py2
-rw-r--r--testing/test_main.py17
-rw-r--r--testing/you_test.py6
6 files changed, 18 insertions, 15 deletions
diff --git a/testing/forefront_test.py b/testing/forefront_test.py
index 8d25ed89..b7b5c57c 100644
--- a/testing/forefront_test.py
+++ b/testing/forefront_test.py
@@ -1,4 +1,4 @@
-from openai_rev import forefront
+from gpt4free import forefront
# create an account
token = forefront.Account.create(logging=True)
diff --git a/testing/poe_account_create_test.py b/testing/poe_account_create_test.py
index 7072597f..ace2306e 100644
--- a/testing/poe_account_create_test.py
+++ b/testing/poe_account_create_test.py
@@ -6,8 +6,8 @@ from typing import Optional
from tls_client import Session as TLS
from twocaptcha import TwoCaptcha
-from openai_rev.quora import extract_formkey
-from openai_rev.quora.mail import Emailnator
+from gpt4free.quora import extract_formkey
+from gpt4free.quora.mail import Emailnator
solver = TwoCaptcha('72747bf24a9d89b4dcc1b24875efd358')
diff --git a/testing/poe_test.py b/testing/poe_test.py
index 809804f2..22d95f5f 100644
--- a/testing/poe_test.py
+++ b/testing/poe_test.py
@@ -1,6 +1,6 @@
from time import sleep
-from openai_rev import quora
+from gpt4free import quora
token = quora.Account.create(proxy=None, logging=True)
print('token', token)
diff --git a/testing/quora_test_2.py b/testing/quora_test_2.py
index 5d06f9ed..297ca7a1 100644
--- a/testing/quora_test_2.py
+++ b/testing/quora_test_2.py
@@ -1,4 +1,4 @@
-from openai_rev import quora
+from gpt4free import quora
token = quora.Account.create(logging=True, enable_bot_creation=True)
diff --git a/testing/test_main.py b/testing/test_main.py
index 612ec695..7c28f1d2 100644
--- a/testing/test_main.py
+++ b/testing/test_main.py
@@ -1,24 +1,27 @@
-from openai_rev import openai_rev, Provider, quora, forefront
+import gpt4free
+from gpt4free import Provider, quora, forefront
# usage You
-response = openai_rev.Completion.create(Provider.You, prompt='Write a poem on Lionel Messi')
+response = gpt4free.Completion.create(Provider.You, prompt='Write a poem on Lionel Messi')
print(response)
# usage Poe
token = quora.Account.create(logging=False)
-response = openai_rev.Completion.create(
- Provider.Poe, prompt='Write a poem on Lionel Messi', token=token, model='ChatGPT'
-)
+response = gpt4free.Completion.create(Provider.Poe, prompt='Write a poem on Lionel Messi', token=token, model='ChatGPT')
print(response)
# usage forefront
token = forefront.Account.create(logging=False)
-response = openai_rev.Completion.create(
+response = gpt4free.Completion.create(
Provider.ForeFront, prompt='Write a poem on Lionel Messi', model='gpt-4', token=token
)
print(response)
print(f'END')
# usage theb
-response = openai_rev.Completion.create(Provider.Theb, prompt='Write a poem on Lionel Messi')
+response = gpt4free.Completion.create(Provider.Theb, prompt='Write a poem on Lionel Messi')
+print(response)
+
+# usage cocalc
+response = gpt4free.Completion.create(Provider.CoCalc, prompt='Write a poem on Lionel Messi', cookie_input='')
print(response)
diff --git a/testing/you_test.py b/testing/you_test.py
index 34800301..1e9f6205 100644
--- a/testing/you_test.py
+++ b/testing/you_test.py
@@ -1,4 +1,4 @@
-from openai_rev import you
+from gpt4free import you
# simple request with links and details
response = you.Completion.create(prompt="hello world", detailed=True, include_links=True)
@@ -22,6 +22,6 @@ while True:
response = you.Completion.create(prompt=prompt, chat=chat)
- print("Bot:", response["response"])
+ print("Bot:", response.text)
- chat.append({"question": prompt, "answer": response["response"]})
+ chat.append({"question": prompt, "answer": response.text})