Add complete Flask web application with Telegram bot integration, multiple AI provider support (llama.cpp, OpenRouter, z.ai, StepFun), extensive order banks for BDSM-themed gameplay, automated cron scheduling, and responsive web UI with inference parameter controls.
11 KiB
Executable File
11 KiB
Executable File
* Serving Flask app 'app'
* Debug mode: off
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on http://127.0.0.1:5000
Press CTRL+C to quit
127.0.0.1 - - [03/Jul/2026 10:09:41] "GET /ia_ordem HTTP/1.1" 200 -
127.0.0.1 - - [03/Jul/2026 10:10:16] "POST /ia_chat HTTP/1.1" 200 -
127.0.0.1 - - [03/Jul/2026 10:10:46] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [03/Jul/2026 10:10:46] "GET /ia_revisar_cron HTTP/1.1" 200 -
127.0.0.1 - - [03/Jul/2026 10:10:54] "GET /ia_status HTTP/1.1" 200 -
127.0.0.1 - - [03/Jul/2026 10:11:01] "POST /ia_configurar HTTP/1.1" 200 -
127.0.0.1 - - [03/Jul/2026 10:11:03] "GET /ia_status HTTP/1.1" 200 -
Falha ao chamar o OpenRouter (modelo nvidia/nemotron-3-super-120b-a12b:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
Falha ao chamar o OpenRouter (modelo google/gemma-4-26b-a4b-it:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
Falha ao chamar o OpenRouter (modelo openai/gpt-oss-20b:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
Falha ao chamar o OpenRouter (modelo nvidia/nemotron-nano-9b-v2:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
Falha ao chamar o OpenRouter (modelo meta-llama/llama-3.3-70b-instruct:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
Falha ao chamar o OpenRouter (modelo google/gemma-4-31b-it:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
IA indisponivel para chat: Não foi possível falar com o OpenRouter (modelo google/gemma-4-31b-it:free). (401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions)
127.0.0.1 - - [03/Jul/2026 10:11:11] "POST /ia_chat HTTP/1.1" 503 -
127.0.0.1 - - [03/Jul/2026 10:11:57] "POST /ia_configurar HTTP/1.1" 200 -
127.0.0.1 - - [03/Jul/2026 10:11:58] "GET /ia_status HTTP/1.1" 200 -
Falha ao chamar o OpenRouter (modelo poolside/laguna-xs-2.1:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
Falha ao chamar o OpenRouter (modelo nvidia/nemotron-3-super-120b-a12b:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
Falha ao chamar o OpenRouter (modelo google/gemma-4-26b-a4b-it:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
Falha ao chamar o OpenRouter (modelo openai/gpt-oss-20b:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
Falha ao chamar o OpenRouter (modelo nvidia/nemotron-nano-9b-v2:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
Falha ao chamar o OpenRouter (modelo meta-llama/llama-3.3-70b-instruct:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
Falha ao chamar o OpenRouter (modelo google/gemma-4-31b-it:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
IA indisponivel para chat: Não foi possível falar com o OpenRouter (modelo google/gemma-4-31b-it:free). (401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions)
127.0.0.1 - - [03/Jul/2026 10:12:05] "POST /ia_chat HTTP/1.1" 503 -
127.0.0.1 - - [03/Jul/2026 10:12:29] "GET /ia_status HTTP/1.1" 200 -
Falha ao chamar o OpenRouter (modelo poolside/laguna-xs-2.1:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
Falha ao chamar o OpenRouter (modelo nvidia/nemotron-3-super-120b-a12b:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
Falha ao chamar o OpenRouter (modelo google/gemma-4-26b-a4b-it:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
Falha ao chamar o OpenRouter (modelo openai/gpt-oss-20b:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
Falha ao chamar o OpenRouter (modelo nvidia/nemotron-nano-9b-v2:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
Falha ao chamar o OpenRouter (modelo meta-llama/llama-3.3-70b-instruct:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
Falha ao chamar o OpenRouter (modelo google/gemma-4-31b-it:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
IA indisponivel para chat: Não foi possível falar com o OpenRouter (modelo google/gemma-4-31b-it:free). (401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions)
127.0.0.1 - - [03/Jul/2026 10:12:41] "POST /ia_chat HTTP/1.1" 503 -
127.0.0.1 - - [03/Jul/2026 10:13:12] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [03/Jul/2026 10:13:13] "GET /favicon.ico HTTP/1.1" 404 -
127.0.0.1 - - [03/Jul/2026 10:13:13] "GET /ia_revisar_cron HTTP/1.1" 200 -
127.0.0.1 - - [03/Jul/2026 10:13:15] "GET /ia_status HTTP/1.1" 200 -
Falha ao chamar o OpenRouter (modelo poolside/laguna-xs-2.1:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
Falha ao chamar o OpenRouter (modelo nvidia/nemotron-3-super-120b-a12b:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
Falha ao chamar o OpenRouter (modelo google/gemma-4-26b-a4b-it:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
Falha ao chamar o OpenRouter (modelo openai/gpt-oss-20b:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
Falha ao chamar o OpenRouter (modelo nvidia/nemotron-nano-9b-v2:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
Falha ao chamar o OpenRouter (modelo meta-llama/llama-3.3-70b-instruct:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
Falha ao chamar o OpenRouter (modelo google/gemma-4-31b-it:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
IA indisponivel para chat: Não foi possível falar com o OpenRouter (modelo google/gemma-4-31b-it:free). (401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions)
127.0.0.1 - - [03/Jul/2026 10:13:26] "POST /ia_chat HTTP/1.1" 503 -
127.0.0.1 - - [03/Jul/2026 10:14:05] "POST /ia_configurar HTTP/1.1" 200 -
127.0.0.1 - - [03/Jul/2026 10:14:06] "GET /ia_status HTTP/1.1" 200 -
Falha ao chamar o servidor llama.cpp
Traceback (most recent call last):
File "/home/marco/Jogo/venv/lib/python3.11/site-packages/urllib3/connectionpool.py", line 788, in urlopen
response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "/home/marco/Jogo/venv/lib/python3.11/site-packages/urllib3/connectionpool.py", line 534, in _make_request
response = conn.getresponse()
^^^^^^^^^^^^^^^^^^
File "/home/marco/Jogo/venv/lib/python3.11/site-packages/urllib3/connection.py", line 571, in getresponse
httplib_response = super().getresponse()
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/http/client.py", line 1374, in getresponse
response.begin()
File "/usr/lib/python3.11/http/client.py", line 318, in begin
version, status, reason = self._read_status()
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/http/client.py", line 287, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/marco/Jogo/venv/lib/python3.11/site-packages/requests/adapters.py", line 696, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "/home/marco/Jogo/venv/lib/python3.11/site-packages/urllib3/connectionpool.py", line 842, in urlopen
retries = retries.increment(
^^^^^^^^^^^^^^^^^^
File "/home/marco/Jogo/venv/lib/python3.11/site-packages/urllib3/util/retry.py", line 498, in increment
raise reraise(type(error), error, _stacktrace)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/marco/Jogo/venv/lib/python3.11/site-packages/urllib3/util/util.py", line 38, in reraise
raise value.with_traceback(tb)
File "/home/marco/Jogo/venv/lib/python3.11/site-packages/urllib3/connectionpool.py", line 788, in urlopen
response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "/home/marco/Jogo/venv/lib/python3.11/site-packages/urllib3/connectionpool.py", line 534, in _make_request
response = conn.getresponse()
^^^^^^^^^^^^^^^^^^
File "/home/marco/Jogo/venv/lib/python3.11/site-packages/urllib3/connection.py", line 571, in getresponse
httplib_response = super().getresponse()
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/http/client.py", line 1374, in getresponse
response.begin()
File "/usr/lib/python3.11/http/client.py", line 318, in begin
version, status, reason = self._read_status()
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/http/client.py", line 287, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/marco/Jogo/ia_llamacpp.py", line 394, in _chat_completion_llamacpp
resp = requests.post(
^^^^^^^^^^^^^^
File "/home/marco/Jogo/venv/lib/python3.11/site-packages/requests/api.py", line 134, in post
return request("post", url, data=data, json=json, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/marco/Jogo/venv/lib/python3.11/site-packages/requests/api.py", line 71, in request
return session.request(method=method, url=url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/marco/Jogo/venv/lib/python3.11/site-packages/requests/sessions.py", line 651, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/marco/Jogo/venv/lib/python3.11/site-packages/requests/sessions.py", line 784, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/marco/Jogo/venv/lib/python3.11/site-packages/requests/adapters.py", line 711, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
IA indisponivel para chat: Não foi possível falar com o modelo em http://localhost:8080. Verifique se o llama-server está rodando. (('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')))
127.0.0.1 - - [03/Jul/2026 10:16:03] "POST /ia_chat HTTP/1.1" 503 -
* Debug mode: off
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on http://127.0.0.1:5000
Press CTRL+C to quit
127.0.0.1 - - [03/Jul/2026 10:09:41] "GET /ia_ordem HTTP/1.1" 200 -
127.0.0.1 - - [03/Jul/2026 10:10:16] "POST /ia_chat HTTP/1.1" 200 -
127.0.0.1 - - [03/Jul/2026 10:10:46] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [03/Jul/2026 10:10:46] "GET /ia_revisar_cron HTTP/1.1" 200 -
127.0.0.1 - - [03/Jul/2026 10:10:54] "GET /ia_status HTTP/1.1" 200 -
127.0.0.1 - - [03/Jul/2026 10:11:01] "POST /ia_configurar HTTP/1.1" 200 -
127.0.0.1 - - [03/Jul/2026 10:11:03] "GET /ia_status HTTP/1.1" 200 -
Falha ao chamar o OpenRouter (modelo nvidia/nemotron-3-super-120b-a12b:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
Falha ao chamar o OpenRouter (modelo google/gemma-4-26b-a4b-it:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
Falha ao chamar o OpenRouter (modelo openai/gpt-oss-20b:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
Falha ao chamar o OpenRouter (modelo nvidia/nemotron-nano-9b-v2:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
Falha ao chamar o OpenRouter (modelo meta-llama/llama-3.3-70b-instruct:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
Falha ao chamar o OpenRouter (modelo google/gemma-4-31b-it:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
IA indisponivel para chat: Não foi possível falar com o OpenRouter (modelo google/gemma-4-31b-it:free). (401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions)
127.0.0.1 - - [03/Jul/2026 10:11:11] "POST /ia_chat HTTP/1.1" 503 -
127.0.0.1 - - [03/Jul/2026 10:11:57] "POST /ia_configurar HTTP/1.1" 200 -
127.0.0.1 - - [03/Jul/2026 10:11:58] "GET /ia_status HTTP/1.1" 200 -
Falha ao chamar o OpenRouter (modelo poolside/laguna-xs-2.1:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
Falha ao chamar o OpenRouter (modelo nvidia/nemotron-3-super-120b-a12b:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
Falha ao chamar o OpenRouter (modelo google/gemma-4-26b-a4b-it:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
Falha ao chamar o OpenRouter (modelo openai/gpt-oss-20b:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
Falha ao chamar o OpenRouter (modelo nvidia/nemotron-nano-9b-v2:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
Falha ao chamar o OpenRouter (modelo meta-llama/llama-3.3-70b-instruct:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
Falha ao chamar o OpenRouter (modelo google/gemma-4-31b-it:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
IA indisponivel para chat: Não foi possível falar com o OpenRouter (modelo google/gemma-4-31b-it:free). (401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions)
127.0.0.1 - - [03/Jul/2026 10:12:05] "POST /ia_chat HTTP/1.1" 503 -
127.0.0.1 - - [03/Jul/2026 10:12:29] "GET /ia_status HTTP/1.1" 200 -
Falha ao chamar o OpenRouter (modelo poolside/laguna-xs-2.1:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
Falha ao chamar o OpenRouter (modelo nvidia/nemotron-3-super-120b-a12b:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
Falha ao chamar o OpenRouter (modelo google/gemma-4-26b-a4b-it:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
Falha ao chamar o OpenRouter (modelo openai/gpt-oss-20b:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
Falha ao chamar o OpenRouter (modelo nvidia/nemotron-nano-9b-v2:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
Falha ao chamar o OpenRouter (modelo meta-llama/llama-3.3-70b-instruct:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
Falha ao chamar o OpenRouter (modelo google/gemma-4-31b-it:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
IA indisponivel para chat: Não foi possível falar com o OpenRouter (modelo google/gemma-4-31b-it:free). (401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions)
127.0.0.1 - - [03/Jul/2026 10:12:41] "POST /ia_chat HTTP/1.1" 503 -
127.0.0.1 - - [03/Jul/2026 10:13:12] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [03/Jul/2026 10:13:13] "GET /favicon.ico HTTP/1.1" 404 -
127.0.0.1 - - [03/Jul/2026 10:13:13] "GET /ia_revisar_cron HTTP/1.1" 200 -
127.0.0.1 - - [03/Jul/2026 10:13:15] "GET /ia_status HTTP/1.1" 200 -
Falha ao chamar o OpenRouter (modelo poolside/laguna-xs-2.1:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
Falha ao chamar o OpenRouter (modelo nvidia/nemotron-3-super-120b-a12b:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
Falha ao chamar o OpenRouter (modelo google/gemma-4-26b-a4b-it:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
Falha ao chamar o OpenRouter (modelo openai/gpt-oss-20b:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
Falha ao chamar o OpenRouter (modelo nvidia/nemotron-nano-9b-v2:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
Falha ao chamar o OpenRouter (modelo meta-llama/llama-3.3-70b-instruct:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
Falha ao chamar o OpenRouter (modelo google/gemma-4-31b-it:free): 401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions
IA indisponivel para chat: Não foi possível falar com o OpenRouter (modelo google/gemma-4-31b-it:free). (401 Client Error: Unauthorized for url: https://openrouter.ai/api/v1/chat/completions)
127.0.0.1 - - [03/Jul/2026 10:13:26] "POST /ia_chat HTTP/1.1" 503 -
127.0.0.1 - - [03/Jul/2026 10:14:05] "POST /ia_configurar HTTP/1.1" 200 -
127.0.0.1 - - [03/Jul/2026 10:14:06] "GET /ia_status HTTP/1.1" 200 -
Falha ao chamar o servidor llama.cpp
Traceback (most recent call last):
File "/home/marco/Jogo/venv/lib/python3.11/site-packages/urllib3/connectionpool.py", line 788, in urlopen
response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "/home/marco/Jogo/venv/lib/python3.11/site-packages/urllib3/connectionpool.py", line 534, in _make_request
response = conn.getresponse()
^^^^^^^^^^^^^^^^^^
File "/home/marco/Jogo/venv/lib/python3.11/site-packages/urllib3/connection.py", line 571, in getresponse
httplib_response = super().getresponse()
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/http/client.py", line 1374, in getresponse
response.begin()
File "/usr/lib/python3.11/http/client.py", line 318, in begin
version, status, reason = self._read_status()
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/http/client.py", line 287, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/marco/Jogo/venv/lib/python3.11/site-packages/requests/adapters.py", line 696, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "/home/marco/Jogo/venv/lib/python3.11/site-packages/urllib3/connectionpool.py", line 842, in urlopen
retries = retries.increment(
^^^^^^^^^^^^^^^^^^
File "/home/marco/Jogo/venv/lib/python3.11/site-packages/urllib3/util/retry.py", line 498, in increment
raise reraise(type(error), error, _stacktrace)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/marco/Jogo/venv/lib/python3.11/site-packages/urllib3/util/util.py", line 38, in reraise
raise value.with_traceback(tb)
File "/home/marco/Jogo/venv/lib/python3.11/site-packages/urllib3/connectionpool.py", line 788, in urlopen
response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "/home/marco/Jogo/venv/lib/python3.11/site-packages/urllib3/connectionpool.py", line 534, in _make_request
response = conn.getresponse()
^^^^^^^^^^^^^^^^^^
File "/home/marco/Jogo/venv/lib/python3.11/site-packages/urllib3/connection.py", line 571, in getresponse
httplib_response = super().getresponse()
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/http/client.py", line 1374, in getresponse
response.begin()
File "/usr/lib/python3.11/http/client.py", line 318, in begin
version, status, reason = self._read_status()
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/http/client.py", line 287, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/marco/Jogo/ia_llamacpp.py", line 394, in _chat_completion_llamacpp
resp = requests.post(
^^^^^^^^^^^^^^
File "/home/marco/Jogo/venv/lib/python3.11/site-packages/requests/api.py", line 134, in post
return request("post", url, data=data, json=json, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/marco/Jogo/venv/lib/python3.11/site-packages/requests/api.py", line 71, in request
return session.request(method=method, url=url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/marco/Jogo/venv/lib/python3.11/site-packages/requests/sessions.py", line 651, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/marco/Jogo/venv/lib/python3.11/site-packages/requests/sessions.py", line 784, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/marco/Jogo/venv/lib/python3.11/site-packages/requests/adapters.py", line 711, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
IA indisponivel para chat: Não foi possível falar com o modelo em http://localhost:8080. Verifique se o llama-server está rodando. (('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')))
127.0.0.1 - - [03/Jul/2026 10:16:03] "POST /ia_chat HTTP/1.1" 503 -