sinapsis 0.2.0__tar.gz → 0.2.1__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sinapsis
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: Modular and Universal AI platform
5
5
  Author-email: SinapsisAI <dev@sinapsis.tech>
6
6
  License: GNU AFFERO GENERAL PUBLIC LICENSE
@@ -671,9 +671,11 @@ Project-URL: Tutorials, https://docs.sinapsis.tech/tutorials
671
671
  Project-URL: Repository, https://github.com/Sinapsis-AI/sinapsis.git
672
672
  Requires-Python: >=3.10
673
673
  Description-Content-Type: text/markdown
674
+ License-File: LICENSE
674
675
  Requires-Dist: sinapsis-core>=0.1.0
675
676
  Provides-Extra: all
676
677
  Requires-Dist: sinapsis[dev]; extra == "all"
678
+ Dynamic: license-file
677
679
 
678
680
  <h1 align="center">
679
681
  <br>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "sinapsis"
3
- version = "0.2.0"
3
+ version = "0.2.1"
4
4
  description = "Modular and Universal AI platform"
5
5
  authors = [
6
6
  {name = "SinapsisAI", email = "dev@sinapsis.tech"},
@@ -59,10 +59,6 @@ sinapsis-core = { index = "sinapsis-core" }
59
59
  name = "sinapsis-core"
60
60
  url = "https://pypi.sinapsis.tech/"
61
61
 
62
-
63
- [tool.setuptools]
64
- license-files = []
65
-
66
62
  [build-system]
67
63
  requires = ["setuptools"]
68
64
  build-backend = "setuptools.build_meta"
@@ -8,6 +8,7 @@ from pydantic.dataclasses import dataclass
8
8
  from sinapsis_core.cli.run_agent_from_config import generic_agent_builder
9
9
  from sinapsis_core.data_containers.data_packet import DataContainer, TextPacket
10
10
  from sinapsis_core.utils.env_var_keys import SINAPSIS_CACHE_DIR
11
+ from sinapsis_core.utils.logging_utils import sinapsis_logger
11
12
 
12
13
  from sinapsis.webapp.agent_gradio_helper import add_logo_and_title, css_header
13
14
 
@@ -168,7 +169,9 @@ class BaseChatbot:
168
169
  Returns:
169
170
  tuple: A tuple with None and Gradio updates for interactivity.
170
171
  """
171
- self._clear_history()
172
+ with open(self.file_name, "w+", encoding="utf-8") as chat:
173
+ json.dump(self.chat_history, chat, indent=4)
174
+ chat.close()
172
175
  self.agent = None
173
176
  return gr.update(interactive=False), gr.update(interactive=False)
174
177
 
@@ -179,10 +182,11 @@ class BaseChatbot:
179
182
  This method writes the current chat history to a file in JSON format,
180
183
  then clears the history.
181
184
  """
182
- with open(self.file_name, "w+", encoding="utf-8") as chat:
183
- json.dump(self.chat_history, chat, indent=4)
184
- chat.close()
185
185
  self.chat_history = []
186
+ try:
187
+ os.remove(self.file_name)
188
+ except FileNotFoundError:
189
+ sinapsis_logger.warning("Chat history file does not exist")
186
190
 
187
191
  def process_msg(self, message: str, conv_id: str) -> tuple[list, gr.Textbox, gr.Audio, str] | list:
188
192
  """
@@ -236,7 +240,6 @@ class BaseChatbot:
236
240
  """
237
241
 
238
242
  conversation_id = gr.State()
239
-
240
243
  (
241
244
  chatbot,
242
245
  chat_input,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sinapsis
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: Modular and Universal AI platform
5
5
  Author-email: SinapsisAI <dev@sinapsis.tech>
6
6
  License: GNU AFFERO GENERAL PUBLIC LICENSE
@@ -671,9 +671,11 @@ Project-URL: Tutorials, https://docs.sinapsis.tech/tutorials
671
671
  Project-URL: Repository, https://github.com/Sinapsis-AI/sinapsis.git
672
672
  Requires-Python: >=3.10
673
673
  Description-Content-Type: text/markdown
674
+ License-File: LICENSE
674
675
  Requires-Dist: sinapsis-core>=0.1.0
675
676
  Provides-Extra: all
676
677
  Requires-Dist: sinapsis[dev]; extra == "all"
678
+ Dynamic: license-file
677
679
 
678
680
  <h1 align="center">
679
681
  <br>
File without changes
File without changes
File without changes