profound 0.6.0__py3-none-any.whl → 0.8.0__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 profound might be problematic. Click here for more details.
- profound/_version.py +1 -1
- profound/resources/logs/raw.py +4 -8
- profound/resources/prompts.py +4 -0
- profound/resources/reports.py +14 -16
- profound/types/logs/raw_bots_params.py +199 -22
- profound/types/logs/raw_logs_params.py +198 -12
- profound/types/prompt_answers_params.py +67 -9
- profound/types/report_citations_params.py +146 -12
- profound/types/report_sentiment_params.py +106 -14
- profound/types/report_visibility_params.py +80 -12
- {profound-0.6.0.dist-info → profound-0.8.0.dist-info}/METADATA +1 -1
- {profound-0.6.0.dist-info → profound-0.8.0.dist-info}/RECORD +14 -14
- {profound-0.6.0.dist-info → profound-0.8.0.dist-info}/WHEEL +0 -0
- {profound-0.6.0.dist-info → profound-0.8.0.dist-info}/licenses/LICENSE +0 -0
profound/_version.py
CHANGED
profound/resources/logs/raw.py
CHANGED
|
@@ -96,8 +96,7 @@ class RawResource(SyncAPIResource):
|
|
|
96
96
|
end_date: End date for logs. Accepts same formats as start_date. Defaults to now if
|
|
97
97
|
omitted.
|
|
98
98
|
|
|
99
|
-
filters: List of filters to apply to the
|
|
100
|
-
value.
|
|
99
|
+
filters: List of filters to apply to the bots logs query.
|
|
101
100
|
|
|
102
101
|
order_by: Custom ordering of the report results.
|
|
103
102
|
|
|
@@ -195,8 +194,7 @@ class RawResource(SyncAPIResource):
|
|
|
195
194
|
end_date: End date for logs. Accepts same formats as start_date. Defaults to now if
|
|
196
195
|
omitted.
|
|
197
196
|
|
|
198
|
-
filters:
|
|
199
|
-
value.
|
|
197
|
+
filters: Filters to apply to the logs query.
|
|
200
198
|
|
|
201
199
|
order_by: Custom ordering of the report results.
|
|
202
200
|
|
|
@@ -314,8 +312,7 @@ class AsyncRawResource(AsyncAPIResource):
|
|
|
314
312
|
end_date: End date for logs. Accepts same formats as start_date. Defaults to now if
|
|
315
313
|
omitted.
|
|
316
314
|
|
|
317
|
-
filters: List of filters to apply to the
|
|
318
|
-
value.
|
|
315
|
+
filters: List of filters to apply to the bots logs query.
|
|
319
316
|
|
|
320
317
|
order_by: Custom ordering of the report results.
|
|
321
318
|
|
|
@@ -413,8 +410,7 @@ class AsyncRawResource(AsyncAPIResource):
|
|
|
413
410
|
end_date: End date for logs. Accepts same formats as start_date. Defaults to now if
|
|
414
411
|
omitted.
|
|
415
412
|
|
|
416
|
-
filters:
|
|
417
|
-
value.
|
|
413
|
+
filters: Filters to apply to the logs query.
|
|
418
414
|
|
|
419
415
|
order_by: Custom ordering of the report results.
|
|
420
416
|
|
profound/resources/prompts.py
CHANGED
|
@@ -65,6 +65,8 @@ class PromptsResource(SyncAPIResource):
|
|
|
65
65
|
Get the answers for the prompts.
|
|
66
66
|
|
|
67
67
|
Args:
|
|
68
|
+
filters: List of filters to apply to the answers report.
|
|
69
|
+
|
|
68
70
|
pagination: Pagination parameters for the results. Default is 10,000 rows with no offset.
|
|
69
71
|
|
|
70
72
|
extra_headers: Send extra headers
|
|
@@ -135,6 +137,8 @@ class AsyncPromptsResource(AsyncAPIResource):
|
|
|
135
137
|
Get the answers for the prompts.
|
|
136
138
|
|
|
137
139
|
Args:
|
|
140
|
+
filters: List of filters to apply to the answers report.
|
|
141
|
+
|
|
138
142
|
pagination: Pagination parameters for the results. Default is 10,000 rows with no offset.
|
|
139
143
|
|
|
140
144
|
extra_headers: Send extra headers
|
profound/resources/reports.py
CHANGED
|
@@ -84,8 +84,7 @@ class ReportsResource(SyncAPIResource):
|
|
|
84
84
|
|
|
85
85
|
dimensions: Dimensions to group the report by.
|
|
86
86
|
|
|
87
|
-
filters: List of filters to apply to the report.
|
|
88
|
-
value.
|
|
87
|
+
filters: List of filters to apply to the citations report.
|
|
89
88
|
|
|
90
89
|
order_by: Custom ordering of the report results.
|
|
91
90
|
|
|
@@ -135,10 +134,12 @@ class ReportsResource(SyncAPIResource):
|
|
|
135
134
|
*,
|
|
136
135
|
category_id: str,
|
|
137
136
|
end_date: Union[str, datetime],
|
|
138
|
-
metrics: List[Literal["positive", "negative"]],
|
|
137
|
+
metrics: List[Literal["positive", "negative", "ocurrences"]],
|
|
139
138
|
start_date: Union[str, datetime],
|
|
140
139
|
date_interval: Literal["day", "week", "month", "year"] | Omit = omit,
|
|
141
|
-
dimensions: List[
|
|
140
|
+
dimensions: List[
|
|
141
|
+
Literal["theme", "date", "region", "topic", "model", "asset_name", "tag", "prompt", "sentiment_type"]
|
|
142
|
+
]
|
|
142
143
|
| Omit = omit,
|
|
143
144
|
filters: Iterable[report_sentiment_params.Filter] | Omit = omit,
|
|
144
145
|
order_by: Dict[str, Literal["asc", "desc"]] | Omit = omit,
|
|
@@ -165,8 +166,7 @@ class ReportsResource(SyncAPIResource):
|
|
|
165
166
|
|
|
166
167
|
dimensions: Dimensions to group the report by.
|
|
167
168
|
|
|
168
|
-
filters: List of filters to apply to the report.
|
|
169
|
-
value.
|
|
169
|
+
filters: List of filters to apply to the sentiment report.
|
|
170
170
|
|
|
171
171
|
order_by: Custom ordering of the report results.
|
|
172
172
|
|
|
@@ -245,8 +245,7 @@ class ReportsResource(SyncAPIResource):
|
|
|
245
245
|
|
|
246
246
|
dimensions: Dimensions to group the report by.
|
|
247
247
|
|
|
248
|
-
filters: List of filters to apply to the report.
|
|
249
|
-
value.
|
|
248
|
+
filters: List of filters to apply to the visibility report.
|
|
250
249
|
|
|
251
250
|
order_by: Custom ordering of the report results.
|
|
252
251
|
|
|
@@ -349,8 +348,7 @@ class AsyncReportsResource(AsyncAPIResource):
|
|
|
349
348
|
|
|
350
349
|
dimensions: Dimensions to group the report by.
|
|
351
350
|
|
|
352
|
-
filters: List of filters to apply to the report.
|
|
353
|
-
value.
|
|
351
|
+
filters: List of filters to apply to the citations report.
|
|
354
352
|
|
|
355
353
|
order_by: Custom ordering of the report results.
|
|
356
354
|
|
|
@@ -400,10 +398,12 @@ class AsyncReportsResource(AsyncAPIResource):
|
|
|
400
398
|
*,
|
|
401
399
|
category_id: str,
|
|
402
400
|
end_date: Union[str, datetime],
|
|
403
|
-
metrics: List[Literal["positive", "negative"]],
|
|
401
|
+
metrics: List[Literal["positive", "negative", "ocurrences"]],
|
|
404
402
|
start_date: Union[str, datetime],
|
|
405
403
|
date_interval: Literal["day", "week", "month", "year"] | Omit = omit,
|
|
406
|
-
dimensions: List[
|
|
404
|
+
dimensions: List[
|
|
405
|
+
Literal["theme", "date", "region", "topic", "model", "asset_name", "tag", "prompt", "sentiment_type"]
|
|
406
|
+
]
|
|
407
407
|
| Omit = omit,
|
|
408
408
|
filters: Iterable[report_sentiment_params.Filter] | Omit = omit,
|
|
409
409
|
order_by: Dict[str, Literal["asc", "desc"]] | Omit = omit,
|
|
@@ -430,8 +430,7 @@ class AsyncReportsResource(AsyncAPIResource):
|
|
|
430
430
|
|
|
431
431
|
dimensions: Dimensions to group the report by.
|
|
432
432
|
|
|
433
|
-
filters: List of filters to apply to the report.
|
|
434
|
-
value.
|
|
433
|
+
filters: List of filters to apply to the sentiment report.
|
|
435
434
|
|
|
436
435
|
order_by: Custom ordering of the report results.
|
|
437
436
|
|
|
@@ -510,8 +509,7 @@ class AsyncReportsResource(AsyncAPIResource):
|
|
|
510
509
|
|
|
511
510
|
dimensions: Dimensions to group the report by.
|
|
512
511
|
|
|
513
|
-
filters: List of filters to apply to the report.
|
|
514
|
-
value.
|
|
512
|
+
filters: List of filters to apply to the visibility report.
|
|
515
513
|
|
|
516
514
|
order_by: Custom ordering of the report results.
|
|
517
515
|
|
|
@@ -4,13 +4,26 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
from typing import Dict, List, Union, Iterable
|
|
6
6
|
from datetime import datetime
|
|
7
|
-
from typing_extensions import Literal, Required, Annotated, TypedDict
|
|
7
|
+
from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict
|
|
8
8
|
|
|
9
9
|
from ..._types import SequenceNotStr
|
|
10
10
|
from ..._utils import PropertyInfo
|
|
11
11
|
from ..shared_params.pagination import Pagination
|
|
12
12
|
|
|
13
|
-
__all__ = [
|
|
13
|
+
__all__ = [
|
|
14
|
+
"RawBotsParams",
|
|
15
|
+
"Filter",
|
|
16
|
+
"FilterBotNameFilter",
|
|
17
|
+
"FilterBotProviderFilter",
|
|
18
|
+
"FilterBotTypesFilter",
|
|
19
|
+
"FilterMethodFilter",
|
|
20
|
+
"FilterAppModelsAgentAnalyticsFiltersPathFilter",
|
|
21
|
+
"FilterStatusCodeFilter",
|
|
22
|
+
"FilterIPFilter",
|
|
23
|
+
"FilterUserAgentFilter",
|
|
24
|
+
"FilterRefererFilter",
|
|
25
|
+
"FilterQueryParamsFilter",
|
|
26
|
+
]
|
|
14
27
|
|
|
15
28
|
|
|
16
29
|
class RawBotsParams(TypedDict, total=False):
|
|
@@ -52,10 +65,7 @@ class RawBotsParams(TypedDict, total=False):
|
|
|
52
65
|
"""
|
|
53
66
|
|
|
54
67
|
filters: Iterable[Filter]
|
|
55
|
-
"""List of filters to apply to the
|
|
56
|
-
|
|
57
|
-
Each filter has an operator, field, and value.
|
|
58
|
-
"""
|
|
68
|
+
"""List of filters to apply to the bots logs query."""
|
|
59
69
|
|
|
60
70
|
order_by: Dict[str, Literal["asc", "desc"]]
|
|
61
71
|
"""Custom ordering of the report results.
|
|
@@ -74,22 +84,49 @@ class RawBotsParams(TypedDict, total=False):
|
|
|
74
84
|
"""Pagination settings for the report results."""
|
|
75
85
|
|
|
76
86
|
|
|
77
|
-
class
|
|
78
|
-
field: Required[
|
|
87
|
+
class FilterBotNameFilter(TypedDict, total=False):
|
|
88
|
+
field: Required[Literal["bot_name"]]
|
|
89
|
+
|
|
90
|
+
operator: Required[
|
|
79
91
|
Literal[
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
|
|
92
|
+
"is",
|
|
93
|
+
"not_is",
|
|
94
|
+
"in",
|
|
95
|
+
"not_in",
|
|
96
|
+
"contains",
|
|
97
|
+
"not_contains",
|
|
98
|
+
"matches",
|
|
99
|
+
"contains_case_insensitive",
|
|
100
|
+
"not_contains_case_insensitive",
|
|
101
|
+
]
|
|
102
|
+
]
|
|
103
|
+
|
|
104
|
+
value: Required[Union[str, SequenceNotStr[str]]]
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
class FilterBotProviderFilter(TypedDict, total=False):
|
|
108
|
+
field: Required[Literal["bot_provider"]]
|
|
109
|
+
|
|
110
|
+
operator: Required[
|
|
111
|
+
Literal[
|
|
112
|
+
"is",
|
|
113
|
+
"not_is",
|
|
114
|
+
"in",
|
|
115
|
+
"not_in",
|
|
116
|
+
"contains",
|
|
117
|
+
"not_contains",
|
|
118
|
+
"matches",
|
|
119
|
+
"contains_case_insensitive",
|
|
120
|
+
"not_contains_case_insensitive",
|
|
90
121
|
]
|
|
91
122
|
]
|
|
92
123
|
|
|
124
|
+
value: Required[Union[str, SequenceNotStr[str]]]
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
class FilterBotTypesFilter(TypedDict, total=False):
|
|
128
|
+
field: Required[Literal["bot_types"]]
|
|
129
|
+
|
|
93
130
|
operator: Required[
|
|
94
131
|
Literal[
|
|
95
132
|
"is",
|
|
@@ -98,14 +135,154 @@ class Filter(TypedDict, total=False):
|
|
|
98
135
|
"not_in",
|
|
99
136
|
"contains",
|
|
100
137
|
"not_contains",
|
|
138
|
+
"matches",
|
|
101
139
|
"contains_case_insensitive",
|
|
102
140
|
"not_contains_case_insensitive",
|
|
141
|
+
]
|
|
142
|
+
]
|
|
143
|
+
|
|
144
|
+
value: Required[
|
|
145
|
+
Union[Literal["ai_assistant", "ai_training", "index"], List[Literal["ai_assistant", "ai_training", "index"]]]
|
|
146
|
+
]
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
class FilterMethodFilter(TypedDict, total=False):
|
|
150
|
+
field: Required[Literal["method"]]
|
|
151
|
+
|
|
152
|
+
operator: Required[
|
|
153
|
+
Literal[
|
|
154
|
+
"is",
|
|
155
|
+
"not_is",
|
|
156
|
+
"in",
|
|
157
|
+
"not_in",
|
|
158
|
+
"contains",
|
|
159
|
+
"not_contains",
|
|
103
160
|
"matches",
|
|
161
|
+
"contains_case_insensitive",
|
|
162
|
+
"not_contains_case_insensitive",
|
|
104
163
|
]
|
|
105
164
|
]
|
|
106
165
|
|
|
107
|
-
value: Required[Union[str, SequenceNotStr[str]
|
|
108
|
-
"""Value for the filter.
|
|
166
|
+
value: Required[Union[str, SequenceNotStr[str]]]
|
|
109
167
|
|
|
110
|
-
|
|
111
|
-
|
|
168
|
+
|
|
169
|
+
class FilterAppModelsAgentAnalyticsFiltersPathFilter(TypedDict, total=False):
|
|
170
|
+
field: Required[Literal["path"]]
|
|
171
|
+
|
|
172
|
+
operator: Required[
|
|
173
|
+
Literal[
|
|
174
|
+
"is",
|
|
175
|
+
"not_is",
|
|
176
|
+
"in",
|
|
177
|
+
"not_in",
|
|
178
|
+
"contains",
|
|
179
|
+
"not_contains",
|
|
180
|
+
"matches",
|
|
181
|
+
"contains_case_insensitive",
|
|
182
|
+
"not_contains_case_insensitive",
|
|
183
|
+
]
|
|
184
|
+
]
|
|
185
|
+
|
|
186
|
+
value: Required[Union[str, SequenceNotStr[str]]]
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
class FilterStatusCodeFilter(TypedDict, total=False):
|
|
190
|
+
field: Required[Literal["status_code"]]
|
|
191
|
+
|
|
192
|
+
operator: Required[Literal["is", "not_is", "in", "not_in"]]
|
|
193
|
+
|
|
194
|
+
value: Required[Union[int, Iterable[int]]]
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
class FilterIPFilter(TypedDict, total=False):
|
|
198
|
+
field: Required[Literal["ip"]]
|
|
199
|
+
|
|
200
|
+
operator: Required[
|
|
201
|
+
Literal[
|
|
202
|
+
"is",
|
|
203
|
+
"not_is",
|
|
204
|
+
"in",
|
|
205
|
+
"not_in",
|
|
206
|
+
"contains",
|
|
207
|
+
"not_contains",
|
|
208
|
+
"matches",
|
|
209
|
+
"contains_case_insensitive",
|
|
210
|
+
"not_contains_case_insensitive",
|
|
211
|
+
]
|
|
212
|
+
]
|
|
213
|
+
|
|
214
|
+
value: Required[Union[str, SequenceNotStr[str]]]
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
class FilterUserAgentFilter(TypedDict, total=False):
|
|
218
|
+
field: Required[Literal["user_agent"]]
|
|
219
|
+
|
|
220
|
+
operator: Required[
|
|
221
|
+
Literal[
|
|
222
|
+
"is",
|
|
223
|
+
"not_is",
|
|
224
|
+
"in",
|
|
225
|
+
"not_in",
|
|
226
|
+
"contains",
|
|
227
|
+
"not_contains",
|
|
228
|
+
"matches",
|
|
229
|
+
"contains_case_insensitive",
|
|
230
|
+
"not_contains_case_insensitive",
|
|
231
|
+
]
|
|
232
|
+
]
|
|
233
|
+
|
|
234
|
+
value: Required[Union[str, SequenceNotStr[str]]]
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
class FilterRefererFilter(TypedDict, total=False):
|
|
238
|
+
field: Required[Literal["referer"]]
|
|
239
|
+
|
|
240
|
+
operator: Required[
|
|
241
|
+
Literal[
|
|
242
|
+
"is",
|
|
243
|
+
"not_is",
|
|
244
|
+
"in",
|
|
245
|
+
"not_in",
|
|
246
|
+
"contains",
|
|
247
|
+
"not_contains",
|
|
248
|
+
"matches",
|
|
249
|
+
"contains_case_insensitive",
|
|
250
|
+
"not_contains_case_insensitive",
|
|
251
|
+
]
|
|
252
|
+
]
|
|
253
|
+
|
|
254
|
+
value: Required[Union[str, SequenceNotStr[str]]]
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
class FilterQueryParamsFilter(TypedDict, total=False):
|
|
258
|
+
field: Required[Literal["query_params"]]
|
|
259
|
+
|
|
260
|
+
operator: Required[
|
|
261
|
+
Literal[
|
|
262
|
+
"is",
|
|
263
|
+
"not_is",
|
|
264
|
+
"in",
|
|
265
|
+
"not_in",
|
|
266
|
+
"contains",
|
|
267
|
+
"not_contains",
|
|
268
|
+
"matches",
|
|
269
|
+
"contains_case_insensitive",
|
|
270
|
+
"not_contains_case_insensitive",
|
|
271
|
+
]
|
|
272
|
+
]
|
|
273
|
+
|
|
274
|
+
value: Required[Union[str, SequenceNotStr[str]]]
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
Filter: TypeAlias = Union[
|
|
278
|
+
FilterBotNameFilter,
|
|
279
|
+
FilterBotProviderFilter,
|
|
280
|
+
FilterBotTypesFilter,
|
|
281
|
+
FilterMethodFilter,
|
|
282
|
+
FilterAppModelsAgentAnalyticsFiltersPathFilter,
|
|
283
|
+
FilterStatusCodeFilter,
|
|
284
|
+
FilterIPFilter,
|
|
285
|
+
FilterUserAgentFilter,
|
|
286
|
+
FilterRefererFilter,
|
|
287
|
+
FilterQueryParamsFilter,
|
|
288
|
+
]
|
|
@@ -4,13 +4,27 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
from typing import Dict, List, Union, Iterable
|
|
6
6
|
from datetime import datetime
|
|
7
|
-
from typing_extensions import Literal, Required, Annotated, TypedDict
|
|
7
|
+
from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict
|
|
8
8
|
|
|
9
9
|
from ..._types import SequenceNotStr
|
|
10
10
|
from ..._utils import PropertyInfo
|
|
11
11
|
from ..shared_params.pagination import Pagination
|
|
12
12
|
|
|
13
|
-
__all__ = [
|
|
13
|
+
__all__ = [
|
|
14
|
+
"RawLogsParams",
|
|
15
|
+
"Filter",
|
|
16
|
+
"FilterMethodFilter",
|
|
17
|
+
"FilterHostFilter",
|
|
18
|
+
"FilterAppModelsAgentAnalyticsFiltersPathFilter",
|
|
19
|
+
"FilterStatusCodeFilter",
|
|
20
|
+
"FilterIPFilter",
|
|
21
|
+
"FilterUserAgentFilter",
|
|
22
|
+
"FilterRefererFilter",
|
|
23
|
+
"FilterProviderFilter",
|
|
24
|
+
"FilterQueryParamsFilter",
|
|
25
|
+
"FilterBytesSentFilter",
|
|
26
|
+
"FilterDurationMsFilter",
|
|
27
|
+
]
|
|
14
28
|
|
|
15
29
|
|
|
16
30
|
class RawLogsParams(TypedDict, total=False):
|
|
@@ -53,10 +67,7 @@ class RawLogsParams(TypedDict, total=False):
|
|
|
53
67
|
"""
|
|
54
68
|
|
|
55
69
|
filters: Iterable[Filter]
|
|
56
|
-
"""
|
|
57
|
-
|
|
58
|
-
Each filter has an operator, field, and value.
|
|
59
|
-
"""
|
|
70
|
+
"""Filters to apply to the logs query."""
|
|
60
71
|
|
|
61
72
|
order_by: Dict[str, Literal["asc", "desc"]]
|
|
62
73
|
"""Custom ordering of the report results.
|
|
@@ -75,8 +86,8 @@ class RawLogsParams(TypedDict, total=False):
|
|
|
75
86
|
"""Pagination settings for the report results."""
|
|
76
87
|
|
|
77
88
|
|
|
78
|
-
class
|
|
79
|
-
field: Required[Literal["method"
|
|
89
|
+
class FilterMethodFilter(TypedDict, total=False):
|
|
90
|
+
field: Required[Literal["method"]]
|
|
80
91
|
|
|
81
92
|
operator: Required[
|
|
82
93
|
Literal[
|
|
@@ -86,14 +97,189 @@ class Filter(TypedDict, total=False):
|
|
|
86
97
|
"not_in",
|
|
87
98
|
"contains",
|
|
88
99
|
"not_contains",
|
|
100
|
+
"matches",
|
|
89
101
|
"contains_case_insensitive",
|
|
90
102
|
"not_contains_case_insensitive",
|
|
103
|
+
]
|
|
104
|
+
]
|
|
105
|
+
|
|
106
|
+
value: Required[Union[str, SequenceNotStr[str]]]
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
class FilterHostFilter(TypedDict, total=False):
|
|
110
|
+
field: Required[Literal["host"]]
|
|
111
|
+
|
|
112
|
+
operator: Required[
|
|
113
|
+
Literal[
|
|
114
|
+
"is",
|
|
115
|
+
"not_is",
|
|
116
|
+
"in",
|
|
117
|
+
"not_in",
|
|
118
|
+
"contains",
|
|
119
|
+
"not_contains",
|
|
91
120
|
"matches",
|
|
121
|
+
"contains_case_insensitive",
|
|
122
|
+
"not_contains_case_insensitive",
|
|
92
123
|
]
|
|
93
124
|
]
|
|
94
125
|
|
|
95
|
-
value: Required[Union[str, SequenceNotStr[str]
|
|
96
|
-
"""Value for the filter.
|
|
126
|
+
value: Required[Union[str, SequenceNotStr[str]]]
|
|
97
127
|
|
|
98
|
-
|
|
99
|
-
|
|
128
|
+
|
|
129
|
+
class FilterAppModelsAgentAnalyticsFiltersPathFilter(TypedDict, total=False):
|
|
130
|
+
field: Required[Literal["path"]]
|
|
131
|
+
|
|
132
|
+
operator: Required[
|
|
133
|
+
Literal[
|
|
134
|
+
"is",
|
|
135
|
+
"not_is",
|
|
136
|
+
"in",
|
|
137
|
+
"not_in",
|
|
138
|
+
"contains",
|
|
139
|
+
"not_contains",
|
|
140
|
+
"matches",
|
|
141
|
+
"contains_case_insensitive",
|
|
142
|
+
"not_contains_case_insensitive",
|
|
143
|
+
]
|
|
144
|
+
]
|
|
145
|
+
|
|
146
|
+
value: Required[Union[str, SequenceNotStr[str]]]
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
class FilterStatusCodeFilter(TypedDict, total=False):
|
|
150
|
+
field: Required[Literal["status_code"]]
|
|
151
|
+
|
|
152
|
+
operator: Required[Literal["is", "not_is", "in", "not_in"]]
|
|
153
|
+
|
|
154
|
+
value: Required[Union[int, Iterable[int]]]
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
class FilterIPFilter(TypedDict, total=False):
|
|
158
|
+
field: Required[Literal["ip"]]
|
|
159
|
+
|
|
160
|
+
operator: Required[
|
|
161
|
+
Literal[
|
|
162
|
+
"is",
|
|
163
|
+
"not_is",
|
|
164
|
+
"in",
|
|
165
|
+
"not_in",
|
|
166
|
+
"contains",
|
|
167
|
+
"not_contains",
|
|
168
|
+
"matches",
|
|
169
|
+
"contains_case_insensitive",
|
|
170
|
+
"not_contains_case_insensitive",
|
|
171
|
+
]
|
|
172
|
+
]
|
|
173
|
+
|
|
174
|
+
value: Required[Union[str, SequenceNotStr[str]]]
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
class FilterUserAgentFilter(TypedDict, total=False):
|
|
178
|
+
field: Required[Literal["user_agent"]]
|
|
179
|
+
|
|
180
|
+
operator: Required[
|
|
181
|
+
Literal[
|
|
182
|
+
"is",
|
|
183
|
+
"not_is",
|
|
184
|
+
"in",
|
|
185
|
+
"not_in",
|
|
186
|
+
"contains",
|
|
187
|
+
"not_contains",
|
|
188
|
+
"matches",
|
|
189
|
+
"contains_case_insensitive",
|
|
190
|
+
"not_contains_case_insensitive",
|
|
191
|
+
]
|
|
192
|
+
]
|
|
193
|
+
|
|
194
|
+
value: Required[Union[str, SequenceNotStr[str]]]
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
class FilterRefererFilter(TypedDict, total=False):
|
|
198
|
+
field: Required[Literal["referer"]]
|
|
199
|
+
|
|
200
|
+
operator: Required[
|
|
201
|
+
Literal[
|
|
202
|
+
"is",
|
|
203
|
+
"not_is",
|
|
204
|
+
"in",
|
|
205
|
+
"not_in",
|
|
206
|
+
"contains",
|
|
207
|
+
"not_contains",
|
|
208
|
+
"matches",
|
|
209
|
+
"contains_case_insensitive",
|
|
210
|
+
"not_contains_case_insensitive",
|
|
211
|
+
]
|
|
212
|
+
]
|
|
213
|
+
|
|
214
|
+
value: Required[Union[str, SequenceNotStr[str]]]
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
class FilterProviderFilter(TypedDict, total=False):
|
|
218
|
+
field: Required[Literal["provider"]]
|
|
219
|
+
|
|
220
|
+
operator: Required[
|
|
221
|
+
Literal[
|
|
222
|
+
"is",
|
|
223
|
+
"not_is",
|
|
224
|
+
"in",
|
|
225
|
+
"not_in",
|
|
226
|
+
"contains",
|
|
227
|
+
"not_contains",
|
|
228
|
+
"matches",
|
|
229
|
+
"contains_case_insensitive",
|
|
230
|
+
"not_contains_case_insensitive",
|
|
231
|
+
]
|
|
232
|
+
]
|
|
233
|
+
|
|
234
|
+
value: Required[Union[str, SequenceNotStr[str]]]
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
class FilterQueryParamsFilter(TypedDict, total=False):
|
|
238
|
+
field: Required[Literal["query_params"]]
|
|
239
|
+
|
|
240
|
+
operator: Required[
|
|
241
|
+
Literal[
|
|
242
|
+
"is",
|
|
243
|
+
"not_is",
|
|
244
|
+
"in",
|
|
245
|
+
"not_in",
|
|
246
|
+
"contains",
|
|
247
|
+
"not_contains",
|
|
248
|
+
"matches",
|
|
249
|
+
"contains_case_insensitive",
|
|
250
|
+
"not_contains_case_insensitive",
|
|
251
|
+
]
|
|
252
|
+
]
|
|
253
|
+
|
|
254
|
+
value: Required[Union[str, SequenceNotStr[str]]]
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
class FilterBytesSentFilter(TypedDict, total=False):
|
|
258
|
+
field: Required[Literal["bytes_sent"]]
|
|
259
|
+
|
|
260
|
+
operator: Required[Literal["is", "not_is", "in", "not_in"]]
|
|
261
|
+
|
|
262
|
+
value: Required[Union[int, Iterable[int]]]
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
class FilterDurationMsFilter(TypedDict, total=False):
|
|
266
|
+
field: Required[Literal["duration_ms"]]
|
|
267
|
+
|
|
268
|
+
operator: Required[Literal["is", "not_is", "in", "not_in"]]
|
|
269
|
+
|
|
270
|
+
value: Required[Union[int, Iterable[int]]]
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
Filter: TypeAlias = Union[
|
|
274
|
+
FilterMethodFilter,
|
|
275
|
+
FilterHostFilter,
|
|
276
|
+
FilterAppModelsAgentAnalyticsFiltersPathFilter,
|
|
277
|
+
FilterStatusCodeFilter,
|
|
278
|
+
FilterIPFilter,
|
|
279
|
+
FilterUserAgentFilter,
|
|
280
|
+
FilterRefererFilter,
|
|
281
|
+
FilterProviderFilter,
|
|
282
|
+
FilterQueryParamsFilter,
|
|
283
|
+
FilterBytesSentFilter,
|
|
284
|
+
FilterDurationMsFilter,
|
|
285
|
+
]
|
|
@@ -2,15 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import Union, Iterable
|
|
5
|
+
from typing import List, Union, Iterable
|
|
6
6
|
from datetime import datetime
|
|
7
|
-
from typing_extensions import Literal, Required, Annotated, TypedDict
|
|
7
|
+
from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict
|
|
8
8
|
|
|
9
9
|
from .._types import SequenceNotStr
|
|
10
10
|
from .._utils import PropertyInfo
|
|
11
11
|
from .shared_params.pagination import Pagination
|
|
12
12
|
|
|
13
|
-
__all__ = [
|
|
13
|
+
__all__ = [
|
|
14
|
+
"PromptAnswersParams",
|
|
15
|
+
"Filter",
|
|
16
|
+
"FilterRegionIDFilter",
|
|
17
|
+
"FilterModelIDFilter",
|
|
18
|
+
"FilterTagIDFilter",
|
|
19
|
+
"FilterPromptTypeFilter",
|
|
20
|
+
"FilterPromptFilter",
|
|
21
|
+
"Include",
|
|
22
|
+
]
|
|
14
23
|
|
|
15
24
|
|
|
16
25
|
class PromptAnswersParams(TypedDict, total=False):
|
|
@@ -21,6 +30,7 @@ class PromptAnswersParams(TypedDict, total=False):
|
|
|
21
30
|
start_date: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
|
|
22
31
|
|
|
23
32
|
filters: Iterable[Filter]
|
|
33
|
+
"""List of filters to apply to the answers report."""
|
|
24
34
|
|
|
25
35
|
include: Include
|
|
26
36
|
|
|
@@ -28,8 +38,35 @@ class PromptAnswersParams(TypedDict, total=False):
|
|
|
28
38
|
"""Pagination parameters for the results. Default is 10,000 rows with no offset."""
|
|
29
39
|
|
|
30
40
|
|
|
31
|
-
class
|
|
32
|
-
field: Required[Literal["
|
|
41
|
+
class FilterRegionIDFilter(TypedDict, total=False):
|
|
42
|
+
field: Required[Literal["region_id", "region"]]
|
|
43
|
+
"""- `region` - Deprecated"""
|
|
44
|
+
|
|
45
|
+
operator: Required[Literal["is", "not_is", "in", "not_in"]]
|
|
46
|
+
|
|
47
|
+
value: Required[Union[str, SequenceNotStr[str]]]
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
class FilterModelIDFilter(TypedDict, total=False):
|
|
51
|
+
field: Required[Literal["model_id", "model"]]
|
|
52
|
+
"""- `model` - Deprecated"""
|
|
53
|
+
|
|
54
|
+
operator: Required[Literal["is", "not_is", "in", "not_in"]]
|
|
55
|
+
|
|
56
|
+
value: Required[Union[str, SequenceNotStr[str]]]
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
class FilterTagIDFilter(TypedDict, total=False):
|
|
60
|
+
field: Required[Literal["tag_id", "tag"]]
|
|
61
|
+
"""- `tag` - Deprecated"""
|
|
62
|
+
|
|
63
|
+
operator: Required[Literal["is", "not_is", "in", "not_in"]]
|
|
64
|
+
|
|
65
|
+
value: Required[Union[str, SequenceNotStr[str]]]
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
class FilterPromptTypeFilter(TypedDict, total=False):
|
|
69
|
+
field: Required[Literal["prompt_type"]]
|
|
33
70
|
|
|
34
71
|
operator: Required[
|
|
35
72
|
Literal[
|
|
@@ -39,17 +76,38 @@ class Filter(TypedDict, total=False):
|
|
|
39
76
|
"not_in",
|
|
40
77
|
"contains",
|
|
41
78
|
"not_contains",
|
|
79
|
+
"matches",
|
|
42
80
|
"contains_case_insensitive",
|
|
43
81
|
"not_contains_case_insensitive",
|
|
82
|
+
]
|
|
83
|
+
]
|
|
84
|
+
|
|
85
|
+
value: Required[Union[Literal["visibility", "sentiment"], List[Literal["visibility", "sentiment"]]]]
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
class FilterPromptFilter(TypedDict, total=False):
|
|
89
|
+
field: Required[Literal["prompt"]]
|
|
90
|
+
|
|
91
|
+
operator: Required[
|
|
92
|
+
Literal[
|
|
93
|
+
"is",
|
|
94
|
+
"not_is",
|
|
95
|
+
"in",
|
|
96
|
+
"not_in",
|
|
97
|
+
"contains",
|
|
98
|
+
"not_contains",
|
|
44
99
|
"matches",
|
|
100
|
+
"contains_case_insensitive",
|
|
101
|
+
"not_contains_case_insensitive",
|
|
45
102
|
]
|
|
46
103
|
]
|
|
47
104
|
|
|
48
|
-
value: Required[Union[str, SequenceNotStr[str]
|
|
49
|
-
|
|
105
|
+
value: Required[Union[str, SequenceNotStr[str]]]
|
|
106
|
+
|
|
50
107
|
|
|
51
|
-
|
|
52
|
-
|
|
108
|
+
Filter: TypeAlias = Union[
|
|
109
|
+
FilterRegionIDFilter, FilterModelIDFilter, FilterTagIDFilter, FilterPromptTypeFilter, FilterPromptFilter
|
|
110
|
+
]
|
|
53
111
|
|
|
54
112
|
|
|
55
113
|
class Include(TypedDict, total=False):
|
|
@@ -4,13 +4,25 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
from typing import Dict, List, Union, Iterable
|
|
6
6
|
from datetime import datetime
|
|
7
|
-
from typing_extensions import Literal, Required, Annotated, TypedDict
|
|
7
|
+
from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict
|
|
8
8
|
|
|
9
9
|
from .._types import SequenceNotStr
|
|
10
10
|
from .._utils import PropertyInfo
|
|
11
11
|
from .shared_params.pagination import Pagination
|
|
12
12
|
|
|
13
|
-
__all__ = [
|
|
13
|
+
__all__ = [
|
|
14
|
+
"ReportCitationsParams",
|
|
15
|
+
"Filter",
|
|
16
|
+
"FilterHostnameFilter",
|
|
17
|
+
"FilterAppModelsAnswerEngineInsightsFiltersPathFilter",
|
|
18
|
+
"FilterRegionIDFilter",
|
|
19
|
+
"FilterTopicIDFilter",
|
|
20
|
+
"FilterModelIDFilter",
|
|
21
|
+
"FilterTagIDFilter",
|
|
22
|
+
"FilterURLFilter",
|
|
23
|
+
"FilterRootDomainFilter",
|
|
24
|
+
"FilterPromptTypeFilter",
|
|
25
|
+
]
|
|
14
26
|
|
|
15
27
|
|
|
16
28
|
class ReportCitationsParams(TypedDict, total=False):
|
|
@@ -39,10 +51,7 @@ class ReportCitationsParams(TypedDict, total=False):
|
|
|
39
51
|
"""Dimensions to group the report by."""
|
|
40
52
|
|
|
41
53
|
filters: Iterable[Filter]
|
|
42
|
-
"""List of filters to apply to the report.
|
|
43
|
-
|
|
44
|
-
Each filter has an operator, field, and value.
|
|
45
|
-
"""
|
|
54
|
+
"""List of filters to apply to the citations report."""
|
|
46
55
|
|
|
47
56
|
order_by: Dict[str, Literal["asc", "desc"]]
|
|
48
57
|
"""Custom ordering of the report results.
|
|
@@ -61,8 +70,8 @@ class ReportCitationsParams(TypedDict, total=False):
|
|
|
61
70
|
"""Pagination settings for the report results."""
|
|
62
71
|
|
|
63
72
|
|
|
64
|
-
class
|
|
65
|
-
field: Required[Literal["hostname"
|
|
73
|
+
class FilterHostnameFilter(TypedDict, total=False):
|
|
74
|
+
field: Required[Literal["hostname"]]
|
|
66
75
|
|
|
67
76
|
operator: Required[
|
|
68
77
|
Literal[
|
|
@@ -72,14 +81,139 @@ class Filter(TypedDict, total=False):
|
|
|
72
81
|
"not_in",
|
|
73
82
|
"contains",
|
|
74
83
|
"not_contains",
|
|
84
|
+
"matches",
|
|
75
85
|
"contains_case_insensitive",
|
|
76
86
|
"not_contains_case_insensitive",
|
|
87
|
+
]
|
|
88
|
+
]
|
|
89
|
+
|
|
90
|
+
value: Required[Union[str, SequenceNotStr[str]]]
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
class FilterAppModelsAnswerEngineInsightsFiltersPathFilter(TypedDict, total=False):
|
|
94
|
+
field: Required[Literal["path"]]
|
|
95
|
+
|
|
96
|
+
operator: Required[
|
|
97
|
+
Literal[
|
|
98
|
+
"is",
|
|
99
|
+
"not_is",
|
|
100
|
+
"in",
|
|
101
|
+
"not_in",
|
|
102
|
+
"contains",
|
|
103
|
+
"not_contains",
|
|
77
104
|
"matches",
|
|
105
|
+
"contains_case_insensitive",
|
|
106
|
+
"not_contains_case_insensitive",
|
|
78
107
|
]
|
|
79
108
|
]
|
|
80
109
|
|
|
81
|
-
value: Required[Union[str, SequenceNotStr[str]
|
|
82
|
-
"""Value for the filter.
|
|
110
|
+
value: Required[Union[str, SequenceNotStr[str]]]
|
|
83
111
|
|
|
84
|
-
|
|
85
|
-
|
|
112
|
+
|
|
113
|
+
class FilterRegionIDFilter(TypedDict, total=False):
|
|
114
|
+
field: Required[Literal["region_id", "region"]]
|
|
115
|
+
"""- `region` - Deprecated"""
|
|
116
|
+
|
|
117
|
+
operator: Required[Literal["is", "not_is", "in", "not_in"]]
|
|
118
|
+
|
|
119
|
+
value: Required[Union[str, SequenceNotStr[str]]]
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
class FilterTopicIDFilter(TypedDict, total=False):
|
|
123
|
+
field: Required[Literal["topic_id", "topic"]]
|
|
124
|
+
"""- `topic` - Deprecated"""
|
|
125
|
+
|
|
126
|
+
operator: Required[Literal["is", "not_is", "in", "not_in"]]
|
|
127
|
+
|
|
128
|
+
value: Required[Union[str, SequenceNotStr[str]]]
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
class FilterModelIDFilter(TypedDict, total=False):
|
|
132
|
+
field: Required[Literal["model_id", "model"]]
|
|
133
|
+
"""- `model` - Deprecated"""
|
|
134
|
+
|
|
135
|
+
operator: Required[Literal["is", "not_is", "in", "not_in"]]
|
|
136
|
+
|
|
137
|
+
value: Required[Union[str, SequenceNotStr[str]]]
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
class FilterTagIDFilter(TypedDict, total=False):
|
|
141
|
+
field: Required[Literal["tag_id", "tag"]]
|
|
142
|
+
"""- `tag` - Deprecated"""
|
|
143
|
+
|
|
144
|
+
operator: Required[Literal["is", "not_is", "in", "not_in"]]
|
|
145
|
+
|
|
146
|
+
value: Required[Union[str, SequenceNotStr[str]]]
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
class FilterURLFilter(TypedDict, total=False):
|
|
150
|
+
field: Required[Literal["url"]]
|
|
151
|
+
|
|
152
|
+
operator: Required[
|
|
153
|
+
Literal[
|
|
154
|
+
"is",
|
|
155
|
+
"not_is",
|
|
156
|
+
"in",
|
|
157
|
+
"not_in",
|
|
158
|
+
"contains",
|
|
159
|
+
"not_contains",
|
|
160
|
+
"matches",
|
|
161
|
+
"contains_case_insensitive",
|
|
162
|
+
"not_contains_case_insensitive",
|
|
163
|
+
]
|
|
164
|
+
]
|
|
165
|
+
|
|
166
|
+
value: Required[Union[str, SequenceNotStr[str]]]
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
class FilterRootDomainFilter(TypedDict, total=False):
|
|
170
|
+
field: Required[Literal["root_domain"]]
|
|
171
|
+
|
|
172
|
+
operator: Required[
|
|
173
|
+
Literal[
|
|
174
|
+
"is",
|
|
175
|
+
"not_is",
|
|
176
|
+
"in",
|
|
177
|
+
"not_in",
|
|
178
|
+
"contains",
|
|
179
|
+
"not_contains",
|
|
180
|
+
"matches",
|
|
181
|
+
"contains_case_insensitive",
|
|
182
|
+
"not_contains_case_insensitive",
|
|
183
|
+
]
|
|
184
|
+
]
|
|
185
|
+
|
|
186
|
+
value: Required[Union[str, SequenceNotStr[str]]]
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
class FilterPromptTypeFilter(TypedDict, total=False):
|
|
190
|
+
field: Required[Literal["prompt_type"]]
|
|
191
|
+
|
|
192
|
+
operator: Required[
|
|
193
|
+
Literal[
|
|
194
|
+
"is",
|
|
195
|
+
"not_is",
|
|
196
|
+
"in",
|
|
197
|
+
"not_in",
|
|
198
|
+
"contains",
|
|
199
|
+
"not_contains",
|
|
200
|
+
"matches",
|
|
201
|
+
"contains_case_insensitive",
|
|
202
|
+
"not_contains_case_insensitive",
|
|
203
|
+
]
|
|
204
|
+
]
|
|
205
|
+
|
|
206
|
+
value: Required[Union[Literal["visibility", "sentiment"], List[Literal["visibility", "sentiment"]]]]
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
Filter: TypeAlias = Union[
|
|
210
|
+
FilterHostnameFilter,
|
|
211
|
+
FilterAppModelsAnswerEngineInsightsFiltersPathFilter,
|
|
212
|
+
FilterRegionIDFilter,
|
|
213
|
+
FilterTopicIDFilter,
|
|
214
|
+
FilterModelIDFilter,
|
|
215
|
+
FilterTagIDFilter,
|
|
216
|
+
FilterURLFilter,
|
|
217
|
+
FilterRootDomainFilter,
|
|
218
|
+
FilterPromptTypeFilter,
|
|
219
|
+
]
|
|
@@ -4,13 +4,23 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
from typing import Dict, List, Union, Iterable
|
|
6
6
|
from datetime import datetime
|
|
7
|
-
from typing_extensions import Literal, Required, Annotated, TypedDict
|
|
7
|
+
from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict
|
|
8
8
|
|
|
9
9
|
from .._types import SequenceNotStr
|
|
10
10
|
from .._utils import PropertyInfo
|
|
11
11
|
from .shared_params.pagination import Pagination
|
|
12
12
|
|
|
13
|
-
__all__ = [
|
|
13
|
+
__all__ = [
|
|
14
|
+
"ReportSentimentParams",
|
|
15
|
+
"Filter",
|
|
16
|
+
"FilterAssetNameFilter",
|
|
17
|
+
"FilterThemeFilter",
|
|
18
|
+
"FilterRegionIDFilter",
|
|
19
|
+
"FilterTopicIDFilter",
|
|
20
|
+
"FilterModelIDFilter",
|
|
21
|
+
"FilterTagIDFilter",
|
|
22
|
+
"FilterPromptFilter",
|
|
23
|
+
]
|
|
14
24
|
|
|
15
25
|
|
|
16
26
|
class ReportSentimentParams(TypedDict, total=False):
|
|
@@ -22,7 +32,7 @@ class ReportSentimentParams(TypedDict, total=False):
|
|
|
22
32
|
Accepts formats: YYYY-MM-DD, YYYY-MM-DD HH:MM, or full ISO timestamp.
|
|
23
33
|
"""
|
|
24
34
|
|
|
25
|
-
metrics: Required[List[Literal["positive", "negative"]]]
|
|
35
|
+
metrics: Required[List[Literal["positive", "negative", "ocurrences"]]]
|
|
26
36
|
|
|
27
37
|
start_date: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
|
|
28
38
|
"""Start date for the report.
|
|
@@ -33,14 +43,13 @@ class ReportSentimentParams(TypedDict, total=False):
|
|
|
33
43
|
date_interval: Literal["day", "week", "month", "year"]
|
|
34
44
|
"""Date interval for the report. (only used with date dimension)"""
|
|
35
45
|
|
|
36
|
-
dimensions: List[
|
|
46
|
+
dimensions: List[
|
|
47
|
+
Literal["theme", "date", "region", "topic", "model", "asset_name", "tag", "prompt", "sentiment_type"]
|
|
48
|
+
]
|
|
37
49
|
"""Dimensions to group the report by."""
|
|
38
50
|
|
|
39
51
|
filters: Iterable[Filter]
|
|
40
|
-
"""List of filters to apply to the report.
|
|
41
|
-
|
|
42
|
-
Each filter has an operator, field, and value.
|
|
43
|
-
"""
|
|
52
|
+
"""List of filters to apply to the sentiment report."""
|
|
44
53
|
|
|
45
54
|
order_by: Dict[str, Literal["asc", "desc"]]
|
|
46
55
|
"""Custom ordering of the report results.
|
|
@@ -59,8 +68,8 @@ class ReportSentimentParams(TypedDict, total=False):
|
|
|
59
68
|
"""Pagination settings for the report results."""
|
|
60
69
|
|
|
61
70
|
|
|
62
|
-
class
|
|
63
|
-
field: Required[Literal["asset_name"
|
|
71
|
+
class FilterAssetNameFilter(TypedDict, total=False):
|
|
72
|
+
field: Required[Literal["asset_name"]]
|
|
64
73
|
|
|
65
74
|
operator: Required[
|
|
66
75
|
Literal[
|
|
@@ -70,14 +79,97 @@ class Filter(TypedDict, total=False):
|
|
|
70
79
|
"not_in",
|
|
71
80
|
"contains",
|
|
72
81
|
"not_contains",
|
|
82
|
+
"matches",
|
|
73
83
|
"contains_case_insensitive",
|
|
74
84
|
"not_contains_case_insensitive",
|
|
85
|
+
]
|
|
86
|
+
]
|
|
87
|
+
|
|
88
|
+
value: Required[Union[str, SequenceNotStr[str]]]
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
class FilterThemeFilter(TypedDict, total=False):
|
|
92
|
+
field: Required[Literal["theme"]]
|
|
93
|
+
|
|
94
|
+
operator: Required[
|
|
95
|
+
Literal[
|
|
96
|
+
"is",
|
|
97
|
+
"not_is",
|
|
98
|
+
"in",
|
|
99
|
+
"not_in",
|
|
100
|
+
"contains",
|
|
101
|
+
"not_contains",
|
|
75
102
|
"matches",
|
|
103
|
+
"contains_case_insensitive",
|
|
104
|
+
"not_contains_case_insensitive",
|
|
76
105
|
]
|
|
77
106
|
]
|
|
78
107
|
|
|
79
|
-
value: Required[Union[str, SequenceNotStr[str]
|
|
80
|
-
"""Value for the filter.
|
|
108
|
+
value: Required[Union[str, SequenceNotStr[str]]]
|
|
81
109
|
|
|
82
|
-
|
|
83
|
-
|
|
110
|
+
|
|
111
|
+
class FilterRegionIDFilter(TypedDict, total=False):
|
|
112
|
+
field: Required[Literal["region_id", "region"]]
|
|
113
|
+
"""- `region` - Deprecated"""
|
|
114
|
+
|
|
115
|
+
operator: Required[Literal["is", "not_is", "in", "not_in"]]
|
|
116
|
+
|
|
117
|
+
value: Required[Union[str, SequenceNotStr[str]]]
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
class FilterTopicIDFilter(TypedDict, total=False):
|
|
121
|
+
field: Required[Literal["topic_id", "topic"]]
|
|
122
|
+
"""- `topic` - Deprecated"""
|
|
123
|
+
|
|
124
|
+
operator: Required[Literal["is", "not_is", "in", "not_in"]]
|
|
125
|
+
|
|
126
|
+
value: Required[Union[str, SequenceNotStr[str]]]
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
class FilterModelIDFilter(TypedDict, total=False):
|
|
130
|
+
field: Required[Literal["model_id", "model"]]
|
|
131
|
+
"""- `model` - Deprecated"""
|
|
132
|
+
|
|
133
|
+
operator: Required[Literal["is", "not_is", "in", "not_in"]]
|
|
134
|
+
|
|
135
|
+
value: Required[Union[str, SequenceNotStr[str]]]
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
class FilterTagIDFilter(TypedDict, total=False):
|
|
139
|
+
field: Required[Literal["tag_id", "tag"]]
|
|
140
|
+
"""- `tag` - Deprecated"""
|
|
141
|
+
|
|
142
|
+
operator: Required[Literal["is", "not_is", "in", "not_in"]]
|
|
143
|
+
|
|
144
|
+
value: Required[Union[str, SequenceNotStr[str]]]
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
class FilterPromptFilter(TypedDict, total=False):
|
|
148
|
+
field: Required[Literal["prompt"]]
|
|
149
|
+
|
|
150
|
+
operator: Required[
|
|
151
|
+
Literal[
|
|
152
|
+
"is",
|
|
153
|
+
"not_is",
|
|
154
|
+
"in",
|
|
155
|
+
"not_in",
|
|
156
|
+
"contains",
|
|
157
|
+
"not_contains",
|
|
158
|
+
"matches",
|
|
159
|
+
"contains_case_insensitive",
|
|
160
|
+
"not_contains_case_insensitive",
|
|
161
|
+
]
|
|
162
|
+
]
|
|
163
|
+
|
|
164
|
+
value: Required[Union[str, SequenceNotStr[str]]]
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
Filter: TypeAlias = Union[
|
|
168
|
+
FilterAssetNameFilter,
|
|
169
|
+
FilterThemeFilter,
|
|
170
|
+
FilterRegionIDFilter,
|
|
171
|
+
FilterTopicIDFilter,
|
|
172
|
+
FilterModelIDFilter,
|
|
173
|
+
FilterTagIDFilter,
|
|
174
|
+
FilterPromptFilter,
|
|
175
|
+
]
|
|
@@ -4,13 +4,22 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
from typing import Dict, List, Union, Iterable
|
|
6
6
|
from datetime import datetime
|
|
7
|
-
from typing_extensions import Literal, Required, Annotated, TypedDict
|
|
7
|
+
from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict
|
|
8
8
|
|
|
9
9
|
from .._types import SequenceNotStr
|
|
10
10
|
from .._utils import PropertyInfo
|
|
11
11
|
from .shared_params.pagination import Pagination
|
|
12
12
|
|
|
13
|
-
__all__ = [
|
|
13
|
+
__all__ = [
|
|
14
|
+
"ReportVisibilityParams",
|
|
15
|
+
"Filter",
|
|
16
|
+
"FilterRegionIDFilter",
|
|
17
|
+
"FilterModelIDFilter",
|
|
18
|
+
"FilterTopicIDFilter",
|
|
19
|
+
"FilterAssetNameFilter",
|
|
20
|
+
"FilterTagIDFilter",
|
|
21
|
+
"FilterPromptFilter",
|
|
22
|
+
]
|
|
14
23
|
|
|
15
24
|
|
|
16
25
|
class ReportVisibilityParams(TypedDict, total=False):
|
|
@@ -37,10 +46,7 @@ class ReportVisibilityParams(TypedDict, total=False):
|
|
|
37
46
|
"""Dimensions to group the report by."""
|
|
38
47
|
|
|
39
48
|
filters: Iterable[Filter]
|
|
40
|
-
"""List of filters to apply to the report.
|
|
41
|
-
|
|
42
|
-
Each filter has an operator, field, and value.
|
|
43
|
-
"""
|
|
49
|
+
"""List of filters to apply to the visibility report."""
|
|
44
50
|
|
|
45
51
|
order_by: Dict[str, Literal["asc", "desc"]]
|
|
46
52
|
"""Custom ordering of the report results.
|
|
@@ -59,8 +65,35 @@ class ReportVisibilityParams(TypedDict, total=False):
|
|
|
59
65
|
"""Pagination settings for the report results."""
|
|
60
66
|
|
|
61
67
|
|
|
62
|
-
class
|
|
63
|
-
field: Required[Literal["
|
|
68
|
+
class FilterRegionIDFilter(TypedDict, total=False):
|
|
69
|
+
field: Required[Literal["region_id", "region"]]
|
|
70
|
+
"""- `region` - Deprecated"""
|
|
71
|
+
|
|
72
|
+
operator: Required[Literal["is", "not_is", "in", "not_in"]]
|
|
73
|
+
|
|
74
|
+
value: Required[Union[str, SequenceNotStr[str]]]
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
class FilterModelIDFilter(TypedDict, total=False):
|
|
78
|
+
field: Required[Literal["model_id", "model"]]
|
|
79
|
+
"""- `model` - Deprecated"""
|
|
80
|
+
|
|
81
|
+
operator: Required[Literal["is", "not_is", "in", "not_in"]]
|
|
82
|
+
|
|
83
|
+
value: Required[Union[str, SequenceNotStr[str]]]
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
class FilterTopicIDFilter(TypedDict, total=False):
|
|
87
|
+
field: Required[Literal["topic_id", "topic"]]
|
|
88
|
+
"""- `topic` - Deprecated"""
|
|
89
|
+
|
|
90
|
+
operator: Required[Literal["is", "not_is", "in", "not_in"]]
|
|
91
|
+
|
|
92
|
+
value: Required[Union[str, SequenceNotStr[str]]]
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
class FilterAssetNameFilter(TypedDict, total=False):
|
|
96
|
+
field: Required[Literal["asset_name"]]
|
|
64
97
|
|
|
65
98
|
operator: Required[
|
|
66
99
|
Literal[
|
|
@@ -70,14 +103,49 @@ class Filter(TypedDict, total=False):
|
|
|
70
103
|
"not_in",
|
|
71
104
|
"contains",
|
|
72
105
|
"not_contains",
|
|
106
|
+
"matches",
|
|
73
107
|
"contains_case_insensitive",
|
|
74
108
|
"not_contains_case_insensitive",
|
|
109
|
+
]
|
|
110
|
+
]
|
|
111
|
+
|
|
112
|
+
value: Required[Union[str, SequenceNotStr[str]]]
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
class FilterTagIDFilter(TypedDict, total=False):
|
|
116
|
+
field: Required[Literal["tag_id", "tag"]]
|
|
117
|
+
"""- `tag` - Deprecated"""
|
|
118
|
+
|
|
119
|
+
operator: Required[Literal["is", "not_is", "in", "not_in"]]
|
|
120
|
+
|
|
121
|
+
value: Required[Union[str, SequenceNotStr[str]]]
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
class FilterPromptFilter(TypedDict, total=False):
|
|
125
|
+
field: Required[Literal["prompt"]]
|
|
126
|
+
|
|
127
|
+
operator: Required[
|
|
128
|
+
Literal[
|
|
129
|
+
"is",
|
|
130
|
+
"not_is",
|
|
131
|
+
"in",
|
|
132
|
+
"not_in",
|
|
133
|
+
"contains",
|
|
134
|
+
"not_contains",
|
|
75
135
|
"matches",
|
|
136
|
+
"contains_case_insensitive",
|
|
137
|
+
"not_contains_case_insensitive",
|
|
76
138
|
]
|
|
77
139
|
]
|
|
78
140
|
|
|
79
|
-
value: Required[Union[str, SequenceNotStr[str]
|
|
80
|
-
"""Value for the filter.
|
|
141
|
+
value: Required[Union[str, SequenceNotStr[str]]]
|
|
81
142
|
|
|
82
|
-
|
|
83
|
-
|
|
143
|
+
|
|
144
|
+
Filter: TypeAlias = Union[
|
|
145
|
+
FilterRegionIDFilter,
|
|
146
|
+
FilterModelIDFilter,
|
|
147
|
+
FilterTopicIDFilter,
|
|
148
|
+
FilterAssetNameFilter,
|
|
149
|
+
FilterTagIDFilter,
|
|
150
|
+
FilterPromptFilter,
|
|
151
|
+
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: profound
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.8.0
|
|
4
4
|
Summary: The official Python library for the profound API
|
|
5
5
|
Project-URL: Homepage, https://github.com/cooper-square-technologies/profound-python-sdk
|
|
6
6
|
Project-URL: Repository, https://github.com/cooper-square-technologies/profound-python-sdk
|
|
@@ -11,7 +11,7 @@ profound/_resource.py,sha256=YhL4zPjSsRL1L5E5naES_gV6TkUELjzC6kVxaY0PdHw,1112
|
|
|
11
11
|
profound/_response.py,sha256=x5yzUWG_0y3G0zsq7LymfLwgqaQmwvOA5-JptD0VOyA,28800
|
|
12
12
|
profound/_streaming.py,sha256=lmBTdPkE-WAfFtBQgTYup0lycgeOMOKKILPflxXzomg,10108
|
|
13
13
|
profound/_types.py,sha256=lpu9B2IW_aKN4UH2Wy6tCjfci53t1MckP0ymxKwiWbY,7238
|
|
14
|
-
profound/_version.py,sha256=
|
|
14
|
+
profound/_version.py,sha256=aBMA3KiAdn93YMw92t85B0BtR4QtJjfy-hQw3B74Hk0,160
|
|
15
15
|
profound/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
16
|
profound/_utils/__init__.py,sha256=7fch0GT9zpNnErbciSpUNa-SjTxxjY6kxHxKMOM4AGs,2305
|
|
17
17
|
profound/_utils/_compat.py,sha256=D8gtAvjJQrDWt9upS0XaG9Rr5l1QhiAx_I_1utT_tt0,1195
|
|
@@ -27,11 +27,11 @@ profound/_utils/_typing.py,sha256=N_5PPuFNsaygbtA_npZd98SVN1LQQvFTKL6bkWPBZGU,47
|
|
|
27
27
|
profound/_utils/_utils.py,sha256=0dDqauUbVZEXV0NVl7Bwu904Wwo5eyFCZpQThhFNhyA,12253
|
|
28
28
|
profound/lib/.keep,sha256=wuNrz-5SXo3jJaJOJgz4vFHM41YH_g20F5cRQo0vLes,224
|
|
29
29
|
profound/resources/__init__.py,sha256=W12BGTFhkNpAkkWMKyAXrUuOf0IYrxInKvM8PQtEFIs,1993
|
|
30
|
-
profound/resources/prompts.py,sha256=
|
|
31
|
-
profound/resources/reports.py,sha256=
|
|
30
|
+
profound/resources/prompts.py,sha256=kVyuNMqddyBbqmV3YBnP_lF_MBRfMsrc72x7840SygM,7661
|
|
31
|
+
profound/resources/reports.py,sha256=87eBPsS8Q0clC3wEZuyx8XaqeW0QDlt2GyvgsfxqbmI,24355
|
|
32
32
|
profound/resources/logs/__init__.py,sha256=O6f6TO4gow2FymLgYAZIzT_thUVOIf0MNWKIoHbyo0Q,937
|
|
33
33
|
profound/resources/logs/logs.py,sha256=5ZJXn0glWvBhgW6vzba0b-0g_bKGssW1Lo2spM-mz3s,3528
|
|
34
|
-
profound/resources/logs/raw.py,sha256=
|
|
34
|
+
profound/resources/logs/raw.py,sha256=Y0mOQE-95rVa89CpUemCb-_DRc66q-JXapIj-QWlgYE,18716
|
|
35
35
|
profound/resources/organizations/__init__.py,sha256=emv6wKVQMAX4fIUAee0XkQDQzwvpnrAZHrv9WPhDLIA,1145
|
|
36
36
|
profound/resources/organizations/categories.py,sha256=gHwuYsuHMX-JzgOZFO-Eft_O7rdBiwJ_V0iCf3kdkC4,14540
|
|
37
37
|
profound/resources/organizations/organizations.py,sha256=4EbpHSaS_wU05HOgAi_YRwB7A-PfO-PuQ4RQzcbyMog,10852
|
|
@@ -39,19 +39,19 @@ profound/types/__init__.py,sha256=NUlK_Mn9QqsbVgmbye_CO8XsHnUPvORzVb6_RflpK0k,11
|
|
|
39
39
|
profound/types/organization_domains_response.py,sha256=vpXf7RJnU8CoSbpeAgRzBPeDw7pVnr4LHOjsxdh17oc,478
|
|
40
40
|
profound/types/organization_models_response.py,sha256=7k8rbvmOA-iusEiTOfK7ZCC4d4BKBwDkKCUTjC3MCRM,293
|
|
41
41
|
profound/types/organization_regions_response.py,sha256=3rQ20rxQs7qGuHVx8W5P6y1dGSM9Qds3vwCQLm6Xqpk,295
|
|
42
|
-
profound/types/prompt_answers_params.py,sha256=
|
|
42
|
+
profound/types/prompt_answers_params.py,sha256=9yacCEt_gShcMeF_I7SDR08OUtW3OkfvundGID5sODE,3275
|
|
43
43
|
profound/types/prompt_answers_response.py,sha256=n9UVrTwAUmX4wi_OzlszPuZ3Vv80rey5k5_1ESR8spc,918
|
|
44
|
-
profound/types/report_citations_params.py,sha256=
|
|
44
|
+
profound/types/report_citations_params.py,sha256=5byUSS3rG3v_YcFKJfZBszmn1E5FbK6d8FCNN3j4E7w,5839
|
|
45
45
|
profound/types/report_citations_response.py,sha256=x7cWeAIS8coXoYmk0KxPB8idvnC-Qrdnhkubes7qWiI,399
|
|
46
46
|
profound/types/report_info.py,sha256=UCM4Ip1JQSjcO_0UfRivj1aLBSDbiynJxbZnp9UAc2k,278
|
|
47
47
|
profound/types/report_response.py,sha256=a9ffmdhkvoBQ8RiyV76XJ7kxIofm1t2d6QhDPQofPf0,381
|
|
48
48
|
profound/types/report_result.py,sha256=JOqZQb5keNw9wfaNF4YHGRgV3RTXgwfWhs1VM8Prqsk,257
|
|
49
|
-
profound/types/report_sentiment_params.py,sha256=
|
|
50
|
-
profound/types/report_visibility_params.py,sha256=
|
|
49
|
+
profound/types/report_sentiment_params.py,sha256=q1tktT-BHWcAutBg25Xr30WJKeeeECvPL1n8O8iiACI,4688
|
|
50
|
+
profound/types/report_visibility_params.py,sha256=jbbidv2X3aC2AJSdBpTgRn7-2yipoXhZoH14-LCye_w,4192
|
|
51
51
|
profound/types/logs/__init__.py,sha256=s00zfNR32tlguLjmtxhC_YcH8a1GVzhJEZOC6cYzr28,375
|
|
52
|
-
profound/types/logs/raw_bots_params.py,sha256=
|
|
52
|
+
profound/types/logs/raw_bots_params.py,sha256=SYhtdZnhO3GFOx-kL52diVKLyGmmLdrihDzrtOkEZOE,7058
|
|
53
53
|
profound/types/logs/raw_bots_response.py,sha256=7Qoh5rt6UTlJaz2I3EZHIDK8J_l1slc-Codl9AwULz4,885
|
|
54
|
-
profound/types/logs/raw_logs_params.py,sha256=
|
|
54
|
+
profound/types/logs/raw_logs_params.py,sha256=RVlWxR2Sml9YJrrNz-inwvzSm-n_-nFcFL75AAsTO5w,6983
|
|
55
55
|
profound/types/logs/raw_logs_response.py,sha256=Z3qafXC6qUZ8e_sG7x9PBKXU4Uu8eqBt2kb27FU3tAU,743
|
|
56
56
|
profound/types/organizations/__init__.py,sha256=feq64-7LJFh2pvyzJGJzAL-q8DG_KPkMC06dL5J-35g,503
|
|
57
57
|
profound/types/organizations/category_list_response.py,sha256=AvLmruxYC42Pn9ibXNiUah7idFW-tpn1HCBd399zkl4,267
|
|
@@ -63,7 +63,7 @@ profound/types/shared/__init__.py,sha256=Htv0wQd-4CHTwCC1FaroMpYcWIGFM2KdvXF8ay0
|
|
|
63
63
|
profound/types/shared/pagination.py,sha256=JU0XsGFY16yro_-uEvzI9rP0uMO583Q475htFoFeHjQ,412
|
|
64
64
|
profound/types/shared_params/__init__.py,sha256=Htv0wQd-4CHTwCC1FaroMpYcWIGFM2KdvXF8ay0nYuE,136
|
|
65
65
|
profound/types/shared_params/pagination.py,sha256=F8KqTI_WcSmLpLaGg8Vp4wEuNifrOBPY5MZV-GNy11E,405
|
|
66
|
-
profound-0.
|
|
67
|
-
profound-0.
|
|
68
|
-
profound-0.
|
|
69
|
-
profound-0.
|
|
66
|
+
profound-0.8.0.dist-info/METADATA,sha256=RhHOGBMgy5Nl4_0WaEg9gcps1bSL4NEFe06ymt4vCKU,14203
|
|
67
|
+
profound-0.8.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
|
68
|
+
profound-0.8.0.dist-info/licenses/LICENSE,sha256=mQrIrzZE8kr7w7NuHiw98Xz-EopSKzbT0MKGCsSRuPI,11338
|
|
69
|
+
profound-0.8.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|