summaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorhp256 <971748116@qq.com>2023-05-22 08:00:00 +0200
committerhp256 <971748116@qq.com>2023-05-22 08:00:00 +0200
commitc7d26ed86719e1aacf2ff44fb10d9f79a3c2ea32 (patch)
treedf1984762765b3c9ef9c5fcff304a8998fdd1f98 /testing
parentadd oraai (diff)
parentMerge pull request #584 from ezerinz/main (diff)
downloadgpt4free-c7d26ed86719e1aacf2ff44fb10d9f79a3c2ea32.tar
gpt4free-c7d26ed86719e1aacf2ff44fb10d9f79a3c2ea32.tar.gz
gpt4free-c7d26ed86719e1aacf2ff44fb10d9f79a3c2ea32.tar.bz2
gpt4free-c7d26ed86719e1aacf2ff44fb10d9f79a3c2ea32.tar.lz
gpt4free-c7d26ed86719e1aacf2ff44fb10d9f79a3c2ea32.tar.xz
gpt4free-c7d26ed86719e1aacf2ff44fb10d9f79a3c2ea32.tar.zst
gpt4free-c7d26ed86719e1aacf2ff44fb10d9f79a3c2ea32.zip
Diffstat (limited to '')
-rw-r--r--testing/aiassistest.py13
-rw-r--r--testing/italygpt2_test.py4
2 files changed, 17 insertions, 0 deletions
diff --git a/testing/aiassistest.py b/testing/aiassistest.py
new file mode 100644
index 00000000..57a34f15
--- /dev/null
+++ b/testing/aiassistest.py
@@ -0,0 +1,13 @@
+import aiassist
+
+question1 = "Who won the world series in 2020?"
+req = aiassist.Completion.create(prompt=question1)
+answer = req["text"]
+message_id = req["parentMessageId"]
+
+question2 = "Where was it played?"
+req2 = aiassist.Completion.create(prompt=question2, parentMessageId=message_id)
+answer2 = req2["text"]
+
+print(answer)
+print(answer2)
diff --git a/testing/italygpt2_test.py b/testing/italygpt2_test.py
new file mode 100644
index 00000000..0494c8a2
--- /dev/null
+++ b/testing/italygpt2_test.py
@@ -0,0 +1,4 @@
+from gpt4free import italygpt2
+account_data=italygpt2.Account.create()
+for chunk in italygpt2.Completion.create(account_data=account_data,prompt="Who are you?"):
+ print(chunk, end="", flush=True) \ No newline at end of file