simile 0.2.5__tar.gz → 0.2.6__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.2.5
3
+ Version: 0.2.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
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "simile"
7
- version = "0.2.5"
7
+ version = "0.2.6"
8
8
  authors = [
9
9
  { name="Simile AI", email="cqz@simile.ai" },
10
10
  ]
@@ -77,6 +77,13 @@ class MCGenerationResponse(BaseModel):
77
77
  options: List[str]
78
78
  chosen_option: str
79
79
 
80
+ class AddContextRequest(BaseModel):
81
+ context: str
82
+
83
+ class AddContextResponse(BaseModel):
84
+ message: str
85
+ session_id: uuid.UUID
86
+
80
87
 
81
88
  # --- Survey Session Models ---
82
89
  class ConversationTurn(BaseModel):
@@ -6,7 +6,9 @@ from .models import (
6
6
  QualGenerationResponse,
7
7
  MCGenerationRequest,
8
8
  MCGenerationResponse,
9
- SurveySessionCloseResponse
9
+ SurveySessionCloseResponse,
10
+ AddContextRequest,
11
+ AddContextResponse
10
12
  )
11
13
 
12
14
  if TYPE_CHECKING:
@@ -73,6 +75,17 @@ class SurveySession:
73
75
  response_model=MCGenerationResponse
74
76
  )
75
77
 
78
+ async def add_context(self, ctx: str) -> AddContextResponse:
79
+ """Adds text to the SurveySession without requesting a response."""
80
+ endpoint = f"sessions/{str(self._id)}/context"
81
+ payload = AddContextRequest(context=ctx)
82
+ return await self._client._request(
83
+ "POST",
84
+ endpoint,
85
+ json=payload.model_dump(),
86
+ response_model=AddContextResponse
87
+ )
88
+
76
89
  async def close(self) -> SurveySessionCloseResponse:
77
90
  """Closes this survey session on the server."""
78
91
  endpoint = f"sessions/{str(self._id)}/close"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: simile
3
- Version: 0.2.5
3
+ Version: 0.2.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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes