diff options
author | t.me/xtekky <98614666+xtekky@users.noreply.github.com> | 2023-04-16 18:37:07 +0200 |
---|---|---|
committer | t.me/xtekky <98614666+xtekky@users.noreply.github.com> | 2023-04-16 18:37:07 +0200 |
commit | d7ea4f90a8fa1be0fbbaa715426caf1c819d12a8 (patch) | |
tree | 3b82965a45238cb5b876db27ee659fb8c35f2010 /ora/model.py | |
parent | quora (poe) [gpt-4/3.5] api unpatch (diff) | |
download | gpt4free-d7ea4f90a8fa1be0fbbaa715426caf1c819d12a8.tar gpt4free-d7ea4f90a8fa1be0fbbaa715426caf1c819d12a8.tar.gz gpt4free-d7ea4f90a8fa1be0fbbaa715426caf1c819d12a8.tar.bz2 gpt4free-d7ea4f90a8fa1be0fbbaa715426caf1c819d12a8.tar.lz gpt4free-d7ea4f90a8fa1be0fbbaa715426caf1c819d12a8.tar.xz gpt4free-d7ea4f90a8fa1be0fbbaa715426caf1c819d12a8.tar.zst gpt4free-d7ea4f90a8fa1be0fbbaa715426caf1c819d12a8.zip |
Diffstat (limited to 'ora/model.py')
-rw-r--r-- | ora/model.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/ora/model.py b/ora/model.py index 69eca526..a0f0e93e 100644 --- a/ora/model.py +++ b/ora/model.py @@ -8,6 +8,7 @@ class CompletionModel: createdAt = None slug = None id = None + model = 'gpt-3.5-turbo' def create( system_prompt: str = 'You are ChatGPT, a large language model trained by OpenAI. Answer as concisely as possible', @@ -18,6 +19,7 @@ class CompletionModel: CompletionModel.description = description CompletionModel.slug = name + response = post('https://ora.sh/api/assistant', json = { 'prompt' : system_prompt, 'userId' : f'auto:{uuid4()}', @@ -29,4 +31,16 @@ class CompletionModel: CompletionModel.createdAt = response.json()['createdAt'] return CompletionModel -
\ No newline at end of file + + def load(chatbotId: str, modelName: str = 'gpt-3.5-turbo', userId: str = None): + if userId is None: userId = f'{uuid4()}' + + CompletionModel.system_prompt = None + CompletionModel.description = None + CompletionModel.slug = None + CompletionModel.id = chatbotId + CompletionModel.createdBy = userId + CompletionModel.createdAt = None + CompletionModel.modelName = modelName + + return CompletionModel
\ No newline at end of file |