chibi-bot 1.6.0b2__py3-none-any.whl → 1.6.0b3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
chibi/service.py CHANGED
@@ -5,6 +5,8 @@ import sys
5
5
  from pathlib import Path
6
6
  from typing import Optional
7
7
 
8
+ from dotenv import dotenv_values
9
+
8
10
 
9
11
  class Service:
10
12
  """Service management for the Chibi bot."""
@@ -23,6 +25,7 @@ class Service:
23
25
  home = Path.home()
24
26
  self.pid_path = pid_path or str(home / ".chibi" / "chibi.pid")
25
27
  self.log_path = log_path or str(home / ".chibi" / "logs" / "chibi.log")
28
+ self.settings_path = home / ".chibi" / "settings"
26
29
 
27
30
  def _ensure_directories(self) -> None:
28
31
  """Ensure required directories exist."""
@@ -83,6 +86,12 @@ class Service:
83
86
  except OSError:
84
87
  pass
85
88
 
89
+ envs = os.environ.copy()
90
+
91
+ if self.settings_path.exists():
92
+ settings = dotenv_values(self.settings_path)
93
+ envs.update(settings)
94
+
86
95
  try:
87
96
  # Start the bot process in background
88
97
  with open(self.log_path, "a") as log_file:
@@ -91,6 +100,7 @@ class Service:
91
100
  stdout=log_file,
92
101
  stderr=log_file,
93
102
  start_new_session=True, # Create new process group (Unix)
103
+ env=envs,
94
104
  )
95
105
  self._write_pid(process.pid)
96
106
  print(f"Service started (PID: {process.pid}).")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: chibi-bot
3
- Version: 1.6.0b2
3
+ Version: 1.6.0b3
4
4
  Summary: An asynchronous Telegram bot providing access to various LLMs (OpenAI, Gemini, Anthropic, etc.) and image generation models, featuring context management and built-in tools for web search, news retrieval, and reading web pages.
5
5
  License: MIT
6
6
  Author: Sergei Nagaev
@@ -16,7 +16,7 @@ chibi/schemas/app.py,sha256=suFcNbSEkXztpyOQdaXCCw7YWwUEy4mZdMF_Kshhd34,1339
16
16
  chibi/schemas/cloudflare.py,sha256=1dV3kzBfc-Yb2F4f9RhfuJ-_s5mz6hbPXfOf4pG_C34,1147
17
17
  chibi/schemas/mistralai.py,sha256=gMKz3BK8wBNuKGJddjJHv5huexXvd_TwkeCJYeq8f_g,1101
18
18
  chibi/schemas/suno.py,sha256=Tox3u66FUAwrKaqI94jskCOwSHhF_0KoY0XZTX8EnPI,2054
19
- chibi/service.py,sha256=93cgM2wozk3mKYJhYFemrq4YA7qf214zbhMpHGa3l2I,4157
19
+ chibi/service.py,sha256=yNsaDjxAdwnGcQCa40D3EMyiUQeZmbXu77tfADiwfnU,4445
20
20
  chibi/services/bot.py,sha256=wW1ikKdlsrM39GWIy3ld_1DE_udrU7fjk0SMvl7AfOk,11096
21
21
  chibi/services/lock_manager.py,sha256=ZVoNEvTOrtYNlSVxCSVph02-fyfCwlr3thZBCdyv-_I,660
22
22
  chibi/services/mcp/manager.py,sha256=7-th6gjZeKTMtCJB7YPLCIkFFQoXsJGni2WOJg9n1ZA,9094
@@ -63,8 +63,8 @@ chibi/storage/redis.py,sha256=VOEINsJB0WBTa6uQqU9lJ3rLJzD7kLUCrOI9papangY,3450
63
63
  chibi/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
64
64
  chibi/utils/app.py,sha256=Yb5kgN8X0OLUOTFF-mzD6IopuSYqYdgdICPS4JJ7BhU,9544
65
65
  chibi/utils/telegram.py,sha256=ljsO_6j6_auC5tJge38wXtb_ZG63jMzJXnerOFXwjqw,18820
66
- chibi_bot-1.6.0b2.dist-info/LICENSE,sha256=k48aK3n_wyK3uTYQD8tuDkYTe4qYIUuQ3xj6vkH6BB4,1070
67
- chibi_bot-1.6.0b2.dist-info/METADATA,sha256=ILLzjCFQvhkl0uJtg7m0VrrVRESUgh1ks3Qbt33BfNE,11689
68
- chibi_bot-1.6.0b2.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
69
- chibi_bot-1.6.0b2.dist-info/entry_points.txt,sha256=hpCAnrIIWYbxdkZGxcPZZfOxWGU7130VmM8r9YjfgHE,40
70
- chibi_bot-1.6.0b2.dist-info/RECORD,,
66
+ chibi_bot-1.6.0b3.dist-info/LICENSE,sha256=k48aK3n_wyK3uTYQD8tuDkYTe4qYIUuQ3xj6vkH6BB4,1070
67
+ chibi_bot-1.6.0b3.dist-info/METADATA,sha256=nTZ6c1zX3CgpcFTLiWELtKf5T5YakspyBjYkaB45yjg,11689
68
+ chibi_bot-1.6.0b3.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
69
+ chibi_bot-1.6.0b3.dist-info/entry_points.txt,sha256=hpCAnrIIWYbxdkZGxcPZZfOxWGU7130VmM8r9YjfgHE,40
70
+ chibi_bot-1.6.0b3.dist-info/RECORD,,