summaryrefslogtreecommitdiffstats
path: root/testing/test_main.py
diff options
context:
space:
mode:
authorRaju Komati <komatiraju032@gmail.com>2023-04-29 11:25:24 +0200
committerRaju Komati <komatiraju032@gmail.com>2023-04-29 11:25:24 +0200
commit54b4c789a75fec5c3a92a03dfd2d93d051309651 (patch)
tree813a7dd223e9f7df3b1708fc65a58ccc87684ba6 /testing/test_main.py
parentUpdate README.md (diff)
downloadgpt4free-54b4c789a75fec5c3a92a03dfd2d93d051309651.tar
gpt4free-54b4c789a75fec5c3a92a03dfd2d93d051309651.tar.gz
gpt4free-54b4c789a75fec5c3a92a03dfd2d93d051309651.tar.bz2
gpt4free-54b4c789a75fec5c3a92a03dfd2d93d051309651.tar.lz
gpt4free-54b4c789a75fec5c3a92a03dfd2d93d051309651.tar.xz
gpt4free-54b4c789a75fec5c3a92a03dfd2d93d051309651.tar.zst
gpt4free-54b4c789a75fec5c3a92a03dfd2d93d051309651.zip
Diffstat (limited to 'testing/test_main.py')
-rw-r--r--testing/test_main.py20
1 files changed, 12 insertions, 8 deletions
diff --git a/testing/test_main.py b/testing/test_main.py
index 612ec695..bd4d03e9 100644
--- a/testing/test_main.py
+++ b/testing/test_main.py
@@ -1,24 +1,28 @@
-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'
-)
+# token = quora.Account.create(logging=False)
+token = 'GKzCahZYGKhp76LfE197xw=='
+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)