simile 0.3.4__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.

Potentially problematic release.


This version of simile might be problematic. Click here for more details.

simile/client.py CHANGED
@@ -233,11 +233,36 @@ class Simile:
233
233
  )
234
234
  return response_data
235
235
 
236
+ async def add_agent_to_population(
237
+ self, agent_id: Union[str, uuid.UUID], population_id: Union[str, uuid.UUID]
238
+ ) -> Dict[str, str]:
239
+ """Add an agent to an additional population."""
240
+ raw_response = await self._request(
241
+ "POST", f"agents/{str(agent_id)}/populations/{str(population_id)}"
242
+ )
243
+ return raw_response.json()
244
+
245
+ async def remove_agent_from_population(
246
+ self, agent_id: Union[str, uuid.UUID], population_id: Union[str, uuid.UUID]
247
+ ) -> Dict[str, str]:
248
+ """Remove an agent from a population."""
249
+ raw_response = await self._request(
250
+ "DELETE", f"agents/{str(agent_id)}/populations/{str(population_id)}"
251
+ )
252
+ return raw_response.json()
253
+
254
+ async def get_populations_for_agent(
255
+ self, agent_id: Union[str, uuid.UUID]
256
+ ) -> Dict[str, Any]:
257
+ """Get all populations an agent belongs to."""
258
+ raw_response = await self._request("GET", f"agents/{str(agent_id)}/populations")
259
+ return raw_response.json()
260
+
236
261
  async def create_data_item(
237
- self, agent_id: Union[str, uuid.UUID], data_type: str, content: Any
262
+ self, agent_id: Union[str, uuid.UUID], data_type: str, content: Any, metadata: Optional[Dict[str, Any]] = None
238
263
  ) -> DataItem:
239
264
  """Creates a new data item for a specific agent."""
240
- payload = CreateDataItemPayload(data_type=data_type, content=content)
265
+ payload = CreateDataItemPayload(data_type=data_type, content=content, metadata=metadata)
241
266
  response_data = await self._request(
242
267
  "POST",
243
268
  f"data_item/create/{str(agent_id)}",
simile/models.py CHANGED
@@ -57,6 +57,7 @@ class CreateAgentPayload(BaseModel):
57
57
  class CreateDataItemPayload(BaseModel):
58
58
  data_type: str
59
59
  content: Any
60
+ metadata: Optional[Dict[str, Any]] = None
60
61
 
61
62
 
62
63
  class UpdateDataItemPayload(BaseModel):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: simile
3
- Version: 0.3.4
3
+ Version: 0.3.6
4
4
  Summary: Package for interfacing with Simile AI agents for simulation
5
5
  Author-email: Simile AI <cqz@simile.ai>
6
6
  License: MIT
@@ -0,0 +1,11 @@
1
+ simile/__init__.py,sha256=GgbhCv5G5F8X_DIYw0H72D8fRuVHW7SLezGJykALpd0,1036
2
+ simile/auth_client.py,sha256=ICImmaA5fZX9ADbIPIUh4RED3hBZvLf3XSiaqELDAME,7923
3
+ simile/client.py,sha256=zJcB2l7pqrgCK7FlY_9eG3ATe39eMRpawEASwTwKXn0,13779
4
+ simile/exceptions.py,sha256=-rJ3KZcpvNRi9JXbDpxWDSL2lU1mEJX2piwYRZvhKmg,1406
5
+ simile/models.py,sha256=vbWrK5VKDPsiI9K4n2dCC41Y9who7cgTHSL9ARs25K0,5487
6
+ simile/resources.py,sha256=Juoa32SlN8LdvzCFaobq7uV2itmcwbk5dM_mlc4bCVk,10420
7
+ simile-0.3.6.dist-info/licenses/LICENSE,sha256=tpxX3bpODfyOQVyEM6kCMvPHFCpkjFDj0AICRqKqOFA,1066
8
+ simile-0.3.6.dist-info/METADATA,sha256=-LjtcX15bPSTz4t8TjEgsZ6XOnfOdmkhLff75hJIBPY,1276
9
+ simile-0.3.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
10
+ simile-0.3.6.dist-info/top_level.txt,sha256=41lJneubAG4-ZOAs5qn7iDtDb-MDxa6DdvgBKwNX84M,7
11
+ simile-0.3.6.dist-info/RECORD,,
@@ -1,11 +0,0 @@
1
- simile/__init__.py,sha256=GgbhCv5G5F8X_DIYw0H72D8fRuVHW7SLezGJykALpd0,1036
2
- simile/auth_client.py,sha256=ICImmaA5fZX9ADbIPIUh4RED3hBZvLf3XSiaqELDAME,7923
3
- simile/client.py,sha256=Y-u8LH6peWoBJSEP8fva9pq5DkhYf5DpETwqcdg0ogg,12679
4
- simile/exceptions.py,sha256=-rJ3KZcpvNRi9JXbDpxWDSL2lU1mEJX2piwYRZvhKmg,1406
5
- simile/models.py,sha256=tqTgNWQjoHdSDffsAhiWyzf3wKgbiU137CtWr3pcFpg,5441
6
- simile/resources.py,sha256=Juoa32SlN8LdvzCFaobq7uV2itmcwbk5dM_mlc4bCVk,10420
7
- simile-0.3.4.dist-info/licenses/LICENSE,sha256=tpxX3bpODfyOQVyEM6kCMvPHFCpkjFDj0AICRqKqOFA,1066
8
- simile-0.3.4.dist-info/METADATA,sha256=udSrz6PJqBo8ewtNnaGTzYWHcieaV6iB6VvH9FY102c,1276
9
- simile-0.3.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
10
- simile-0.3.4.dist-info/top_level.txt,sha256=41lJneubAG4-ZOAs5qn7iDtDb-MDxa6DdvgBKwNX84M,7
11
- simile-0.3.4.dist-info/RECORD,,
File without changes