summaryrefslogtreecommitdiffstats
path: root/quora/__init__.py
diff options
context:
space:
mode:
authort.me/xtekky <98614666+xtekky@users.noreply.github.com>2023-04-13 17:08:04 +0200
committerGitHub <noreply@github.com>2023-04-13 17:08:04 +0200
commitd0f58147bb7f1b7ebdacb16b148df4f1bc061a74 (patch)
treec5081af04aa7add9e9cade5520e8bee7bd16c4dd /quora/__init__.py
parentt3nsor.tech is down (diff)
downloadgpt4free-d0f58147bb7f1b7ebdacb16b148df4f1bc061a74.tar
gpt4free-d0f58147bb7f1b7ebdacb16b148df4f1bc061a74.tar.gz
gpt4free-d0f58147bb7f1b7ebdacb16b148df4f1bc061a74.tar.bz2
gpt4free-d0f58147bb7f1b7ebdacb16b148df4f1bc061a74.tar.lz
gpt4free-d0f58147bb7f1b7ebdacb16b148df4f1bc061a74.tar.xz
gpt4free-d0f58147bb7f1b7ebdacb16b148df4f1bc061a74.tar.zst
gpt4free-d0f58147bb7f1b7ebdacb16b148df4f1bc061a74.zip
Diffstat (limited to 'quora/__init__.py')
-rw-r--r--quora/__init__.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/quora/__init__.py b/quora/__init__.py
index 175077ab..1a27e037 100644
--- a/quora/__init__.py
+++ b/quora/__init__.py
@@ -67,7 +67,8 @@ class Model:
models = {
'gpt-3.5-turbo' : 'chinchilla',
- 'claude-instant-v1.0': 'a2'
+ 'claude-instant-v1.0': 'a2',
+ 'gpt-4': 'beaver'
}
if not handle:
@@ -230,7 +231,7 @@ class Account:
class StreamingCompletion:
def create(
model : str = 'gpt-4',
- custom_model : str = None,
+ custom_model : bool = None,
prompt: str = 'hello world',
token : str = ''):
@@ -246,7 +247,7 @@ class StreamingCompletion:
client = PoeClient(token)
- for chunk in client.send_message(models[model], prompt):
+ for chunk in client.send_message(_model, prompt):
yield PoeResponse({
'id' : chunk["messageId"],
@@ -285,7 +286,7 @@ class Completion:
client = PoeClient(token)
- for chunk in client.send_message(models[model], prompt):
+ for chunk in client.send_message(_model, prompt):
pass
return PoeResponse({
@@ -304,4 +305,4 @@ class Completion:
'completion_tokens' : len(chunk["text"]),
'total_tokens' : len(prompt) + len(chunk["text"])
}
- }) \ No newline at end of file
+ })