-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
46 lines (37 loc) · 1.15 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
from revChatGPT.ChatGPT import Chatbot
config = {
"email": "email",
"password": "password",
"captcha": "api_key"
}
chatbot = Chatbot({
"session_token": "session_token"
}, conversation_id=None, parent_id=None)
def __init__(self, config, conversation_id=None, debug=False, refresh=True):
"""
:param config: Config dict
:param conversation_id: Conversation ID. If None, a new conversation will be created
:param debug: Debug mode, Default is False
:param refresh: Refresh the session token, Default is True
"""
def get_chat_response(self, prompt, output="text"):
"""
:param prompt: The message sent to the chatbot
:param output: Output type. Can be "text" or "stream"
:return: Response from the chatbot
"""
def rollback_conversation(self):
"""
Rollback the conversation to the previous state
:return: None
"""
def refresh_session(self):
"""
Refresh the session token
:return: None
"""
def login(self, email, password):
"""
:param email: Email
:param password: Password
"""