simile 0.2.12__py3-none-any.whl → 0.2.14__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/__init__.py CHANGED
@@ -27,4 +27,4 @@ __all__ = [
27
27
  "SimileAPIError", "SimileAuthenticationError", "SimileNotFoundError", "SimileBadRequestError"
28
28
  ]
29
29
 
30
- __version__ = "0.1.0"
30
+ __version__ = "0.2.13"
simile/resources.py CHANGED
@@ -124,3 +124,44 @@ class SurveySession:
124
124
  return await self._client._request(
125
125
  "POST", endpoint, response_model=SurveySessionCloseResponse
126
126
  )
127
+
128
+ async def add_historical_mc_turn(
129
+ self,
130
+ question: str,
131
+ options: List[str],
132
+ chosen_option: str,
133
+ timestamp: Optional[str] = None,
134
+ ) -> Dict:
135
+ """Adds a historical multiple choice turn to this session with a pre-specified answer.
136
+
137
+ This method allows you to add a multiple choice question-answer pair to the session's
138
+ conversation history without generating a new response. This is useful for recreating
139
+ conversation history or adding context from previous interactions.
140
+
141
+ Args:
142
+ question: The multiple choice question text
143
+ options: List of answer options
144
+ chosen_option: The option that was selected
145
+ timestamp: Optional ISO timestamp of when this interaction occurred
146
+
147
+ Returns:
148
+ Dictionary with success status and the added turn details
149
+
150
+ Raises:
151
+ Simile.APIError: If the API request fails
152
+ """
153
+ endpoint = f"sessions/{str(self._id)}/add-turn"
154
+ payload = {
155
+ "question": question,
156
+ "options": options,
157
+ "chosen_option": chosen_option,
158
+ }
159
+ if timestamp:
160
+ payload["timestamp"] = timestamp
161
+
162
+ return await self._client._request(
163
+ "POST",
164
+ endpoint,
165
+ json=payload,
166
+ response_model=None, # Return raw dict since we don't have a specific model
167
+ )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: simile
3
- Version: 0.2.12
3
+ Version: 0.2.14
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=qtWFBsMK2F1BNZ0V07fEb56fcuFOm48QcA4ne_s9t44,920
2
+ simile/auth_client.py,sha256=ICImmaA5fZX9ADbIPIUh4RED3hBZvLf3XSiaqELDAME,7923
3
+ simile/client.py,sha256=S1YhKNDhDS4KqrP95jNvRd-WhdLyG-ObhQtKfibA4rU,12062
4
+ simile/exceptions.py,sha256=-rJ3KZcpvNRi9JXbDpxWDSL2lU1mEJX2piwYRZvhKmg,1406
5
+ simile/models.py,sha256=1cVmaOdK90cyDuIiP6Ox27NJEKMTtx0LyNos_CzJ-UA,5354
6
+ simile/resources.py,sha256=Tcj1o8K9lLtUVFvWSe3jig9OcTsOSVGtmK1BHB-WI9w,5686
7
+ simile-0.2.14.dist-info/licenses/LICENSE,sha256=tpxX3bpODfyOQVyEM6kCMvPHFCpkjFDj0AICRqKqOFA,1066
8
+ simile-0.2.14.dist-info/METADATA,sha256=ffR2H3McJKssQex2URy0nFlXH7fDLIw_lLqz9W7WTWI,1277
9
+ simile-0.2.14.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
10
+ simile-0.2.14.dist-info/top_level.txt,sha256=41lJneubAG4-ZOAs5qn7iDtDb-MDxa6DdvgBKwNX84M,7
11
+ simile-0.2.14.dist-info/RECORD,,
@@ -1,11 +0,0 @@
1
- simile/__init__.py,sha256=xqBw-Vzn1tBkobpam_EifTpcfl8nvmjIGFBaRQThmkA,919
2
- simile/auth_client.py,sha256=ICImmaA5fZX9ADbIPIUh4RED3hBZvLf3XSiaqELDAME,7923
3
- simile/client.py,sha256=S1YhKNDhDS4KqrP95jNvRd-WhdLyG-ObhQtKfibA4rU,12062
4
- simile/exceptions.py,sha256=-rJ3KZcpvNRi9JXbDpxWDSL2lU1mEJX2piwYRZvhKmg,1406
5
- simile/models.py,sha256=1cVmaOdK90cyDuIiP6Ox27NJEKMTtx0LyNos_CzJ-UA,5354
6
- simile/resources.py,sha256=uJfqV8b4trgQ3hGZ1jaNed4838fV_X5vQVG8WpdIUos,4190
7
- simile-0.2.12.dist-info/licenses/LICENSE,sha256=tpxX3bpODfyOQVyEM6kCMvPHFCpkjFDj0AICRqKqOFA,1066
8
- simile-0.2.12.dist-info/METADATA,sha256=U7-uNWVKyP-WeRuVN0xbNEj5HGSuBXfAwii46iSPY8I,1277
9
- simile-0.2.12.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
10
- simile-0.2.12.dist-info/top_level.txt,sha256=41lJneubAG4-ZOAs5qn7iDtDb-MDxa6DdvgBKwNX84M,7
11
- simile-0.2.12.dist-info/RECORD,,