simile 0.2.12__py3-none-any.whl → 0.2.13__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 +1 -1
- simile/resources.py +41 -0
- {simile-0.2.12.dist-info → simile-0.2.13.dist-info}/METADATA +1 -1
- simile-0.2.13.dist-info/RECORD +11 -0
- simile-0.2.12.dist-info/RECORD +0 -11
- {simile-0.2.12.dist-info → simile-0.2.13.dist-info}/WHEEL +0 -0
- {simile-0.2.12.dist-info → simile-0.2.13.dist-info}/licenses/LICENSE +0 -0
- {simile-0.2.12.dist-info → simile-0.2.13.dist-info}/top_level.txt +0 -0
simile/__init__.py
CHANGED
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)}/historical-mc"
|
|
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
|
+
)
|
|
@@ -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=RGngoRM67JdnfzwKuF1wxN264EeI6Pg6MYMAdeyBHP8,5691
|
|
7
|
+
simile-0.2.13.dist-info/licenses/LICENSE,sha256=tpxX3bpODfyOQVyEM6kCMvPHFCpkjFDj0AICRqKqOFA,1066
|
|
8
|
+
simile-0.2.13.dist-info/METADATA,sha256=tG4uBJK3GqwPPOuTR0UR0-xXZxOCVOJTZWqnh2KO3to,1277
|
|
9
|
+
simile-0.2.13.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
10
|
+
simile-0.2.13.dist-info/top_level.txt,sha256=41lJneubAG4-ZOAs5qn7iDtDb-MDxa6DdvgBKwNX84M,7
|
|
11
|
+
simile-0.2.13.dist-info/RECORD,,
|
simile-0.2.12.dist-info/RECORD
DELETED
|
@@ -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,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|