summaryrefslogtreecommitdiffstats
path: root/ora/model.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-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())