autonomous-app 0.2.19__py3-none-any.whl → 0.2.20__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.2.19"
1
+ __version__ = "0.2.20"
2
2
 
3
3
  from .logger import log
4
4
  from .model.automodel import AutoModel
autonomous/ai/oaiagent.py CHANGED
@@ -130,6 +130,7 @@ class OAIAgent(AutoModel):
130
130
  thread_id=thread.id,
131
131
  assistant_id=self.agent_id,
132
132
  additional_instructions=_instructions_addition,
133
+ parallel_tool_calls=False,
133
134
  )
134
135
 
135
136
  while run.status in ["queued", "in_progress"]:
@@ -139,27 +140,37 @@ class OAIAgent(AutoModel):
139
140
  )
140
141
  time.sleep(0.5)
141
142
  log(f"==== Job Status: {run.status} ====")
143
+ print(f"==== Job Status: {run.status} ====")
142
144
 
143
145
  if run.status in ["failed", "expired", "canceled"]:
144
146
  log(f"==== Error: {run.last_error} ====")
147
+ print(f"==== Error: {run.last_error} ====")
145
148
  return None
146
-
149
+ print("=================== RUN COMPLETED ===================")
150
+ print(run.status)
147
151
  if run.status == "completed":
148
152
  response = self.client.beta.threads.messages.list(thread_id=thread.id)
149
- result = response.data[0].content[0].text.value
153
+ results = response.data[0].content[0].text.value
150
154
  elif run.status == "requires_action":
151
155
  results = run.required_action.submit_tool_outputs.tool_calls[
152
156
  0
153
157
  ].function.arguments
154
- result = results[results.find("{") : results.rfind("}") + 1]
155
- try:
156
- result = json.loads(result, strict=False)
157
- except Exception:
158
- log(f"==== Invalid JSON:\n{result}")
159
158
  else:
160
159
  log(f"====Status: {run.status} Error: {run.last_error} ====")
160
+ print(f"====Status: {run.status} Error: {run.last_error} ====")
161
161
  return None
162
- return result
162
+
163
+ if function:
164
+ results = results[results.find("{") : results.rfind("}") + 1]
165
+ try:
166
+ results = json.loads(results, strict=False)
167
+ except Exception:
168
+ print(f"==== Invalid JSON:\n{results}")
169
+ log(f"==== Invalid JSON:\n{results}")
170
+
171
+ print(results)
172
+ print("=================== END REPORT ===================")
173
+ return results
163
174
 
164
175
  def generate_audio(self, prompt, file_path, **kwargs):
165
176
  voice = kwargs.get("voice") or random.choice(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: autonomous-app
3
- Version: 0.2.19
3
+ Version: 0.2.20
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,8 +1,8 @@
1
- autonomous/__init__.py,sha256=oDsDNe2n6SEIsx41D8osz_TCWX7CFSxlVvmZIb4PzM4,87
1
+ autonomous/__init__.py,sha256=CAcabf5siF1e0oz0VdeV1ce2MDbyIh-gKMriYRJGxOI,87
2
2
  autonomous/cli.py,sha256=z4AaGeWNW_uBLFAHng0J_lfS9v3fXemK1PeT85u4Eo4,42
3
3
  autonomous/logger.py,sha256=jePQ4kTtECTwGtIcDmpLSE6rSwhaUEiQe2vK06h5XIg,1915
4
4
  autonomous/ai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
- autonomous/ai/oaiagent.py,sha256=jOfAK6FIJN2n8CKrcrAcL8t1Jh5bgxk4bnBt0NwTXBE,7197
5
+ autonomous/ai/oaiagent.py,sha256=73gBZqlYTL8i7WuUrhu-G4JflzBDVdhragj9PvBkyKM,7697
6
6
  autonomous/auth/__init__.py,sha256=IW5tQ8VYwHIbDfMYA0wYgx4PprwcjUWV4EoIJ8HTlMU,161
7
7
  autonomous/auth/autoauth.py,sha256=Q2DfcWjh0vTSSpf5SqyK4SElVDcxu8435GhLSPqTYco,3724
8
8
  autonomous/auth/github.py,sha256=dHf84bJdV9rXGcvRLzWCPW9CvuA-VEmqYi_QQFwd2kY,886
@@ -29,8 +29,8 @@ autonomous/storage/version_control/GHVersionControl.py,sha256=VIhVRxe6gJgozFWyhy
29
29
  autonomous/storage/version_control/__init__.py,sha256=tP0bAWYl1RwBRi62HsIidmgyqHuSlCUqwGuKUKKRugc,117
30
30
  autonomous/tasks/__init__.py,sha256=pn7iZ14MhcHUdzcLkfkd4-45wgPP0tXahAz_cFgb_Tg,32
31
31
  autonomous/tasks/autotask.py,sha256=_WQ8w1LyV2FVJ0Ct0FoF9q1W8ClXfS57-omnBb0LNWE,4910
32
- autonomous_app-0.2.19.dist-info/LICENSE,sha256=-PHHSuDRkodHo3PEdMkDtoIdmLAOomMq6lsLaOetU8g,1076
33
- autonomous_app-0.2.19.dist-info/METADATA,sha256=jVxFgZdhBn-NaDeY2X-59QSJyoazF4q8WXCadiYLpxs,4229
34
- autonomous_app-0.2.19.dist-info/WHEEL,sha256=cpQTJ5IWu9CdaPViMhC9YzF8gZuS5-vlfoFihTBC86A,91
35
- autonomous_app-0.2.19.dist-info/top_level.txt,sha256=ZyxWWDdbvZekF3UFunxl4BQsVDb_FOW3eTn0vun_jb4,11
36
- autonomous_app-0.2.19.dist-info/RECORD,,
32
+ autonomous_app-0.2.20.dist-info/LICENSE,sha256=-PHHSuDRkodHo3PEdMkDtoIdmLAOomMq6lsLaOetU8g,1076
33
+ autonomous_app-0.2.20.dist-info/METADATA,sha256=nRSPe8h9HOIDj7Eb2rSIuCs1XzKBQ5zOLLcgxq7bi_E,4229
34
+ autonomous_app-0.2.20.dist-info/WHEEL,sha256=mguMlWGMX-VHnMpKOjjQidIo1ssRlCFu4a4mBpz1s2M,91
35
+ autonomous_app-0.2.20.dist-info/top_level.txt,sha256=ZyxWWDdbvZekF3UFunxl4BQsVDb_FOW3eTn0vun_jb4,11
36
+ autonomous_app-0.2.20.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (70.1.0)
2
+ Generator: setuptools (70.1.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5