summaryrefslogtreecommitdiffstats
path: root/ora/model.py
diff options
context:
space:
mode:
authort.me/xtekky <98614666+xtekky@users.noreply.github.com>2023-04-25 10:56:27 +0200
committert.me/xtekky <98614666+xtekky@users.noreply.github.com>2023-04-25 10:56:27 +0200
commit8350bc684275c2967fef0064ee9a044a45cc2ef7 (patch)
tree01ec6f1925a64c3b616e8520cd3f4ae8b0b6f97d /ora/model.py
parentphind needs cf_clearance again (diff)
downloadgpt4free-8350bc684275c2967fef0064ee9a044a45cc2ef7.tar
gpt4free-8350bc684275c2967fef0064ee9a044a45cc2ef7.tar.gz
gpt4free-8350bc684275c2967fef0064ee9a044a45cc2ef7.tar.bz2
gpt4free-8350bc684275c2967fef0064ee9a044a45cc2ef7.tar.lz
gpt4free-8350bc684275c2967fef0064ee9a044a45cc2ef7.tar.xz
gpt4free-8350bc684275c2967fef0064ee9a044a45cc2ef7.tar.zst
gpt4free-8350bc684275c2967fef0064ee9a044a45cc2ef7.zip
Diffstat (limited to 'ora/model.py')
-rw-r--r--ora/model.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/ora/model.py b/ora/model.py
index 7c967625..34720c2d 100644
--- a/ora/model.py
+++ b/ora/model.py
@@ -20,6 +20,12 @@ class CompletionModel:
CompletionModel.description = description
CompletionModel.slug = name
+ json_data = {
+ 'prompt' : system_prompt,
+ 'userId' : f'auto:{uuid4()}',
+ 'name' : name,
+ 'description': description}
+
headers = {
'Origin' : 'https://ora.sh',
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.4 Safari/605.1.15',
@@ -27,11 +33,7 @@ class CompletionModel:
'Host' : 'ora.sh',
}
- response = post('https://ora.sh/api/assistant', headers = headers, json = {
- 'prompt' : system_prompt,
- 'userId' : f'auto:{uuid4()}',
- 'name' : name,
- 'description': description})
+ response = post('https://ora.sh/api/assistant', headers = headers, json = json_data)
print(response.json())