uagents-core 0.3.0__py3-none-any.whl → 0.3.1__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.
uagents_core/storage.py CHANGED
@@ -56,13 +56,13 @@ class ExternalStorage:
56
56
  raise RuntimeError("No identity or API token available for authentication")
57
57
 
58
58
  def upload(
59
- self, asset_id: str, asset_content: str, mime_type: str = "text/plain"
59
+ self, asset_id: str, asset_content: bytes, mime_type: str = "text/plain"
60
60
  ) -> dict:
61
61
  url = f"{self.storage_url}/assets/{asset_id}/contents/"
62
62
  headers = self._get_auth_header()
63
63
  headers["Content-Type"] = "application/json"
64
64
  payload = {
65
- "contents": base64.b64encode(asset_content.encode()).decode(),
65
+ "contents": base64.b64encode(content).decode(),
66
66
  "mime_type": mime_type,
67
67
  }
68
68
  response = requests.put(url, json=payload, headers=headers)
@@ -88,7 +88,7 @@ class ExternalStorage:
88
88
  def create_asset(
89
89
  self,
90
90
  name: str,
91
- content: str,
91
+ content: bytes,
92
92
  mime_type: str = "text/plain",
93
93
  lifetime_hours: int = 24,
94
94
  ) -> str:
@@ -100,7 +100,7 @@ class ExternalStorage:
100
100
  payload = {
101
101
  "name": name,
102
102
  "mime_type": mime_type,
103
- "contents": base64.b64encode(content.encode()).decode(),
103
+ "contents": base64.b64encode(content).decode(),
104
104
  "lifetime_hours": lifetime_hours,
105
105
  }
106
106
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: uagents-core
3
- Version: 0.3.0
3
+ Version: 0.3.1
4
4
  Summary: Core components for agent based systems
5
5
  License: Apache 2.0
6
6
  Author: Ed FitzGerald
@@ -11,12 +11,12 @@ uagents_core/logger.py,sha256=5XLs3-XpKDeoSwtAE5pEM9h6x3pUPNbb0T0J7KvFmG0,877
11
11
  uagents_core/models.py,sha256=fxsFjRochkJUdgPltT1HWgBl-9K-HVQWl8sSMVgeJFY,1066
12
12
  uagents_core/protocol.py,sha256=T9jasOkltne33E16Y7VrqcB2moWVsv-Qh4XLZotyz8g,5428
13
13
  uagents_core/registration.py,sha256=h7ha58H7XbLQ__qOHMKVnHShzMlWfd2xrK9fRdgfb9w,2953
14
- uagents_core/storage.py,sha256=A7s2jJhdbDI0aNKAcjJpL5oxcYrb2FnHhXGwlAt3RY4,4506
14
+ uagents_core/storage.py,sha256=SKcK9_m7KNyIu7THFbK41DEoP2CmjTjKGKch_bUQ-MY,4486
15
15
  uagents_core/types.py,sha256=_W3EN1wEIRFxuhhBxyZxQH_dA_3AtoPPReIzrgcTUHc,1167
16
16
  uagents_core/utils/__init__.py,sha256=v0MaxDYCTtQlwbblEHCfLtbeTnA2hCmKKJk7mlcE20U,135
17
17
  uagents_core/utils/messages.py,sha256=5o3ahVaeGwzWMAxDs0fl2pC1duDq2VS_-czoVtZpkOc,5066
18
18
  uagents_core/utils/registration.py,sha256=HaA0J2yisx0bwVs1LbpJ4UP3-maeeAf37yziI-U07l8,9067
19
19
  uagents_core/utils/resolver.py,sha256=X18oe-WPU_6pfTc6x_Oa69kZQYCMidkaSeCs68Poaik,2169
20
- uagents_core-0.3.0.dist-info/METADATA,sha256=SpfzcsoEMP44pjC4tRmjq0kx8UHr-KPSZ4kZGG6jp8A,1009
21
- uagents_core-0.3.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
22
- uagents_core-0.3.0.dist-info/RECORD,,
20
+ uagents_core-0.3.1.dist-info/METADATA,sha256=5ZoG4P9uYXSasuvixsWiUJGTMbHbSaRUQ3U_zUORSUc,1009
21
+ uagents_core-0.3.1.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
22
+ uagents_core-0.3.1.dist-info/RECORD,,