simile 0.2.14__py3-none-any.whl → 0.2.15__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 +8 -2
- simile/models.py +2 -0
- simile/resources.py +35 -7
- {simile-0.2.14.dist-info → simile-0.2.15.dist-info}/METADATA +1 -1
- simile-0.2.15.dist-info/RECORD +11 -0
- simile-0.2.14.dist-info/RECORD +0 -11
- {simile-0.2.14.dist-info → simile-0.2.15.dist-info}/WHEEL +0 -0
- {simile-0.2.14.dist-info → simile-0.2.15.dist-info}/licenses/LICENSE +0 -0
- {simile-0.2.14.dist-info → simile-0.2.15.dist-info}/top_level.txt +0 -0
simile/client.py
CHANGED
|
@@ -308,12 +308,18 @@ class Simile:
|
|
|
308
308
|
agent_id: uuid.UUID,
|
|
309
309
|
question: str,
|
|
310
310
|
options: List[str],
|
|
311
|
-
|
|
311
|
+
data_types: Optional[List[str]] = None,
|
|
312
|
+
exclude_data_types: Optional[List[str]] = None,
|
|
313
|
+
images: Optional[Dict[str, str]] = None,
|
|
312
314
|
) -> MCGenerationResponse:
|
|
313
315
|
"""Generates a multiple-choice response from an agent."""
|
|
314
316
|
endpoint = f"generation/mc/{str(agent_id)}"
|
|
315
317
|
request_payload = MCGenerationRequest(
|
|
316
|
-
question=question,
|
|
318
|
+
question=question,
|
|
319
|
+
options=options,
|
|
320
|
+
data_types=data_types,
|
|
321
|
+
exclude_data_types=exclude_data_types,
|
|
322
|
+
images=images,
|
|
317
323
|
)
|
|
318
324
|
response_data = await self._request(
|
|
319
325
|
"POST",
|
simile/models.py
CHANGED
|
@@ -78,6 +78,8 @@ class QualGenerationResponse(BaseModel):
|
|
|
78
78
|
class MCGenerationRequest(BaseModel):
|
|
79
79
|
question: str
|
|
80
80
|
options: List[str]
|
|
81
|
+
data_types: Optional[List[str]] = None
|
|
82
|
+
exclude_data_types: Optional[List[str]] = None
|
|
81
83
|
images: Optional[Dict[str, str]] = None
|
|
82
84
|
|
|
83
85
|
|
simile/resources.py
CHANGED
|
@@ -28,21 +28,36 @@ class Agent:
|
|
|
28
28
|
return self._agent_id
|
|
29
29
|
|
|
30
30
|
async def generate_qual_response(
|
|
31
|
-
self,
|
|
31
|
+
self,
|
|
32
|
+
question: str,
|
|
33
|
+
data_types: Optional[List[str]] = None,
|
|
34
|
+
exclude_data_types: Optional[List[str]] = None,
|
|
35
|
+
images: Optional[Dict[str, str]] = None,
|
|
32
36
|
) -> QualGenerationResponse:
|
|
33
37
|
"""Generates a qualitative response from this agent based on a question."""
|
|
34
38
|
return await self._client.generate_qual_response(
|
|
35
|
-
agent_id=self._agent_id,
|
|
39
|
+
agent_id=self._agent_id,
|
|
40
|
+
question=question,
|
|
41
|
+
data_types=data_types,
|
|
42
|
+
exclude_data_types=exclude_data_types,
|
|
43
|
+
images=images,
|
|
36
44
|
)
|
|
37
45
|
|
|
38
46
|
async def generate_mc_response(
|
|
39
|
-
self,
|
|
47
|
+
self,
|
|
48
|
+
question: str,
|
|
49
|
+
options: List[str],
|
|
50
|
+
data_types: Optional[List[str]] = None,
|
|
51
|
+
exclude_data_types: Optional[List[str]] = None,
|
|
52
|
+
images: Optional[Dict[str, str]] = None,
|
|
40
53
|
) -> MCGenerationResponse:
|
|
41
54
|
"""Generates a multiple-choice response from this agent."""
|
|
42
55
|
return await self._client.generate_mc_response(
|
|
43
56
|
agent_id=self._agent_id,
|
|
44
57
|
question=question,
|
|
45
58
|
options=options,
|
|
59
|
+
data_types=data_types,
|
|
60
|
+
exclude_data_types=exclude_data_types,
|
|
46
61
|
images=images,
|
|
47
62
|
)
|
|
48
63
|
|
|
@@ -77,14 +92,16 @@ class SurveySession:
|
|
|
77
92
|
async def generate_qual_response(
|
|
78
93
|
self,
|
|
79
94
|
question: str,
|
|
95
|
+
data_types: Optional[List[str]] = None,
|
|
96
|
+
exclude_data_types: Optional[List[str]] = None,
|
|
80
97
|
images: Optional[Dict[str, str]] = None,
|
|
81
98
|
) -> QualGenerationResponse:
|
|
82
99
|
"""Generates a qualitative response within this survey session."""
|
|
83
100
|
endpoint = f"sessions/{str(self._id)}/qual"
|
|
84
101
|
payload = QualGenerationRequest(
|
|
85
102
|
question=question,
|
|
86
|
-
data_types=
|
|
87
|
-
exclude_data_types=
|
|
103
|
+
data_types=data_types,
|
|
104
|
+
exclude_data_types=exclude_data_types,
|
|
88
105
|
images=images,
|
|
89
106
|
)
|
|
90
107
|
return await self._client._request(
|
|
@@ -95,11 +112,22 @@ class SurveySession:
|
|
|
95
112
|
)
|
|
96
113
|
|
|
97
114
|
async def generate_mc_response(
|
|
98
|
-
self,
|
|
115
|
+
self,
|
|
116
|
+
question: str,
|
|
117
|
+
options: List[str],
|
|
118
|
+
data_types: Optional[List[str]] = None,
|
|
119
|
+
exclude_data_types: Optional[List[str]] = None,
|
|
120
|
+
images: Optional[Dict[str, str]] = None,
|
|
99
121
|
) -> MCGenerationResponse:
|
|
100
122
|
"""Generates a multiple-choice response within this survey session."""
|
|
101
123
|
endpoint = f"sessions/{str(self._id)}/mc"
|
|
102
|
-
payload = MCGenerationRequest(
|
|
124
|
+
payload = MCGenerationRequest(
|
|
125
|
+
question=question,
|
|
126
|
+
options=options,
|
|
127
|
+
data_types=data_types,
|
|
128
|
+
exclude_data_types=exclude_data_types,
|
|
129
|
+
images=images,
|
|
130
|
+
)
|
|
103
131
|
return await self._client._request(
|
|
104
132
|
"POST",
|
|
105
133
|
endpoint,
|
|
@@ -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=KumgPioNjR6UYNIT1MJipw3bMArPPNFnrluvHkw1eSw,12279
|
|
4
|
+
simile/exceptions.py,sha256=-rJ3KZcpvNRi9JXbDpxWDSL2lU1mEJX2piwYRZvhKmg,1406
|
|
5
|
+
simile/models.py,sha256=bdtXGM4K4x_bUTXRMf6DzGEtJRMgnofE9yy3OlA0qEQ,5448
|
|
6
|
+
simile/resources.py,sha256=HWi2Fp32UBMqz7TQ9aA66Xs6mex7Olyz44TmfDOj_hc,6519
|
|
7
|
+
simile-0.2.15.dist-info/licenses/LICENSE,sha256=tpxX3bpODfyOQVyEM6kCMvPHFCpkjFDj0AICRqKqOFA,1066
|
|
8
|
+
simile-0.2.15.dist-info/METADATA,sha256=bZ6ThCzUNab_wKM7TJJ2pkoNtwe3_dqYJyIOLAS4fMg,1277
|
|
9
|
+
simile-0.2.15.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
10
|
+
simile-0.2.15.dist-info/top_level.txt,sha256=41lJneubAG4-ZOAs5qn7iDtDb-MDxa6DdvgBKwNX84M,7
|
|
11
|
+
simile-0.2.15.dist-info/RECORD,,
|
simile-0.2.14.dist-info/RECORD
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
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,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|