Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working chat gpt lmao api #146

Open
vpsbykaif opened this issue Mar 9, 2024 · 20 comments
Open

Not working chat gpt lmao api #146

vpsbykaif opened this issue Mar 9, 2024 · 20 comments

Comments

@vpsbykaif
Copy link

vpsbykaif commented Mar 9, 2024

I have copy the json from the extension as per the instruction but it still not working

Screenshot_20240309_195829_Telegram

@F33RNI
Copy link
Owner

F33RNI commented Mar 10, 2024

Please provide logs

@chelaxian
Copy link

chelaxian commented Mar 10, 2024

hi. same problem. environment - Ubuntu 22.04, amd64

Logs when running bot:

[2024-03-10 14:40:22] [317184 ] [INFO   ] Trying to load and initialize lmao_chatgpt module
[2024-03-10 14:40:22] [317184 ] [INFO   ] Starting _lmao_process_loop as process
[2024-03-10 14:40:22] [317184 ] [INFO   ] Waiting for lmao_chatgpt initialization to finish
[2024-03-10 14:40:22] [317202 ] [INFO   ] Logging setup is complete for process with PID: 317202
[2024-03-10 14:40:22] [317202 ] [INFO   ] _lmao_process_loop started
[2024-03-10 14:40:22] [317202 ] [INFO   ] Initializing lmao_chatgpt
[2024-03-10 14:40:22] [317202 ] [INFO   ] Initializing chatgpt class object
[2024-03-10 14:40:22] [317202 ] [INFO   ] Loading /root/github/GPT/GPT-Telegramus/venv/lib/python3.10/site-packages/lmao/chatgpt/assistantGetLastMessage.js
[2024-03-10 14:40:22] [317202 ] [INFO   ] Loading /root/github/GPT/GPT-Telegramus/venv/lib/python3.10/site-packages/lmao/chatgpt/conversationSearch.js
[2024-03-10 14:40:22] [317202 ] [INFO   ] Loading cookies from ChatGPT_cookies.json
[2024-03-10 14:40:22] [317202 ] [INFO   ] Loaded 17 cookies
[2024-03-10 14:40:22] [317202 ] [INFO   ] Adding chrome options
[2024-03-10 14:40:22] [317202 ] [INFO   ] Using user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36
[2024-03-10 14:40:22] [317202 ] [INFO   ] Initializing driver in headless mode
[2024-03-10 14:40:23] [317202 ] [INFO   ] patching driver executable /root/.local/share/undetected_chromedriver/undetected_chromedriver
[2024-03-10 14:40:41] [317202 ] [ERROR  ] chatgpt initialization error
Traceback (most recent call last):
  File "/root/github/GPT/GPT-Telegramus/venv/lib/python3.10/site-packages/lmao/module_wrapper.py", line 84, in _initialization_thread
    self._module_class.session_start(**kwargs)
  File "/root/github/GPT/GPT-Telegramus/venv/lib/python3.10/site-packages/lmao/chatgpt/chatgpt_api.py", line 295, in session_start
    raise e
  File "/root/github/GPT/GPT-Telegramus/venv/lib/python3.10/site-packages/lmao/chatgpt/chatgpt_api.py", line 243, in session_start
    self.driver = undetected_chromedriver.Chrome(options=chrome_options, headless=headless, **kwargs)
  File "/root/github/GPT/GPT-Telegramus/venv/lib/python3.10/site-packages/undetected_chromedriver/__init__.py", line 466, in __init__
    super(Chrome, self).__init__(
  File "/root/github/GPT/GPT-Telegramus/venv/lib/python3.10/site-packages/selenium/webdriver/chrome/webdriver.py", line 45, in __init__
    super().__init__(
  File "/root/github/GPT/GPT-Telegramus/venv/lib/python3.10/site-packages/selenium/webdriver/chromium/webdriver.py", line 61, in __init__
    super().__init__(command_executor=executor, options=options)
  File "/root/github/GPT/GPT-Telegramus/venv/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 208, in __init__
    self.start_session(capabilities)
  File "/root/github/GPT/GPT-Telegramus/venv/lib/python3.10/site-packages/undetected_chromedriver/__init__.py", line 724, in start_session
    super(selenium.webdriver.chrome.webdriver.WebDriver, self).start_session(
  File "/root/github/GPT/GPT-Telegramus/venv/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 292, in start_session
    response = self.execute(Command.NEW_SESSION, caps)["value"]
  File "/root/github/GPT/GPT-Telegramus/venv/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 347, in execute
    self.error_handler.check_response(response)
  File "/root/github/GPT/GPT-Telegramus/venv/lib/python3.10/site-packages/selenium/webdriver/remote/errorhandler.py", line 229, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot connect to chrome at 127.0.0.1:54047
from session not created: This version of ChromeDriver only supports Chrome version 122
Current browser version is 118.0.5993.117
Stacktrace:
#0 0x55a40d6e0ec3 <unknown>
#1 0x55a40d3d8ce6 <unknown>
#2 0x55a40d41362b <unknown>
#3 0x55a40d4127f5 <unknown>
#4 0x55a40d40916b <unknown>
#5 0x55a40d45271c <unknown>
#6 0x55a40d445c53 <unknown>
#7 0x55a40d416db3 <unknown>
#8 0x55a40d41777e <unknown>
#9 0x55a40d6a67fb <unknown>
#10 0x55a40d6aa815 <unknown>
#11 0x55a40d694111 <unknown>
#12 0x55a40d6ab3a2 <unknown>
#13 0x55a40d6781ef <unknown>
#14 0x55a40d6cf4b8 <unknown>
#15 0x55a40d6cf6b3 <unknown>
#16 0x55a40d6e0074 <unknown>
#17 0x7f2529545ac3 <unknown>

[2024-03-10 14:40:41] [317202 ] [INFO   ] lmao_chatgpt initialization finished
[2024-03-10 14:40:41] [317202 ] [INFO   ] _lmao_stop_stream_loop started
[2024-03-10 14:40:41] [317184 ] [INFO   ] lmao_chatgpt initialization finished
[2024-03-10 14:40:41] [317184 ] [INFO   ] Trying to load and initialize ms_copilot module
[2024-03-10 14:40:41] [317184 ] [INFO   ] Trying to load and initialize ms_copilot_designer module
[2024-03-10 14:40:41] [317184 ] [INFO   ] Trying to load and initialize gemini module
[2024-03-10 14:40:41] [317184 ] [INFO   ] Starting _queue_processing_loop thread
[2024-03-10 14:40:41] [317184 ] [INFO   ] _queue_processing_loop thread started
[2024-03-10 14:40:41] [317184 ] [WARNING] Error stopping current event loop: no running event loop
[2024-03-10 14:40:41] [317184 ] [INFO   ] Creating a new event loop
[2024-03-10 14:40:42] [317184 ] [INFO   ] Trying to set bot commands
[2024-03-10 14:40:42] [317184 ] [INFO   ] Adding user command handlers
[2024-03-10 14:40:42] [317184 ] [INFO   ] Adding /lmao_chatgpt command handler
[2024-03-10 14:40:42] [317184 ] [INFO   ] Adding /chatgpt command handler
[2024-03-10 14:40:42] [317184 ] [INFO   ] Adding /dalle command handler
[2024-03-10 14:40:42] [317184 ] [INFO   ] Adding /ms_copilot command handler
[2024-03-10 14:40:42] [317184 ] [INFO   ] Adding /ms_copilot_designer command handler
[2024-03-10 14:40:42] [317184 ] [INFO   ] Adding /gemini command handler
[2024-03-10 14:40:42] [317184 ] [INFO   ] Adding message handlers
[2024-03-10 14:40:42] [317184 ] [INFO   ] Adding admin command handlers
[2024-03-10 14:40:42] [317184 ] [INFO   ] Adding unknown command handler
[2024-03-10 14:40:42] [317184 ] [INFO   ] Adding markup handler
[2024-03-10 14:40:42] [317184 ] [INFO   ] Starting bot polling
[2024-03-10 14:40:42] [317184 ] [INFO   ] Application started

Logs when chating with chatgpt module:

[2024-03-10 14:42:04] [317184 ] [INFO   ] Reading users database from users.json
[2024-03-10 14:42:04] [317184 ] [INFO   ] Reading users database from users.json
[2024-03-10 14:42:04] [317184 ] [INFO   ] Saving users database to users.json
[2024-03-10 14:42:04] [317184 ] [INFO   ] Reading users database from users.json
[2024-03-10 14:42:04] [317184 ] [INFO   ] Saving users database to users.json
[2024-03-10 14:42:04] [317184 ] [INFO   ] Reading users database from users.json
[2024-03-10 14:42:04] [317184 ] [INFO   ] Saving users database to users.json
[2024-03-10 14:42:04] [317184 ] [INFO   ] Text message from X X (7******)
[2024-03-10 14:42:04] [317184 ] [INFO   ] Reading users database from users.json
[2024-03-10 14:42:04] [317184 ] [INFO   ] Reading users database from users.json
[2024-03-10 14:42:04] [317184 ] [INFO   ] Reading users database from users.json
[2024-03-10 14:42:04] [317184 ] [INFO   ] Creating new request-response container
[2024-03-10 14:42:04] [317184 ] [INFO   ] Adding new request to lmao_chatgpt from X X (7******) to the queue
[2024-03-10 14:42:04] [317184 ] [INFO   ] Received request from user 7******
[2024-03-10 14:42:04] [317184 ] [INFO   ] Starting request_processor for lmao_chatgpt
[2024-03-10 14:42:04] [317343 ] [INFO   ] Logging setup is complete for process with PID: 317343
[2024-03-10 14:42:04] [317343 ] [INFO   ] request_processor started
[2024-03-10 14:42:04] [317343 ] [INFO   ] Reading users database from users.json
[2024-03-10 14:42:04] [317343 ] [INFO   ] Reading users database from users.json
[2024-03-10 14:42:04] [317343 ] [INFO   ] Reading users database from users.json
[2024-03-10 14:42:04] [317343 ] [INFO   ] Saving users database to users.json
[2024-03-10 14:42:04] [317343 ] [INFO   ] Reading users database from users.json
[2024-03-10 14:42:04] [317343 ] [INFO   ] Saving users database to users.json
[2024-03-10 14:42:04] [317343 ] [INFO   ] Reading users database from users.json
[2024-03-10 14:42:04] [317343 ] [INFO   ] Saving users database to users.json
[2024-03-10 14:42:04] [317343 ] [INFO   ] Reading users database from users.json
[2024-03-10 14:42:04] [317343 ] [INFO   ] Saving users database to users.json
[2024-03-10 14:42:04] [317343 ] [INFO   ] Reading users database from users.json
[2024-03-10 14:42:04] [317343 ] [INFO   ] Saving users database to users.json
[2024-03-10 14:42:04] [317343 ] [INFO   ] Reading users database from users.json
[2024-03-10 14:42:04] [317343 ] [INFO   ] Reading users database from users.json
[2024-03-10 14:42:04] [317343 ] [INFO   ] Reading users database from users.json
[2024-03-10 14:42:04] [317343 ] [INFO   ] Saving users database to users.json
[2024-03-10 14:42:04] [317343 ] [INFO   ] Reading users database from users.json
[2024-03-10 14:42:04] [317343 ] [INFO   ] Reading users database from users.json
[2024-03-10 14:42:04] [317343 ] [INFO   ] Reading users database from users.json
[2024-03-10 14:42:04] [317343 ] [INFO   ] Reading users database from users.json
[2024-03-10 14:42:05] [317343 ] [ERROR  ] Error processing request
Traceback (most recent call last):
  File "/root/github/GPT/GPT-Telegramus/request_processor.py", line 104, in request_processor
    module.process_request(request_)
  File "/root/github/GPT/GPT-Telegramus/module_wrapper_global.py", line 227, in process_request
    raise Exception(f"{self.name} status is not idle")
Exception: lmao_chatgpt status is not idle
[2024-03-10 14:42:05] [317184 ] [INFO   ] Setting prevent_shutdown_flag
[2024-03-10 14:42:05] [317184 ] [INFO   ] Trying to kill lmao_chatgpt process with PID 317343
[2024-03-10 14:42:06] [317184 ] [INFO   ] Killed? True
[2024-03-10 14:42:06] [317184 ] [INFO   ] Container with ID 2081593901 (PID 317343) was removed from the queue
[2024-03-10 14:42:09] [317184 ] [INFO   ] Reading users database from users.json
[2024-03-10 14:42:09] [317184 ] [INFO   ] Reading users database from users.json
[2024-03-10 14:42:09] [317184 ] [INFO   ] Saving users database to users.json
[2024-03-10 14:42:09] [317184 ] [INFO   ] Reading users database from users.json
[2024-03-10 14:42:09] [317184 ] [INFO   ] Saving users database to users.json
[2024-03-10 14:42:09] [317184 ] [INFO   ] clear markup action from X X (7******)
[2024-03-10 14:42:09] [317184 ] [INFO   ] Trying to clear lmao_chatgpt conversation for user 7******
[2024-03-10 14:42:09] [317184 ] [ERROR  ] Error clearing conversation
Traceback (most recent call last):
  File "/root/github/GPT/GPT-Telegramus/bot_handler.py", line 887, in _bot_command_clear_raw
    self.modules.get(module_name).delete_conversation(user_id)
  File "/root/github/GPT/GPT-Telegramus/module_wrapper_global.py", line 395, in delete_conversation
    raise Exception(f"{self.name} status is not idle")
Exception: lmao_chatgpt status is not idle
[2024-03-10 14:42:10] [317184 ] [INFO   ] Clearing prevent_shutdown_flag

@chelaxian
Copy link

Btw, gemini and copilot (both text and img) works perfect! thanks!

@chelaxian
Copy link

previous chatgpt proxy at least created chat in original web page, this proxy not work in cause of chrome driver i suppose

@F33RNI
Copy link
Owner

F33RNI commented Mar 10, 2024

from session not created: This version of ChromeDriver only supports Chrome version 122 Current browser version is 118.0.5993.117

Please read your logs. You need to update Chrome

@alfsoft
Copy link
Contributor

alfsoft commented Mar 10, 2024

I'm posting here just to not start a new issue. When running the latest version inside a docker that was set up according to this guide and asking ChatGPT about something , I get this error in a log:

[2024-03-10 14:27:21] [205    ] [ERROR  ] Error processing request
Traceback (most recent call last):
  File "request_processor.py", line 104, in request_processor
  File "module_wrapper_global.py", line 223, in process_request
Exception: lmao_chatgpt process is not running
[2024-03-10 14:27:21] [6      ] [INFO   ] Setting prevent_shutdown_flag
[2024-03-10 14:27:21] [6      ] [INFO   ] Trying to kill lmao_chatgpt process with PID 205
[2024-03-10 14:27:22] [6      ] [INFO   ] Killed? True
[2024-03-10 14:27:22] [6      ] [INFO   ] Container with ID 1908173171 (PID 205) was removed from the queue
[2024-03-10 14:27:26] [6      ] [INFO   ] Clearing prevent_shutdown_flag

When I select a ChatGPT module I get only this in a log (no word about lmao_process as mentioned by others):

[2024-03-10 14:40:52] [6      ] [INFO   ] Reading users database from /app/config/users.json
[2024-03-10 14:40:52] [6      ] [INFO   ] Reading users database from /app/config/users.json
[2024-03-10 14:40:52] [6      ] [INFO   ] Saving users database to /app/config/users.json
[2024-03-10 14:40:52] [6      ] [INFO   ] Reading users database from /app/config/users.json
[2024-03-10 14:40:52] [6      ] [INFO   ] Saving users database to /app/config/users.json
[2024-03-10 14:40:52] [6      ] [INFO   ] module markup action from Xxx (xxxxxxxxx)
[2024-03-10 14:40:56] [6      ] [INFO   ] Reading users database from /app/config/users.json
[2024-03-10 14:40:56] [6      ] [INFO   ] Reading users database from /app/config/users.json
[2024-03-10 14:40:56] [6      ] [INFO   ] Saving users database to /app/config/users.json
[2024-03-10 14:40:56] [6      ] [INFO   ] Reading users database from /app/config/users.json
[2024-03-10 14:40:56] [6      ] [INFO   ] Saving users database to /app/config/users.json
[2024-03-10 14:40:56] [6      ] [INFO   ] module markup action from Xxx (xxxxxxxxx)
[2024-03-10 14:40:56] [6      ] [INFO   ] Reading users database from /app/config/users.json
[2024-03-10 14:40:56] [6      ] [INFO   ] Saving users database to /app/config/users.json
[2024-03-10 14:40:56] [6      ] [INFO   ] Reading users database from /app/config/users.json
[2024-03-10 14:40:56] [6      ] [INFO   ] Reading users database from /app/config/users.json

The module was configured by instructions from lmao_chatgpt.json

@chelaxian
Copy link

chelaxian commented Mar 10, 2024

from session not created: This version of ChromeDriver only supports Chrome version 122 Current browser version is 118.0.5993.117

Please read your logs. You need to update Chrome

root@amd4:~/github/GPT/GPT-Telegramus# google-chrome --version
Google Chrome 122.0.6261.111

upgraded it but it not helps

[2024-03-10 16:26:34] [322564 ] [INFO   ] Trying to load and initialize lmao_chatgpt module
[2024-03-10 16:26:34] [322564 ] [INFO   ] Starting _lmao_process_loop as process
[2024-03-10 16:26:34] [322564 ] [INFO   ] Waiting for lmao_chatgpt initialization to finish
[2024-03-10 16:26:34] [322582 ] [INFO   ] Logging setup is complete for process with PID: 322582
[2024-03-10 16:26:34] [322582 ] [INFO   ] _lmao_process_loop started
[2024-03-10 16:26:34] [322582 ] [INFO   ] Initializing lmao_chatgpt
[2024-03-10 16:26:34] [322582 ] [INFO   ] Initializing chatgpt class object
[2024-03-10 16:26:34] [322582 ] [INFO   ] Loading /root/github/GPT/GPT-Telegramus/venv/lib/python3.10/site-packages/lmao/chatgpt/assistantGetLastMessage.js
[2024-03-10 16:26:34] [322582 ] [INFO   ] Loading /root/github/GPT/GPT-Telegramus/venv/lib/python3.10/site-packages/lmao/chatgpt/conversationSearch.js
[2024-03-10 16:26:34] [322582 ] [INFO   ] Loading cookies from ChatGPT_cookies.json
[2024-03-10 16:26:34] [322582 ] [INFO   ] Loaded 17 cookies
[2024-03-10 16:26:34] [322582 ] [INFO   ] Adding chrome options
[2024-03-10 16:26:34] [322582 ] [INFO   ] Using user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36
[2024-03-10 16:26:34] [322582 ] [INFO   ] Initializing driver in headless mode
[2024-03-10 16:26:34] [322582 ] [INFO   ] patching driver executable /root/.local/share/undetected_chromedriver/undetected_chromedriver
[2024-03-10 16:27:04] [322582 ] [INFO   ] Trying to add 17 cookies
[2024-03-10 16:28:44] [322582 ] [WARNING] Error adding cookie oai-did
[2024-03-10 16:37:35] [322582 ] [WARNING] Error adding cookie oai-allow-ne
[2024-03-10 16:37:39] [322582 ] [INFO   ] Loading https://chat.openai.com/
[2024-03-10 16:44:44] [322582 ] [ERROR  ] chatgpt initialization error

[2024-03-10 16:46:59] [323092 ] [ERROR  ] Error processing request
Traceback (most recent call last):
  File "/root/github/GPT/GPT-Telegramus/request_processor.py", line 104, in request_processor
    module.process_request(request_)
  File "/root/github/GPT/GPT-Telegramus/module_wrapper_global.py", line 227, in process_request
    raise Exception(f"{self.name} status is not idle")
Exception: lmao_chatgpt status is not idle
[2024-03-10 16:46:59] [322564 ] [INFO   ] Setting prevent_shutdown_flag
[2024-03-10 16:46:59] [322564 ] [INFO   ] Trying to kill lmao_chatgpt process with PID 323092
[2024-03-10 16:47:00] [322564 ] [INFO   ] Killed? True
[2024-03-10 16:47:06] [322564 ] [ERROR  ] Error clearing conversation
Traceback (most recent call last):
  File "/root/github/GPT/GPT-Telegramus/bot_handler.py", line 887, in _bot_command_clear_raw
    self.modules.get(module_name).delete_conversation(user_id)
  File "/root/github/GPT/GPT-Telegramus/module_wrapper_global.py", line 395, in delete_conversation
    raise Exception(f"{self.name} status is not idle")
Exception: lmao_chatgpt status is not idle

@vpsbykaif
Copy link
Author

I have to host the lmao api please explain me that.

@chelaxian
Copy link

reinstalled on Ubuntu 22.04 arm64 - same result - "❌ Ошибка: lmao_chatgpt status is not idle"

[2024-03-10 20:05:25] [711618 ] [INFO   ] GPT-Telegramus version: 5.0.1
[2024-03-10 20:05:25] [711618 ] [INFO   ] https://github.com/F33RNI/GPT-Telegramus
[2024-03-10 20:05:25] [711618 ] [INFO   ] Loading config file config.json
[2024-03-10 20:05:25] [711618 ] [INFO   ] Enabled modules: lmao_chatgpt, ms_copilot, ms_copilot_designer, gemini
[2024-03-10 20:05:25] [711618 ] [INFO   ] Parsing module_configs directory
[2024-03-10 20:05:25] [711618 ] [INFO   ] Adding config of lmao_chatgpt module
[2024-03-10 20:05:25] [711618 ] [INFO   ] Adding config of gemini module
[2024-03-10 20:05:25] [711618 ] [INFO   ] Adding config of ms_copilot_designer module
[2024-03-10 20:05:25] [711618 ] [INFO   ] Adding config of ms_copilot module
[2024-03-10 20:05:25] [711618 ] [INFO   ] Parsing langs directory
[2024-03-10 20:05:25] [711618 ] [INFO   ] Loading file bel.json as language with ID bel
[2024-03-10 20:05:25] [711618 ] [INFO   ] Loading file fas.json as language with ID fas
[2024-03-10 20:05:25] [711618 ] [INFO   ] Loading file spa.json as language with ID spa
[2024-03-10 20:05:25] [711618 ] [INFO   ] Loading file eng.json as language with ID eng
[2024-03-10 20:05:25] [711618 ] [INFO   ] Loading file tof.json as language with ID tof
[2024-03-10 20:05:25] [711618 ] [INFO   ] Loading file ukr.json as language with ID ukr
[2024-03-10 20:05:25] [711618 ] [INFO   ] Loading file rus.json as language with ID rus
[2024-03-10 20:05:25] [711618 ] [INFO   ] Loading file ind.json as language with ID ind
[2024-03-10 20:05:25] [711618 ] [INFO   ] Loading file zho.json as language with ID zho
[2024-03-10 20:05:25] [711618 ] [INFO   ] Loaded 9 languages
[2024-03-10 20:05:25] [711618 ] [INFO   ] Trying to load and initialize lmao_chatgpt module
[2024-03-10 20:05:25] [711618 ] [INFO   ] Starting _lmao_process_loop as process
[2024-03-10 20:05:25] [711618 ] [INFO   ] Waiting for lmao_chatgpt initialization to finish
[2024-03-10 20:05:25] [711636 ] [INFO   ] Logging setup is complete for process with PID: 711636
[2024-03-10 20:05:25] [711636 ] [INFO   ] _lmao_process_loop started
[2024-03-10 20:05:25] [711636 ] [INFO   ] Initializing lmao_chatgpt
[2024-03-10 20:05:25] [711636 ] [INFO   ] Initializing chatgpt class object
[2024-03-10 20:05:25] [711636 ] [INFO   ] Loading /root/github/GPT/GPT-Telegramus/venv/lib/python3.10/site-packages/lmao/chatgpt/assistantGetLastMessage.js
[2024-03-10 20:05:25] [711636 ] [INFO   ] Loading /root/github/GPT/GPT-Telegramus/venv/lib/python3.10/site-packages/lmao/chatgpt/conversationSearch.js
[2024-03-10 20:05:25] [711636 ] [INFO   ] Loading cookies from ChatGPT_cookies.json
[2024-03-10 20:05:25] [711636 ] [INFO   ] Loaded 16 cookies
[2024-03-10 20:05:25] [711636 ] [INFO   ] Adding chrome options
[2024-03-10 20:05:25] [711636 ] [INFO   ] Using user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36
[2024-03-10 20:05:25] [711636 ] [INFO   ] Initializing driver in headless mode
[2024-03-10 20:05:25] [711636 ] [INFO   ] patching driver executable /root/.local/share/undetected_chromedriver/undetected_chromedriver
[2024-03-10 20:05:25] [711636 ] [ERROR  ] chatgpt initialization error
Traceback (most recent call last):
  File "/root/github/GPT/GPT-Telegramus/venv/lib/python3.10/site-packages/lmao/module_wrapper.py", line 84, in _initialization_thread
    self._module_class.session_start(**kwargs)
  File "/root/github/GPT/GPT-Telegramus/venv/lib/python3.10/site-packages/lmao/chatgpt/chatgpt_api.py", line 295, in session_start
    raise e
  File "/root/github/GPT/GPT-Telegramus/venv/lib/python3.10/site-packages/lmao/chatgpt/chatgpt_api.py", line 243, in session_start
    self.driver = undetected_chromedriver.Chrome(options=chrome_options, headless=headless, **kwargs)
  File "/root/github/GPT/GPT-Telegramus/venv/lib/python3.10/site-packages/undetected_chromedriver/__init__.py", line 466, in __init__
    super(Chrome, self).__init__(
  File "/root/github/GPT/GPT-Telegramus/venv/lib/python3.10/site-packages/selenium/webdriver/chrome/webdriver.py", line 45, in __init__
    super().__init__(
  File "/root/github/GPT/GPT-Telegramus/venv/lib/python3.10/site-packages/selenium/webdriver/chromium/webdriver.py", line 50, in __init__
    self.service.start()
  File "/root/github/GPT/GPT-Telegramus/venv/lib/python3.10/site-packages/selenium/webdriver/common/service.py", line 98, in start
    self._start_process(self._path)
  File "/root/github/GPT/GPT-Telegramus/venv/lib/python3.10/site-packages/selenium/webdriver/common/service.py", line 208, in _start_process
    self.process = subprocess.Popen(
  File "/usr/lib/python3.10/subprocess.py", line 971, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1863, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: '/root/.local/share/undetected_chromedriver/undetected_chromedriver'
[2024-03-10 20:05:25] [711636 ] [INFO   ] lmao_chatgpt initialization finished
[2024-03-10 20:05:25] [711636 ] [INFO   ] _lmao_stop_stream_loop started
[2024-03-10 20:05:25] [711618 ] [INFO   ] lmao_chatgpt initialization finished
[2024-03-10 20:05:25] [711618 ] [INFO   ] Trying to load and initialize ms_copilot module
[2024-03-10 20:05:25] [711618 ] [INFO   ] Trying to load and initialize ms_copilot_designer module
[2024-03-10 20:05:25] [711618 ] [INFO   ] Trying to load and initialize gemini module
[2024-03-10 20:05:25] [711618 ] [INFO   ] Starting _queue_processing_loop thread
[2024-03-10 20:05:25] [711618 ] [INFO   ] _queue_processing_loop thread started
[2024-03-10 20:05:25] [711618 ] [WARNING] Error stopping current event loop: no running event loop
[2024-03-10 20:05:25] [711618 ] [INFO   ] Creating a new event loop
[2024-03-10 20:05:25] [711618 ] [INFO   ] Trying to set bot commands
[2024-03-10 20:05:26] [711618 ] [INFO   ] Adding user command handlers
[2024-03-10 20:05:26] [711618 ] [INFO   ] Adding /lmao_chatgpt command handler
[2024-03-10 20:05:26] [711618 ] [INFO   ] Adding /chatgpt command handler
[2024-03-10 20:05:26] [711618 ] [INFO   ] Adding /dalle command handler
[2024-03-10 20:05:26] [711618 ] [INFO   ] Adding /ms_copilot command handler
[2024-03-10 20:05:26] [711618 ] [INFO   ] Adding /ms_copilot_designer command handler
[2024-03-10 20:05:26] [711618 ] [INFO   ] Adding /gemini command handler
[2024-03-10 20:05:26] [711618 ] [INFO   ] Adding message handlers
[2024-03-10 20:05:26] [711618 ] [INFO   ] Adding admin command handlers
[2024-03-10 20:05:26] [711618 ] [INFO   ] Adding unknown command handler
[2024-03-10 20:05:26] [711618 ] [INFO   ] Adding markup handler
[2024-03-10 20:05:26] [711618 ] [INFO   ] Starting bot polling
[2024-03-10 20:05:26] [711618 ] [INFO   ] Application started



[2024-03-10 20:15:27] [711618 ] [INFO   ] Reading users database from users.json
[2024-03-10 20:15:27] [711618 ] [INFO   ] Reading users database from users.json
[2024-03-10 20:15:27] [711618 ] [INFO   ] Saving users database to users.json
[2024-03-10 20:15:27] [711618 ] [INFO   ] Reading users database from users.json
[2024-03-10 20:15:27] [711618 ] [INFO   ] Saving users database to users.json
[2024-03-10 20:15:27] [711618 ] [INFO   ] Reading users database from users.json
[2024-03-10 20:15:27] [711618 ] [INFO   ] Saving users database to users.json
[2024-03-10 20:15:27] [711618 ] [INFO   ] Text message from X X (7******)
[2024-03-10 20:15:27] [711618 ] [INFO   ] Reading users database from users.json
[2024-03-10 20:15:27] [711618 ] [INFO   ] Reading users database from users.json
[2024-03-10 20:15:27] [711618 ] [INFO   ] Reading users database from users.json
[2024-03-10 20:15:27] [711618 ] [INFO   ] Creating new request-response container
[2024-03-10 20:15:27] [711618 ] [INFO   ] Adding new request to lmao_chatgpt from X X (7******) to the queue
[2024-03-10 20:15:27] [711618 ] [INFO   ] Received request from user 7******
[2024-03-10 20:15:27] [711618 ] [INFO   ] Starting request_processor for lmao_chatgpt
[2024-03-10 20:15:27] [712132 ] [INFO   ] Logging setup is complete for process with PID: 712132
[2024-03-10 20:15:27] [712132 ] [INFO   ] request_processor started
[2024-03-10 20:15:27] [712132 ] [INFO   ] Reading users database from users.json
[2024-03-10 20:15:27] [712132 ] [INFO   ] Reading users database from users.json
[2024-03-10 20:15:27] [712132 ] [INFO   ] Reading users database from users.json
[2024-03-10 20:15:27] [712132 ] [INFO   ] Saving users database to users.json
[2024-03-10 20:15:27] [712132 ] [INFO   ] Reading users database from users.json
[2024-03-10 20:15:27] [712132 ] [INFO   ] Saving users database to users.json
[2024-03-10 20:15:27] [712132 ] [INFO   ] Reading users database from users.json
[2024-03-10 20:15:27] [712132 ] [INFO   ] Saving users database to users.json
[2024-03-10 20:15:27] [712132 ] [INFO   ] Reading users database from users.json
[2024-03-10 20:15:27] [712132 ] [INFO   ] Saving users database to users.json
[2024-03-10 20:15:27] [712132 ] [INFO   ] Reading users database from users.json
[2024-03-10 20:15:27] [712132 ] [INFO   ] Saving users database to users.json
[2024-03-10 20:15:27] [712132 ] [INFO   ] Reading users database from users.json
[2024-03-10 20:15:27] [712132 ] [INFO   ] Reading users database from users.json
[2024-03-10 20:15:28] [712132 ] [INFO   ] Reading users database from users.json
[2024-03-10 20:15:28] [712132 ] [INFO   ] Saving users database to users.json
[2024-03-10 20:15:28] [712132 ] [INFO   ] Reading users database from users.json
[2024-03-10 20:15:28] [712132 ] [INFO   ] Reading users database from users.json
[2024-03-10 20:15:28] [712132 ] [INFO   ] Reading users database from users.json
[2024-03-10 20:15:28] [712132 ] [INFO   ] Reading users database from users.json
[2024-03-10 20:15:28] [712132 ] [ERROR  ] Error processing request
Traceback (most recent call last):
  File "/root/github/GPT/GPT-Telegramus/request_processor.py", line 104, in request_processor
    module.process_request(request_)
  File "/root/github/GPT/GPT-Telegramus/module_wrapper_global.py", line 227, in process_request
    raise Exception(f"{self.name} status is not idle")
Exception: lmao_chatgpt status is not idle
[2024-03-10 20:15:28] [711618 ] [INFO   ] Setting prevent_shutdown_flag
[2024-03-10 20:15:28] [711618 ] [INFO   ] Trying to kill lmao_chatgpt process with PID 712132
[2024-03-10 20:15:29] [711618 ] [INFO   ] Killed? True
[2024-03-10 20:15:29] [711618 ] [INFO   ] Container with ID 274453178 (PID 712132) was removed from the queue

@F33RNI
Copy link
Owner

F33RNI commented Mar 10, 2024

Сlosing this issue because it has nothing to do with GPT-Telegramus

@F33RNI F33RNI closed this as not planned Won't fix, can't repro, duplicate, stale Mar 10, 2024
@F33RNI
Copy link
Owner

F33RNI commented Mar 10, 2024

@F33RNI
Copy link
Owner

F33RNI commented Mar 10, 2024

I'll post a release soon

@F33RNI
Copy link
Owner

F33RNI commented Mar 10, 2024

#148

@F33RNI
Copy link
Owner

F33RNI commented Mar 10, 2024

Please check config in new release

@F33RNI
Copy link
Owner

F33RNI commented Mar 11, 2024

chatgpt initialization error

disable headless mode and see if u get ChatGPT page loaded

@F33RNI F33RNI reopened this Mar 11, 2024
@chelaxian
Copy link

lmao stop works again (it is not driver issue)

[2024-03-20 14:28:21] [480264 ] [INFO   ] Initializing lmao_chatgpt
[2024-03-20 14:28:21] [480264 ] [INFO   ] Initializing chatgpt class object
[2024-03-20 14:28:21] [480264 ] [INFO   ] Loading /root/github/GPT/GPT-Telegramus-old/venv/lib/python3.10/site-packages/lmao/chatgpt/assistantGetLastMessage.js
[2024-03-20 14:28:21] [480264 ] [INFO   ] Loading /root/github/GPT/GPT-Telegramus-old/venv/lib/python3.10/site-packages/lmao/chatgpt/conversationSearch.js
[2024-03-20 14:28:21] [480264 ] [INFO   ] Loading cookies from ChatGPT_cookies.json
[2024-03-20 14:28:21] [480264 ] [INFO   ] Loaded 17 cookies
[2024-03-20 14:28:21] [480264 ] [INFO   ] Adding chrome options
[2024-03-20 14:28:21] [480264 ] [INFO   ] Using user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36
[2024-03-20 14:28:21] [480264 ] [INFO   ] Initializing driver in headless mode
[2024-03-20 14:28:21] [480264 ] [INFO   ] Browser executable path: /usr/bin/chromium-browser
[2024-03-20 14:28:22] [480264 ] [INFO   ] Trying to add 17 cookies
[2024-03-20 14:28:23] [480264 ] [WARNING] Error adding cookie oai-did
[2024-03-20 14:28:23] [480264 ] [WARNING] Error adding cookie oai-allow-ne
[2024-03-20 14:28:23] [480264 ] [INFO   ] Loading https://chat.openai.com/
[2024-03-20 14:28:23] [480264 ] [INFO   ] Waiting for page to load (waiting for prompt-textarea element)
[2024-03-20 14:29:24] [480264 ] [ERROR  ] chatgpt initialization error
Traceback (most recent call last):
  File "/root/github/GPT/GPT-Telegramus-old/venv/lib/python3.10/site-packages/lmao/module_wrapper.py", line 84, in _initialization_thread
    self._module_class.session_start(**kwargs)
  File "/root/github/GPT/GPT-Telegramus-old/venv/lib/python3.10/site-packages/lmao/chatgpt/chatgpt_api.py", line 371, in session_start
    raise e
  File "/root/github/GPT/GPT-Telegramus-old/venv/lib/python3.10/site-packages/lmao/chatgpt/chatgpt_api.py", line 344, in session_start
    self._wait_for_prompt_textarea()
  File "/root/github/GPT/GPT-Telegramus-old/venv/lib/python3.10/site-packages/lmao/chatgpt/chatgpt_api.py", line 765, in _wait_for_prompt_textarea
    WebDriverWait(self.driver, _WAIT_TIMEOUT).until(
  File "/root/github/GPT/GPT-Telegramus-old/venv/lib/python3.10/site-packages/selenium/webdriver/support/wait.py", line 105, in until
    raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message:
Stacktrace:
#0 0xaaaab845a1dc <unknown>
#1 0xaaaab8412b80 <unknown>
#2 0xaaaab82032a0 <unknown>
#3 0xaaaab8235994 <unknown>
#4 0xaaaab8264e44 <unknown>
#5 0xaaaab822bd7c <unknown>
#6 0xaaaab822cc9c <unknown>
#7 0xaaaab84358a8 <unknown>
#8 0xaaaab8445614 <unknown>
#9 0xaaaab84451a8 <unknown>
#10 0xaaaab847f6bc <unknown>
#11 0xaaaab8445ea4 <unknown>
#12 0xaaaab842a780 <unknown>
#13 0xaaaab844fe80 <unknown>
#14 0xaaaab844ffa4 <unknown>
#15 0xaaaab8465964 <unknown>
#16 0xffff817ed5c8 <unknown>
#17 0xffff81855edc <unknown>

@F33RNI
Copy link
Owner

F33RNI commented Mar 21, 2024

Refresh your cookies

@chelaxian
Copy link

i changed paid account to free one, open page in incognito mode (allow cookie-editor to work in incognito) and save cookies, now all works! thanks!

@F33RNI
Copy link
Owner

F33RNI commented Mar 22, 2024

I don't have a paid account (or the desire to buy one), so I can't test the official API. Also, i don’t have much time for this project due to my studies...

@chelaxian
Copy link

chelaxian commented Mar 24, 2024

I don't have a paid account (or the desire to buy one), so I can't test the official API. Also, i don’t have much time for this project due to my studies...

it is ok, no problem. thanks anyway for such great free project. btw, even in paid account we don't want to use official api because of "pay as you go" model of official api. official api balance is not included in 20$ of chat gpt plus subscription, so even with paid account you must pay for official api (more than 20$). So, all we may want with paid account is same - ability to using your unofficial web-reverse-proxy-based api to get not only gpt-3.5 but also gpt-4 in telegram-bot. also i beleive that official paid api is same in free and paid chatgpt subscription.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants