autonomous-app 0.3.13__py3-none-any.whl → 0.3.15__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.
autonomous/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
- __version__ = "0.3.13"
1
+ __version__ = "0.3.15"
2
2
 
3
3
  from dotenv import load_dotenv
4
4
 
@@ -92,9 +92,14 @@ class OpenAIModel(AutoModel):
92
92
  # Upload the user provided file to OpenAI
93
93
  self.tools["file_search"] = {"type": "file_search"}
94
94
  # Create a vector store
95
- if vs := self.client.beta.vector_stores.list().data:
96
- self.vector_store = vs[0].id
97
- else:
95
+ try:
96
+ if vs := self.client.beta.vector_stores.list().data:
97
+ self.vector_store = self.client.beta.vector_stores.retrieve(
98
+ vector_store_id=vs[0].id
99
+ ).id
100
+ else:
101
+ raise openai.NotFoundError(message="No vector store found")
102
+ except openai.NotFoundError:
98
103
  self.vector_store = self.client.beta.vector_stores.create(
99
104
  name="Data Reference",
100
105
  expires_after={"anchor": "last_active_at", "days": 14},
@@ -251,8 +256,8 @@ IMPORTANT: Always use the function 'response' tool to respond to the user with o
251
256
  if run.status in ["failed", "expired", "canceled"]:
252
257
  log(f"==== Error: {run.last_error} ====", _print=True)
253
258
  return None
254
- log("=================== RUN COMPLETED ===================", _print=True)
255
- log(run.status, _print=True)
259
+ # log("=================== RUN COMPLETED ===================", _print=True)
260
+ # log(run.status, _print=True)
256
261
  if run.status == "completed":
257
262
  response = self.client.beta.threads.messages.list(thread_id=thread.id)
258
263
  results = response.data[0].content[0].text.value
@@ -260,8 +265,8 @@ IMPORTANT: Always use the function 'response' tool to respond to the user with o
260
265
  log(f"====Status: {run.status} Error: {run.last_error} ====", _print=True)
261
266
  return None
262
267
 
263
- log(results, _print=True)
264
- log("=================== END REPORT ===================", _print=True)
268
+ # log(results, _print=True)
269
+ # log("=================== END REPORT ===================", _print=True)
265
270
  return results
266
271
 
267
272
  def generate_audio(self, prompt, file_path, **kwargs):
@@ -27,6 +27,29 @@ class AutoModel(Document):
27
27
  def __eq__(self, other):
28
28
  return self.pk == other.pk if other else False
29
29
 
30
+ def __lt__(self, other):
31
+ return self.pk < other.pk if other else False
32
+
33
+ def __gt__(self, other):
34
+ return not (self.pk < other.pk) if other else False
35
+
36
+ def __le__(self, other):
37
+ return self < other or self == other
38
+
39
+ def __ge__(self, other):
40
+ return self > other or self == other
41
+
42
+ def __ne__(self, other):
43
+ return not self == other
44
+
45
+ def __hash__(self):
46
+ return hash(
47
+ (
48
+ self.model_name(),
49
+ self.pk,
50
+ )
51
+ )
52
+
30
53
  @classmethod
31
54
  def auto_pre_init(cls, sender, document, **kwargs):
32
55
  values = kwargs.pop("values", None)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: autonomous-app
3
- Version: 0.3.13
3
+ Version: 0.3.15
4
4
  Summary: Containerized application framework built on Flask with additional libraries and tools for rapid development of web applications.
5
5
  Author-email: Steven A Moore <samoore@binghamton.edu>
6
6
  License: MIT License
@@ -1,4 +1,4 @@
1
- autonomous/__init__.py,sha256=ll33NFkKyFfdiifznSW-JczDhH-SOc3OYD1OXXLCmDk,95
1
+ autonomous/__init__.py,sha256=3ly0yvUWqUwyNdwwspvj_ch1tVo7q7g6d4CJG5PG-ls,95
2
2
  autonomous/cli.py,sha256=z4AaGeWNW_uBLFAHng0J_lfS9v3fXemK1PeT85u4Eo4,42
3
3
  autonomous/logger.py,sha256=NQtgEaTWNAWfLSgqSP7ksXj1GpOuCgoUV711kSMm-WA,2022
4
4
  autonomous/ai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -8,7 +8,7 @@ autonomous/ai/imageagent.py,sha256=Tn02Hk7WX53pqvK-2Xd2xOuyHKaNuAS_yr7lRdct3rc,6
8
8
  autonomous/ai/jsonagent.py,sha256=wlTULEBlrAAb8ELMxik1b7YOgHD4ARmbWLUWc5pgxB8,1197
9
9
  autonomous/ai/textagent.py,sha256=8iVuY-cSJsJgyWKrpCoj46c0MIsB13PFPNYdxSyqlKI,1096
10
10
  autonomous/ai/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
- autonomous/ai/models/openai.py,sha256=Hp_uC_dJys5UGQG2jt3_nk9SKkbwhZofGaoBOil1tXU,11861
11
+ autonomous/ai/models/openai.py,sha256=AQ5OY4XuT8KYinFffoTDDOO9CZ5pJ0DspE1h97_F-FE,12105
12
12
  autonomous/apis/version_control/GHCallbacks.py,sha256=AyiUlYfV5JePi11GVyqYyXoj5UTbPKzS-HRRI94rjJo,1069
13
13
  autonomous/apis/version_control/GHOrganization.py,sha256=mi2livdsGurKiifbvuLwiFbdDzL77IlEfhwEa-tG77I,1155
14
14
  autonomous/apis/version_control/GHRepo.py,sha256=hTFHMkxSbSlVELfh8S6mq6ijkIKPRQO-Q5775ZjRKD4,4622
@@ -46,15 +46,15 @@ autonomous/db/queryset/transform.py,sha256=UhBdDxYR_bWH0ECnaSw9g9YMwgWRZtsRl_q6P
46
46
  autonomous/db/queryset/visitor.py,sha256=AN09lR6hWYUlKJC7G1sktvnWy5hrFnpoQhi58bOXbA4,5470
47
47
  autonomous/model/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
48
48
  autonomous/model/autoattr.py,sha256=eqO3QE17EMRzLvtF74gXefeK1I2N-w6uScpibdChVOw,2254
49
- autonomous/model/automodel.py,sha256=Q5S84TsIXZT4r0AFQS6OQm4oRIMPWWfuUhD0i5gsm7s,6809
49
+ autonomous/model/automodel.py,sha256=_D7s02MUEllJZX3ubpHARlWK8__3CEBT7YCQcypkkhQ,7340
50
50
  autonomous/storage/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
51
51
  autonomous/storage/imagestorage.py,sha256=SmBjBNBlP1ZEjxdOnGVzCHZhbEhMKTUQC2TbpWbejDE,6168
52
52
  autonomous/storage/localstorage.py,sha256=FzrR6O9mMGAZt5dDgqzkeOQVfGRXCygR0kksz2MPpwE,2286
53
53
  autonomous/tasks/__init__.py,sha256=pn7iZ14MhcHUdzcLkfkd4-45wgPP0tXahAz_cFgb_Tg,32
54
54
  autonomous/tasks/autotask.py,sha256=aK5iapDhgcAic3F5ZYMAhNKJkOepj8yWwbMizKDzUwQ,4153
55
55
  autonomous/utils/markdown.py,sha256=tf8vlHARiQO1X_aGbqlYozzP_TbdiDRT9EEP6aFRQo0,2153
56
- autonomous_app-0.3.13.dist-info/LICENSE,sha256=-PHHSuDRkodHo3PEdMkDtoIdmLAOomMq6lsLaOetU8g,1076
57
- autonomous_app-0.3.13.dist-info/METADATA,sha256=Gdalmq-BuE-Ex3UYdsfqw6udsjpKaUYUJsiPu3J1xxI,4189
58
- autonomous_app-0.3.13.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
59
- autonomous_app-0.3.13.dist-info/top_level.txt,sha256=ZyxWWDdbvZekF3UFunxl4BQsVDb_FOW3eTn0vun_jb4,11
60
- autonomous_app-0.3.13.dist-info/RECORD,,
56
+ autonomous_app-0.3.15.dist-info/LICENSE,sha256=-PHHSuDRkodHo3PEdMkDtoIdmLAOomMq6lsLaOetU8g,1076
57
+ autonomous_app-0.3.15.dist-info/METADATA,sha256=CJKOgOPGRwT2u1OrlTOjnyk_lKVGwzm0-Olofu_BNbA,4189
58
+ autonomous_app-0.3.15.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
59
+ autonomous_app-0.3.15.dist-info/top_level.txt,sha256=ZyxWWDdbvZekF3UFunxl4BQsVDb_FOW3eTn0vun_jb4,11
60
+ autonomous_app-0.3.15.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.2.0)
2
+ Generator: setuptools (75.3.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5