simile 0.3.11__tar.gz → 0.3.13__tar.gz

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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: simile
3
- Version: 0.3.11
3
+ Version: 0.3.13
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
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "simile"
7
- version = "0.3.11"
7
+ version = "0.3.13"
8
8
  authors = [
9
9
  { name="Simile AI", email="cqz@simile.ai" },
10
10
  ]
@@ -254,6 +254,18 @@ class Simile:
254
254
  "DELETE", f"agents/{str(agent_id)}/populations/{str(population_id)}"
255
255
  )
256
256
  return raw_response.json()
257
+
258
+ async def batch_add_agents_to_population(
259
+ self, agent_ids: List[Union[str, uuid.UUID]], population_id: Union[str, uuid.UUID]
260
+ ) -> Dict[str, Any]:
261
+ """Add multiple agents to a population in a single batch operation."""
262
+ agent_id_strs = [str(aid) for aid in agent_ids]
263
+ raw_response = await self._request(
264
+ "POST",
265
+ f"populations/{str(population_id)}/agents/batch",
266
+ json=agent_id_strs
267
+ )
268
+ return raw_response.json()
257
269
 
258
270
  async def get_populations_for_agent(
259
271
  self, agent_id: Union[str, uuid.UUID]
@@ -300,10 +312,13 @@ class Simile:
300
312
  return [DataItem(**item) for item in raw_response.json()]
301
313
 
302
314
  async def update_data_item(
303
- self, data_item_id: Union[str, uuid.UUID], content: Any
315
+ self,
316
+ data_item_id: Union[str, uuid.UUID],
317
+ content: Any,
318
+ metadata: Optional[Dict[str, Any]] = None,
304
319
  ) -> DataItem:
305
320
  """Updates an existing data item."""
306
- payload = UpdateDataItemPayload(content=content)
321
+ payload = UpdateDataItemPayload(content=content, metadata=metadata)
307
322
  response_data = await self._request(
308
323
  "POST",
309
324
  f"data_item/update/{str(data_item_id)}",
@@ -64,6 +64,7 @@ class CreateDataItemPayload(BaseModel):
64
64
 
65
65
  class UpdateDataItemPayload(BaseModel):
66
66
  content: Any
67
+ metadata: Optional[Dict[str, Any]] = None
67
68
 
68
69
 
69
70
  class DeletionResponse(BaseModel):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: simile
3
- Version: 0.3.11
3
+ Version: 0.3.13
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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes