autonomous-app 0.3.5__py3-none-any.whl → 0.3.6__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.5"
1
+ __version__ = "0.3.6"
2
2
 
3
3
  from dotenv import load_dotenv
4
4
 
@@ -0,0 +1,23 @@
1
+ from autonomous import log
2
+ from autonomous.model.autoattr import ReferenceAttr
3
+ from autonomous.model.automodel import AutoModel
4
+
5
+ from .models.openai import OpenAIModel
6
+
7
+
8
+ # class BaseAgent(AutoModel):
9
+ # client_model = ReferenceAttr(choices=[OpenAIModel])
10
+ # _ai_model = OpenAIModel
11
+
12
+ # @property
13
+ # def client(self):
14
+ # if self.client_model is None:
15
+ # self.client_model = self._ai_model()
16
+ # self.save()
17
+ # return self.client_model
18
+
19
+ # def clear_files(self, file_id=None):
20
+ # return self.client.clear_files(file_id)
21
+
22
+ # def attach_file(self, file_contents, filename="dbdata.json"):
23
+ # return self.client.attach_file(file_contents, filename)
@@ -18,6 +18,12 @@ class JSONAgent(AutoModel):
18
18
 
19
19
  _ai_model = OpenAIModel
20
20
 
21
+ def clear_files(self, file_id=None):
22
+ return self.client.clear_files(file_id)
23
+
24
+ def attach_file(self, file_contents, filename="dbdata.json"):
25
+ return self.client.attach_file(file_contents, filename)
26
+
21
27
  def get_client(self):
22
28
  if self.client is None:
23
29
  self.client = self._ai_model(
@@ -17,6 +17,12 @@ class TextAgent(AutoModel):
17
17
 
18
18
  _ai_model = OpenAIModel
19
19
 
20
+ def clear_files(self, file_id=None):
21
+ return self.client.clear_files(file_id)
22
+
23
+ def attach_file(self, file_contents, filename="dbdata.json"):
24
+ return self.client.attach_file(file_contents, filename)
25
+
20
26
  def get_client(self):
21
27
  if self.client is None:
22
28
  self.client = self._ai_model(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: autonomous-app
3
- Version: 0.3.5
3
+ Version: 0.3.6
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,12 +1,12 @@
1
- autonomous/__init__.py,sha256=Ie-rGZ4SZXAODsPeZELvNjjOd3RVllgErbeckM7K81E,94
1
+ autonomous/__init__.py,sha256=ck3NfZ-MewpMbO0gQY4n2pUZ0rwO6-GzhadYT5LGPZ0,94
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
5
5
  autonomous/ai/audioagent.py,sha256=uZEhJ8_ctEvzshxJewaGdw-gh2Ts8lIcEysh0rlL62w,1040
6
+ autonomous/ai/baseagent.py,sha256=Wfo0n0M9_eCSb9s0QbFelDlANH-o1lgZiRXZf7VeOP0,710
6
7
  autonomous/ai/imageagent.py,sha256=Y3n4OFD-UC9lSg1j-U9wRnyLLaRl0LjibHbriJwYF2c,981
7
- autonomous/ai/jsonagent.py,sha256=P5HGuN7r7whgryZ2oCvSRY7jQlq0FdDK3-DtdnUG_N0,1321
8
- autonomous/ai/oaiagent.py,sha256=Zrd4iijGfkFsF1Dbhhj0SeHoezec3kae8CrFrZQeqXQ,1346
9
- autonomous/ai/textagent.py,sha256=pYzuoE7ENsxXjTSoVRMGvy7KQK0cS50SlWpY-1r7PiY,1220
8
+ autonomous/ai/jsonagent.py,sha256=gJVFFKuH6yBiSG0U1WBCyjDeT7kCvW3bxeU6TpkhPLM,1542
9
+ autonomous/ai/textagent.py,sha256=bi9v5pawylY6p43wYoaAEs-qyMOskFBnR21-_lJo7Aw,1441
10
10
  autonomous/ai/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  autonomous/ai/models/openai.py,sha256=npavtBRWaxZuO3EtdFK1pm64wporJcTb_JDdxhMyhPI,11732
12
12
  autonomous/apis/version_control/GHCallbacks.py,sha256=AyiUlYfV5JePi11GVyqYyXoj5UTbPKzS-HRRI94rjJo,1069
@@ -53,8 +53,8 @@ autonomous/storage/localstorage.py,sha256=FzrR6O9mMGAZt5dDgqzkeOQVfGRXCygR0kksz2
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.5.dist-info/LICENSE,sha256=-PHHSuDRkodHo3PEdMkDtoIdmLAOomMq6lsLaOetU8g,1076
57
- autonomous_app-0.3.5.dist-info/METADATA,sha256=kytfTSGcjr-XpafI0e0EHlS5vYvv2GBP3_r4Degu-_Y,4188
58
- autonomous_app-0.3.5.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
59
- autonomous_app-0.3.5.dist-info/top_level.txt,sha256=ZyxWWDdbvZekF3UFunxl4BQsVDb_FOW3eTn0vun_jb4,11
60
- autonomous_app-0.3.5.dist-info/RECORD,,
56
+ autonomous_app-0.3.6.dist-info/LICENSE,sha256=-PHHSuDRkodHo3PEdMkDtoIdmLAOomMq6lsLaOetU8g,1076
57
+ autonomous_app-0.3.6.dist-info/METADATA,sha256=ajsTZtRvoAcYIKkpCY9LzErGogE-T2rtw8M0NsPlJok,4188
58
+ autonomous_app-0.3.6.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
59
+ autonomous_app-0.3.6.dist-info/top_level.txt,sha256=ZyxWWDdbvZekF3UFunxl4BQsVDb_FOW3eTn0vun_jb4,11
60
+ autonomous_app-0.3.6.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (74.1.2)
2
+ Generator: setuptools (75.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
autonomous/ai/oaiagent.py DELETED
@@ -1,40 +0,0 @@
1
- from autonomous import log
2
- from autonomous.model.autoattr import ReferenceAttr
3
- from autonomous.model.automodel import AutoModel
4
-
5
- from .models.openai import OpenAIModel
6
-
7
-
8
- class OAIAgent(AutoModel):
9
- client_model = ReferenceAttr(choices=[OpenAIModel])
10
- _ai_model = OpenAIModel
11
-
12
- @property
13
- def client(self):
14
- if self.client_model is None:
15
- self.client_model = self._ai_model()
16
- self.save()
17
- return self.client_model
18
-
19
- def clear_files(self, file_id=None):
20
- return self.client.clear_files(file_id)
21
-
22
- def attach_file(self, file_contents, filename="dbdata.json"):
23
- return self.client.attach_file(file_contents, filename)
24
-
25
- def generate(self, messages, function=None, additional_instructions=""):
26
- if function is None:
27
- return self.client.generate_text(messages, additional_instructions)
28
- else:
29
- return self.client.generate_json(
30
- messages, function, additional_instructions
31
- )
32
-
33
- def generate_audio(self, prompt, file_path, **kwargs):
34
- return self.client.generate_audio(self, file_path, **kwargs)
35
-
36
- def generate_image(self, prompt, **kwargs):
37
- return self.client.generate_image(prompt, **kwargs)
38
-
39
- def summarize_text(self, text, primer=""):
40
- return self.client.generate_image(text, primer)