Commit 0397b5da authored by Jiabo Li's avatar Jiabo Li
Browse files

Change port 8101 to 8201 to avoid conflict from chatmol plugin installation....

Change port 8101 to 8201 to avoid conflict from chatmol plugin installation. Also added two alias for chat and chatlite to give user more flexibility, in case a user don't remember the exact activation word should be captitalized or not
parent ba01058d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -238,5 +238,8 @@ def start_chatgpt_cmd(message, execute:bool=True, lite:bool=True):
cmd.extend("set_api_key", set_api_key)
cmd.extend("chat", start_chatgpt_cmd)
cmd.extend("chatlite", chatlite)
# Add more alias
cmd.extend("Chat", start_chatgpt_cmd)
cmd.extend("Chatlite", chatlite)

+1 −1
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ def send_response_to_server():
    if (index):
       command = conversation[index+9:]
       print("command", command)
    response = requests.post('http://localhost:8101/send_message', data=command)
    response = requests.post('http://localhost:8201/send_message', data=command)
    if response.status_code == 200:
        print('Command sent to server successfully.')
    else:
+1 −1
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ class PyMOLCommandHandler(http.server.BaseHTTPRequestHandler):
            self.wfile.write(str(e).encode())

def start_server():
    httpd = http.server.HTTPServer(('localhost', 8101), PyMOLCommandHandler)
    httpd = http.server.HTTPServer(('localhost', 8201), PyMOLCommandHandler)
    httpd.serve_forever()

server_thread = threading.Thread(target=start_server)