summaryrefslogtreecommitdiffstats
path: root/quora/__init__.py
diff options
context:
space:
mode:
authort.me/xtekky <98614666+xtekky@users.noreply.github.com>2023-04-27 17:28:36 +0200
committerGitHub <noreply@github.com>2023-04-27 17:28:36 +0200
commitbbb4d69a933ff90e33e072ecba32519db7a22612 (patch)
tree6fec52831117ee43fe7141a153b7e123ff09d469 /quora/__init__.py
parentMerge pull request #201 from DanielShemesh/patch-4 (diff)
parentReformat code using PyCharm (diff)
downloadgpt4free-bbb4d69a933ff90e33e072ecba32519db7a22612.tar
gpt4free-bbb4d69a933ff90e33e072ecba32519db7a22612.tar.gz
gpt4free-bbb4d69a933ff90e33e072ecba32519db7a22612.tar.bz2
gpt4free-bbb4d69a933ff90e33e072ecba32519db7a22612.tar.lz
gpt4free-bbb4d69a933ff90e33e072ecba32519db7a22612.tar.xz
gpt4free-bbb4d69a933ff90e33e072ecba32519db7a22612.tar.zst
gpt4free-bbb4d69a933ff90e33e072ecba32519db7a22612.zip
Diffstat (limited to 'quora/__init__.py')
-rw-r--r--quora/__init__.py56
1 files changed, 28 insertions, 28 deletions
diff --git a/quora/__init__.py b/quora/__init__.py
index d0ed302f..cd5ec8f9 100644
--- a/quora/__init__.py
+++ b/quora/__init__.py
@@ -116,11 +116,11 @@ class ModelResponse:
class Model:
@staticmethod
def create(
- token: str,
- model: str = 'gpt-3.5-turbo', # claude-instant
- system_prompt: str = 'You are ChatGPT a large language model developed by Openai. Answer as consisely as possible',
- description: str = 'gpt-3.5 language model from openai, skidded by poe.com',
- handle: str = None,
+ token: str,
+ model: str = 'gpt-3.5-turbo', # claude-instant
+ system_prompt: str = 'You are ChatGPT a large language model developed by Openai. Answer as consisely as possible',
+ description: str = 'gpt-3.5 language model from openai, skidded by poe.com',
+ handle: str = None,
) -> ModelResponse:
models = {
'gpt-3.5-turbo': 'chinchilla',
@@ -202,9 +202,9 @@ class Model:
class Account:
@staticmethod
def create(
- proxy: Optional[str] = None,
- logging: bool = False,
- enable_bot_creation: bool = False,
+ proxy: Optional[str] = None,
+ logging: bool = False,
+ enable_bot_creation: bool = False,
):
client = TLS(client_identifier='chrome110')
client.proxies = {'http': f'http://{proxy}', 'https': f'http://{proxy}'} if proxy else None
@@ -309,10 +309,10 @@ class Account:
class StreamingCompletion:
@staticmethod
def create(
- model: str = 'gpt-4',
- custom_model: bool = None,
- prompt: str = 'hello world',
- token: str = '',
+ model: str = 'gpt-4',
+ custom_model: bool = None,
+ prompt: str = 'hello world',
+ token: str = '',
):
_model = MODELS[model] if not custom_model else custom_model
@@ -344,10 +344,10 @@ class StreamingCompletion:
class Completion:
def create(
- model: str = 'gpt-4',
- custom_model: str = None,
- prompt: str = 'hello world',
- token: str = '',
+ model: str = 'gpt-4',
+ custom_model: str = None,
+ prompt: str = 'hello world',
+ token: str = '',
):
models = {
'sage': 'capybara',
@@ -389,12 +389,12 @@ class Completion:
class Poe:
def __init__(
- self,
- model: str = 'ChatGPT',
- driver: str = 'firefox',
- download_driver: bool = False,
- driver_path: Optional[str] = None,
- cookie_path: str = './quora/cookie.json',
+ self,
+ model: str = 'ChatGPT',
+ driver: str = 'firefox',
+ download_driver: bool = False,
+ driver_path: Optional[str] = None,
+ cookie_path: str = './quora/cookie.json',
):
# validating the model
if model and model not in MODELS:
@@ -473,12 +473,12 @@ class Poe:
return response
def create_bot(
- self,
- name: str,
- /,
- prompt: str = '',
- base_model: str = 'ChatGPT',
- description: str = '',
+ self,
+ name: str,
+ /,
+ prompt: str = '',
+ base_model: str = 'ChatGPT',
+ description: str = '',
) -> None:
if base_model not in MODELS:
raise RuntimeError('Sorry, the base_model you provided does not exist. Please check and try again.')