profound 0.1.0__py3-none-any.whl → 0.2.1__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/_client.py +11 -30
- profound/_version.py +1 -1
- profound/resources/logs/raw.py +5 -5
- profound/resources/prompts.py +3 -3
- profound/resources/reports.py +24 -20
- profound/types/__init__.py +4 -4
- profound/types/logs/raw_bots_params.py +2 -2
- profound/types/logs/raw_bots_response.py +2 -2
- profound/types/logs/raw_logs_params.py +2 -2
- profound/types/logs/raw_logs_response.py +2 -2
- profound/types/prompt_answers_params.py +2 -2
- profound/types/report_citations_params.py +3 -3
- profound/types/report_citations_response.py +4 -4
- profound/types/{info.py → report_info.py} +2 -2
- profound/types/{response.py → report_response.py} +6 -6
- profound/types/{result.py → report_result.py} +2 -2
- profound/types/report_sentiment_params.py +3 -3
- profound/types/report_visibility_params.py +2 -2
- profound/types/shared/__init__.py +3 -0
- profound/types/shared/pagination.py +15 -0
- profound/types/shared_params/__init__.py +3 -0
- profound/types/{pagination_param.py → shared_params/pagination.py} +2 -2
- {profound-0.1.0.dist-info → profound-0.2.1.dist-info}/METADATA +1 -1
- {profound-0.1.0.dist-info → profound-0.2.1.dist-info}/RECORD +26 -23
- {profound-0.1.0.dist-info → profound-0.2.1.dist-info}/WHEEL +0 -0
- {profound-0.1.0.dist-info → profound-0.2.1.dist-info}/licenses/LICENSE +0 -0
profound/_client.py
CHANGED
|
@@ -12,7 +12,6 @@ from . import _exceptions
|
|
|
12
12
|
from ._qs import Querystring
|
|
13
13
|
from ._types import (
|
|
14
14
|
Omit,
|
|
15
|
-
Headers,
|
|
16
15
|
Timeout,
|
|
17
16
|
NotGiven,
|
|
18
17
|
Transport,
|
|
@@ -24,7 +23,7 @@ from ._utils import is_given, get_async_library
|
|
|
24
23
|
from ._version import __version__
|
|
25
24
|
from .resources import prompts, reports
|
|
26
25
|
from ._streaming import Stream as Stream, AsyncStream as AsyncStream
|
|
27
|
-
from ._exceptions import APIStatusError
|
|
26
|
+
from ._exceptions import ProfoundError, APIStatusError
|
|
28
27
|
from ._base_client import (
|
|
29
28
|
DEFAULT_MAX_RETRIES,
|
|
30
29
|
SyncAPIClient,
|
|
@@ -54,7 +53,7 @@ class Profound(SyncAPIClient):
|
|
|
54
53
|
with_streaming_response: ProfoundWithStreamedResponse
|
|
55
54
|
|
|
56
55
|
# client options
|
|
57
|
-
api_key: str
|
|
56
|
+
api_key: str
|
|
58
57
|
|
|
59
58
|
def __init__(
|
|
60
59
|
self,
|
|
@@ -85,6 +84,10 @@ class Profound(SyncAPIClient):
|
|
|
85
84
|
"""
|
|
86
85
|
if api_key is None:
|
|
87
86
|
api_key = os.environ.get("PROFOUND_API_KEY")
|
|
87
|
+
if api_key is None:
|
|
88
|
+
raise ProfoundError(
|
|
89
|
+
"The api_key client option must be set either by passing api_key to the client or by setting the PROFOUND_API_KEY environment variable"
|
|
90
|
+
)
|
|
88
91
|
self.api_key = api_key
|
|
89
92
|
|
|
90
93
|
if base_url is None:
|
|
@@ -119,8 +122,6 @@ class Profound(SyncAPIClient):
|
|
|
119
122
|
@override
|
|
120
123
|
def auth_headers(self) -> dict[str, str]:
|
|
121
124
|
api_key = self.api_key
|
|
122
|
-
if api_key is None:
|
|
123
|
-
return {}
|
|
124
125
|
return {"X-API-Key": api_key}
|
|
125
126
|
|
|
126
127
|
@property
|
|
@@ -132,17 +133,6 @@ class Profound(SyncAPIClient):
|
|
|
132
133
|
**self._custom_headers,
|
|
133
134
|
}
|
|
134
135
|
|
|
135
|
-
@override
|
|
136
|
-
def _validate_headers(self, headers: Headers, custom_headers: Headers) -> None:
|
|
137
|
-
if self.api_key and headers.get("X-API-Key"):
|
|
138
|
-
return
|
|
139
|
-
if isinstance(custom_headers.get("X-API-Key"), Omit):
|
|
140
|
-
return
|
|
141
|
-
|
|
142
|
-
raise TypeError(
|
|
143
|
-
'"Could not resolve authentication method. Expected the api_key to be set. Or for the `X-API-Key` headers to be explicitly omitted"'
|
|
144
|
-
)
|
|
145
|
-
|
|
146
136
|
def copy(
|
|
147
137
|
self,
|
|
148
138
|
*,
|
|
@@ -237,7 +227,7 @@ class AsyncProfound(AsyncAPIClient):
|
|
|
237
227
|
with_streaming_response: AsyncProfoundWithStreamedResponse
|
|
238
228
|
|
|
239
229
|
# client options
|
|
240
|
-
api_key: str
|
|
230
|
+
api_key: str
|
|
241
231
|
|
|
242
232
|
def __init__(
|
|
243
233
|
self,
|
|
@@ -268,6 +258,10 @@ class AsyncProfound(AsyncAPIClient):
|
|
|
268
258
|
"""
|
|
269
259
|
if api_key is None:
|
|
270
260
|
api_key = os.environ.get("PROFOUND_API_KEY")
|
|
261
|
+
if api_key is None:
|
|
262
|
+
raise ProfoundError(
|
|
263
|
+
"The api_key client option must be set either by passing api_key to the client or by setting the PROFOUND_API_KEY environment variable"
|
|
264
|
+
)
|
|
271
265
|
self.api_key = api_key
|
|
272
266
|
|
|
273
267
|
if base_url is None:
|
|
@@ -302,8 +296,6 @@ class AsyncProfound(AsyncAPIClient):
|
|
|
302
296
|
@override
|
|
303
297
|
def auth_headers(self) -> dict[str, str]:
|
|
304
298
|
api_key = self.api_key
|
|
305
|
-
if api_key is None:
|
|
306
|
-
return {}
|
|
307
299
|
return {"X-API-Key": api_key}
|
|
308
300
|
|
|
309
301
|
@property
|
|
@@ -315,17 +307,6 @@ class AsyncProfound(AsyncAPIClient):
|
|
|
315
307
|
**self._custom_headers,
|
|
316
308
|
}
|
|
317
309
|
|
|
318
|
-
@override
|
|
319
|
-
def _validate_headers(self, headers: Headers, custom_headers: Headers) -> None:
|
|
320
|
-
if self.api_key and headers.get("X-API-Key"):
|
|
321
|
-
return
|
|
322
|
-
if isinstance(custom_headers.get("X-API-Key"), Omit):
|
|
323
|
-
return
|
|
324
|
-
|
|
325
|
-
raise TypeError(
|
|
326
|
-
'"Could not resolve authentication method. Expected the api_key to be set. Or for the `X-API-Key` headers to be explicitly omitted"'
|
|
327
|
-
)
|
|
328
|
-
|
|
329
310
|
def copy(
|
|
330
311
|
self,
|
|
331
312
|
*,
|
profound/_version.py
CHANGED
profound/resources/logs/raw.py
CHANGED
|
@@ -20,9 +20,9 @@ from ..._response import (
|
|
|
20
20
|
)
|
|
21
21
|
from ...types.logs import raw_bots_params, raw_logs_params
|
|
22
22
|
from ..._base_client import make_request_options
|
|
23
|
-
from ...types.pagination_param import PaginationParam
|
|
24
23
|
from ...types.logs.raw_bots_response import RawBotsResponse
|
|
25
24
|
from ...types.logs.raw_logs_response import RawLogsResponse
|
|
25
|
+
from ...types.shared_params.pagination import Pagination
|
|
26
26
|
|
|
27
27
|
__all__ = ["RawResource", "AsyncRawResource"]
|
|
28
28
|
|
|
@@ -72,7 +72,7 @@ class RawResource(SyncAPIResource):
|
|
|
72
72
|
end_date: Union[str, datetime] | Omit = omit,
|
|
73
73
|
filters: Iterable[raw_bots_params.Filter] | Omit = omit,
|
|
74
74
|
order_by: Dict[str, Literal["asc", "desc"]] | Omit = omit,
|
|
75
|
-
pagination:
|
|
75
|
+
pagination: Pagination | Omit = omit,
|
|
76
76
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
77
77
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
78
78
|
extra_headers: Headers | None = None,
|
|
@@ -171,7 +171,7 @@ class RawResource(SyncAPIResource):
|
|
|
171
171
|
end_date: Union[str, datetime] | Omit = omit,
|
|
172
172
|
filters: Iterable[raw_logs_params.Filter] | Omit = omit,
|
|
173
173
|
order_by: Dict[str, Literal["asc", "desc"]] | Omit = omit,
|
|
174
|
-
pagination:
|
|
174
|
+
pagination: Pagination | Omit = omit,
|
|
175
175
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
176
176
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
177
177
|
extra_headers: Headers | None = None,
|
|
@@ -290,7 +290,7 @@ class AsyncRawResource(AsyncAPIResource):
|
|
|
290
290
|
end_date: Union[str, datetime] | Omit = omit,
|
|
291
291
|
filters: Iterable[raw_bots_params.Filter] | Omit = omit,
|
|
292
292
|
order_by: Dict[str, Literal["asc", "desc"]] | Omit = omit,
|
|
293
|
-
pagination:
|
|
293
|
+
pagination: Pagination | Omit = omit,
|
|
294
294
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
295
295
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
296
296
|
extra_headers: Headers | None = None,
|
|
@@ -389,7 +389,7 @@ class AsyncRawResource(AsyncAPIResource):
|
|
|
389
389
|
end_date: Union[str, datetime] | Omit = omit,
|
|
390
390
|
filters: Iterable[raw_logs_params.Filter] | Omit = omit,
|
|
391
391
|
order_by: Dict[str, Literal["asc", "desc"]] | Omit = omit,
|
|
392
|
-
pagination:
|
|
392
|
+
pagination: Pagination | Omit = omit,
|
|
393
393
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
394
394
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
395
395
|
extra_headers: Headers | None = None,
|
profound/resources/prompts.py
CHANGED
|
@@ -19,8 +19,8 @@ from .._response import (
|
|
|
19
19
|
async_to_streamed_response_wrapper,
|
|
20
20
|
)
|
|
21
21
|
from .._base_client import make_request_options
|
|
22
|
-
from ..types.pagination_param import PaginationParam
|
|
23
22
|
from ..types.prompt_answers_response import PromptAnswersResponse
|
|
23
|
+
from ..types.shared_params.pagination import Pagination
|
|
24
24
|
|
|
25
25
|
__all__ = ["PromptsResource", "AsyncPromptsResource"]
|
|
26
26
|
|
|
@@ -53,7 +53,7 @@ class PromptsResource(SyncAPIResource):
|
|
|
53
53
|
start_date: Union[str, datetime],
|
|
54
54
|
filters: Iterable[prompt_answers_params.Filter] | Omit = omit,
|
|
55
55
|
include: prompt_answers_params.Include | Omit = omit,
|
|
56
|
-
pagination:
|
|
56
|
+
pagination: Pagination | Omit = omit,
|
|
57
57
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
58
58
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
59
59
|
extra_headers: Headers | None = None,
|
|
@@ -123,7 +123,7 @@ class AsyncPromptsResource(AsyncAPIResource):
|
|
|
123
123
|
start_date: Union[str, datetime],
|
|
124
124
|
filters: Iterable[prompt_answers_params.Filter] | Omit = omit,
|
|
125
125
|
include: prompt_answers_params.Include | Omit = omit,
|
|
126
|
-
pagination:
|
|
126
|
+
pagination: Pagination | Omit = omit,
|
|
127
127
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
128
128
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
129
129
|
extra_headers: Headers | None = None,
|
profound/resources/reports.py
CHANGED
|
@@ -20,8 +20,8 @@ from .._response import (
|
|
|
20
20
|
async_to_streamed_response_wrapper,
|
|
21
21
|
)
|
|
22
22
|
from .._base_client import make_request_options
|
|
23
|
-
from ..types.
|
|
24
|
-
from ..types.
|
|
23
|
+
from ..types.report_response import ReportResponse
|
|
24
|
+
from ..types.shared_params.pagination import Pagination
|
|
25
25
|
from ..types.report_citations_response import ReportCitationsResponse
|
|
26
26
|
|
|
27
27
|
__all__ = ["ReportsResource", "AsyncReportsResource"]
|
|
@@ -55,10 +55,11 @@ class ReportsResource(SyncAPIResource):
|
|
|
55
55
|
metrics: List[Literal["count", "share_of_voice"]],
|
|
56
56
|
start_date: Union[str, datetime],
|
|
57
57
|
date_interval: Literal["day", "week", "month", "year"] | Omit = omit,
|
|
58
|
-
dimensions: List[Literal["hostname", "path", "date", "region", "topic", "model", "tag"]]
|
|
58
|
+
dimensions: List[Literal["hostname", "path", "date", "region", "topic", "model", "tag", "prompt"]]
|
|
59
|
+
| Omit = omit,
|
|
59
60
|
filters: Iterable[report_citations_params.Filter] | Omit = omit,
|
|
60
61
|
order_by: Dict[str, Literal["asc", "desc"]] | Omit = omit,
|
|
61
|
-
pagination:
|
|
62
|
+
pagination: Pagination | Omit = omit,
|
|
62
63
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
63
64
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
64
65
|
extra_headers: Headers | None = None,
|
|
@@ -135,17 +136,18 @@ class ReportsResource(SyncAPIResource):
|
|
|
135
136
|
metrics: List[Literal["positive", "negative"]],
|
|
136
137
|
start_date: Union[str, datetime],
|
|
137
138
|
date_interval: Literal["day", "week", "month", "year"] | Omit = omit,
|
|
138
|
-
dimensions: List[Literal["theme", "date", "region", "topic", "model", "asset_name", "tag"]]
|
|
139
|
+
dimensions: List[Literal["theme", "date", "region", "topic", "model", "asset_name", "tag", "prompt"]]
|
|
140
|
+
| Omit = omit,
|
|
139
141
|
filters: Iterable[report_sentiment_params.Filter] | Omit = omit,
|
|
140
142
|
order_by: Dict[str, Literal["asc", "desc"]] | Omit = omit,
|
|
141
|
-
pagination:
|
|
143
|
+
pagination: Pagination | Omit = omit,
|
|
142
144
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
143
145
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
144
146
|
extra_headers: Headers | None = None,
|
|
145
147
|
extra_query: Query | None = None,
|
|
146
148
|
extra_body: Body | None = None,
|
|
147
149
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
148
|
-
) ->
|
|
150
|
+
) -> ReportResponse:
|
|
149
151
|
"""Get citations for a given category.
|
|
150
152
|
|
|
151
153
|
Args:
|
|
@@ -204,7 +206,7 @@ class ReportsResource(SyncAPIResource):
|
|
|
204
206
|
options=make_request_options(
|
|
205
207
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
206
208
|
),
|
|
207
|
-
cast_to=
|
|
209
|
+
cast_to=ReportResponse,
|
|
208
210
|
)
|
|
209
211
|
|
|
210
212
|
def visibility(
|
|
@@ -218,14 +220,14 @@ class ReportsResource(SyncAPIResource):
|
|
|
218
220
|
dimensions: List[Literal["date", "region", "topic", "model", "asset_name", "prompt", "tag"]] | Omit = omit,
|
|
219
221
|
filters: Iterable[report_visibility_params.Filter] | Omit = omit,
|
|
220
222
|
order_by: Dict[str, Literal["asc", "desc"]] | Omit = omit,
|
|
221
|
-
pagination:
|
|
223
|
+
pagination: Pagination | Omit = omit,
|
|
222
224
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
223
225
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
224
226
|
extra_headers: Headers | None = None,
|
|
225
227
|
extra_query: Query | None = None,
|
|
226
228
|
extra_body: Body | None = None,
|
|
227
229
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
228
|
-
) ->
|
|
230
|
+
) -> ReportResponse:
|
|
229
231
|
"""Query visibility report.
|
|
230
232
|
|
|
231
233
|
Args:
|
|
@@ -284,7 +286,7 @@ class ReportsResource(SyncAPIResource):
|
|
|
284
286
|
options=make_request_options(
|
|
285
287
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
286
288
|
),
|
|
287
|
-
cast_to=
|
|
289
|
+
cast_to=ReportResponse,
|
|
288
290
|
)
|
|
289
291
|
|
|
290
292
|
|
|
@@ -316,10 +318,11 @@ class AsyncReportsResource(AsyncAPIResource):
|
|
|
316
318
|
metrics: List[Literal["count", "share_of_voice"]],
|
|
317
319
|
start_date: Union[str, datetime],
|
|
318
320
|
date_interval: Literal["day", "week", "month", "year"] | Omit = omit,
|
|
319
|
-
dimensions: List[Literal["hostname", "path", "date", "region", "topic", "model", "tag"]]
|
|
321
|
+
dimensions: List[Literal["hostname", "path", "date", "region", "topic", "model", "tag", "prompt"]]
|
|
322
|
+
| Omit = omit,
|
|
320
323
|
filters: Iterable[report_citations_params.Filter] | Omit = omit,
|
|
321
324
|
order_by: Dict[str, Literal["asc", "desc"]] | Omit = omit,
|
|
322
|
-
pagination:
|
|
325
|
+
pagination: Pagination | Omit = omit,
|
|
323
326
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
324
327
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
325
328
|
extra_headers: Headers | None = None,
|
|
@@ -396,17 +399,18 @@ class AsyncReportsResource(AsyncAPIResource):
|
|
|
396
399
|
metrics: List[Literal["positive", "negative"]],
|
|
397
400
|
start_date: Union[str, datetime],
|
|
398
401
|
date_interval: Literal["day", "week", "month", "year"] | Omit = omit,
|
|
399
|
-
dimensions: List[Literal["theme", "date", "region", "topic", "model", "asset_name", "tag"]]
|
|
402
|
+
dimensions: List[Literal["theme", "date", "region", "topic", "model", "asset_name", "tag", "prompt"]]
|
|
403
|
+
| Omit = omit,
|
|
400
404
|
filters: Iterable[report_sentiment_params.Filter] | Omit = omit,
|
|
401
405
|
order_by: Dict[str, Literal["asc", "desc"]] | Omit = omit,
|
|
402
|
-
pagination:
|
|
406
|
+
pagination: Pagination | Omit = omit,
|
|
403
407
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
404
408
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
405
409
|
extra_headers: Headers | None = None,
|
|
406
410
|
extra_query: Query | None = None,
|
|
407
411
|
extra_body: Body | None = None,
|
|
408
412
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
409
|
-
) ->
|
|
413
|
+
) -> ReportResponse:
|
|
410
414
|
"""Get citations for a given category.
|
|
411
415
|
|
|
412
416
|
Args:
|
|
@@ -465,7 +469,7 @@ class AsyncReportsResource(AsyncAPIResource):
|
|
|
465
469
|
options=make_request_options(
|
|
466
470
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
467
471
|
),
|
|
468
|
-
cast_to=
|
|
472
|
+
cast_to=ReportResponse,
|
|
469
473
|
)
|
|
470
474
|
|
|
471
475
|
async def visibility(
|
|
@@ -479,14 +483,14 @@ class AsyncReportsResource(AsyncAPIResource):
|
|
|
479
483
|
dimensions: List[Literal["date", "region", "topic", "model", "asset_name", "prompt", "tag"]] | Omit = omit,
|
|
480
484
|
filters: Iterable[report_visibility_params.Filter] | Omit = omit,
|
|
481
485
|
order_by: Dict[str, Literal["asc", "desc"]] | Omit = omit,
|
|
482
|
-
pagination:
|
|
486
|
+
pagination: Pagination | Omit = omit,
|
|
483
487
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
484
488
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
485
489
|
extra_headers: Headers | None = None,
|
|
486
490
|
extra_query: Query | None = None,
|
|
487
491
|
extra_body: Body | None = None,
|
|
488
492
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
489
|
-
) ->
|
|
493
|
+
) -> ReportResponse:
|
|
490
494
|
"""Query visibility report.
|
|
491
495
|
|
|
492
496
|
Args:
|
|
@@ -545,7 +549,7 @@ class AsyncReportsResource(AsyncAPIResource):
|
|
|
545
549
|
options=make_request_options(
|
|
546
550
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
547
551
|
),
|
|
548
|
-
cast_to=
|
|
552
|
+
cast_to=ReportResponse,
|
|
549
553
|
)
|
|
550
554
|
|
|
551
555
|
|
profound/types/__init__.py
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from .
|
|
6
|
-
from .
|
|
7
|
-
from .
|
|
8
|
-
from .
|
|
5
|
+
from .shared import Pagination as Pagination
|
|
6
|
+
from .report_info import ReportInfo as ReportInfo
|
|
7
|
+
from .report_result import ReportResult as ReportResult
|
|
8
|
+
from .report_response import ReportResponse as ReportResponse
|
|
9
9
|
from .prompt_answers_params import PromptAnswersParams as PromptAnswersParams
|
|
10
10
|
from .prompt_answers_response import PromptAnswersResponse as PromptAnswersResponse
|
|
11
11
|
from .report_citations_params import ReportCitationsParams as ReportCitationsParams
|
|
@@ -8,7 +8,7 @@ from typing_extensions import Literal, Required, Annotated, TypedDict
|
|
|
8
8
|
|
|
9
9
|
from ..._types import SequenceNotStr
|
|
10
10
|
from ..._utils import PropertyInfo
|
|
11
|
-
from ..
|
|
11
|
+
from ..shared_params.pagination import Pagination
|
|
12
12
|
|
|
13
13
|
__all__ = ["RawBotsParams", "Filter"]
|
|
14
14
|
|
|
@@ -70,7 +70,7 @@ class RawBotsParams(TypedDict, total=False):
|
|
|
70
70
|
descending.
|
|
71
71
|
"""
|
|
72
72
|
|
|
73
|
-
pagination:
|
|
73
|
+
pagination: Pagination
|
|
74
74
|
"""Pagination settings for the report results."""
|
|
75
75
|
|
|
76
76
|
|
|
@@ -5,7 +5,7 @@ from datetime import datetime
|
|
|
5
5
|
from typing_extensions import Literal, TypeAlias
|
|
6
6
|
|
|
7
7
|
from ..._models import BaseModel
|
|
8
|
-
from ..
|
|
8
|
+
from ..report_response import ReportResponse
|
|
9
9
|
|
|
10
10
|
__all__ = ["RawBotsResponse", "LogVisitBotList"]
|
|
11
11
|
|
|
@@ -42,4 +42,4 @@ class LogVisitBotList(BaseModel):
|
|
|
42
42
|
referer: Optional[str] = None
|
|
43
43
|
|
|
44
44
|
|
|
45
|
-
RawBotsResponse: TypeAlias = Union[List[LogVisitBotList],
|
|
45
|
+
RawBotsResponse: TypeAlias = Union[List[LogVisitBotList], ReportResponse]
|
|
@@ -8,7 +8,7 @@ from typing_extensions import Literal, Required, Annotated, TypedDict
|
|
|
8
8
|
|
|
9
9
|
from ..._types import SequenceNotStr
|
|
10
10
|
from ..._utils import PropertyInfo
|
|
11
|
-
from ..
|
|
11
|
+
from ..shared_params.pagination import Pagination
|
|
12
12
|
|
|
13
13
|
__all__ = ["RawLogsParams", "Filter"]
|
|
14
14
|
|
|
@@ -71,7 +71,7 @@ class RawLogsParams(TypedDict, total=False):
|
|
|
71
71
|
descending.
|
|
72
72
|
"""
|
|
73
73
|
|
|
74
|
-
pagination:
|
|
74
|
+
pagination: Pagination
|
|
75
75
|
"""Pagination settings for the report results."""
|
|
76
76
|
|
|
77
77
|
|
|
@@ -5,7 +5,7 @@ from datetime import datetime
|
|
|
5
5
|
from typing_extensions import TypeAlias
|
|
6
6
|
|
|
7
7
|
from ..._models import BaseModel
|
|
8
|
-
from ..
|
|
8
|
+
from ..report_response import ReportResponse
|
|
9
9
|
|
|
10
10
|
__all__ = ["RawLogsResponse", "LogVisitList"]
|
|
11
11
|
|
|
@@ -36,4 +36,4 @@ class LogVisitList(BaseModel):
|
|
|
36
36
|
referer: Optional[str] = None
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
RawLogsResponse: TypeAlias = Union[List[LogVisitList],
|
|
39
|
+
RawLogsResponse: TypeAlias = Union[List[LogVisitList], ReportResponse]
|
|
@@ -8,7 +8,7 @@ from typing_extensions import Literal, Required, Annotated, TypedDict
|
|
|
8
8
|
|
|
9
9
|
from .._types import SequenceNotStr
|
|
10
10
|
from .._utils import PropertyInfo
|
|
11
|
-
from .
|
|
11
|
+
from .shared_params.pagination import Pagination
|
|
12
12
|
|
|
13
13
|
__all__ = ["PromptAnswersParams", "Filter", "Include"]
|
|
14
14
|
|
|
@@ -24,7 +24,7 @@ class PromptAnswersParams(TypedDict, total=False):
|
|
|
24
24
|
|
|
25
25
|
include: Include
|
|
26
26
|
|
|
27
|
-
pagination:
|
|
27
|
+
pagination: Pagination
|
|
28
28
|
"""Pagination parameters for the results. Default is 10,000 rows with no offset."""
|
|
29
29
|
|
|
30
30
|
|
|
@@ -8,7 +8,7 @@ from typing_extensions import Literal, Required, Annotated, TypedDict
|
|
|
8
8
|
|
|
9
9
|
from .._types import SequenceNotStr
|
|
10
10
|
from .._utils import PropertyInfo
|
|
11
|
-
from .
|
|
11
|
+
from .shared_params.pagination import Pagination
|
|
12
12
|
|
|
13
13
|
__all__ = ["ReportCitationsParams", "Filter"]
|
|
14
14
|
|
|
@@ -33,7 +33,7 @@ class ReportCitationsParams(TypedDict, total=False):
|
|
|
33
33
|
date_interval: Literal["day", "week", "month", "year"]
|
|
34
34
|
"""Date interval for the report. (only used with date dimension)"""
|
|
35
35
|
|
|
36
|
-
dimensions: List[Literal["hostname", "path", "date", "region", "topic", "model", "tag"]]
|
|
36
|
+
dimensions: List[Literal["hostname", "path", "date", "region", "topic", "model", "tag", "prompt"]]
|
|
37
37
|
"""Dimensions to group the report by."""
|
|
38
38
|
|
|
39
39
|
filters: Iterable[Filter]
|
|
@@ -55,7 +55,7 @@ class ReportCitationsParams(TypedDict, total=False):
|
|
|
55
55
|
descending.
|
|
56
56
|
"""
|
|
57
57
|
|
|
58
|
-
pagination:
|
|
58
|
+
pagination: Pagination
|
|
59
59
|
"""Pagination settings for the report results."""
|
|
60
60
|
|
|
61
61
|
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
from typing import List
|
|
4
4
|
|
|
5
|
-
from .info import Info
|
|
6
|
-
from .result import Result
|
|
7
5
|
from .._models import BaseModel
|
|
6
|
+
from .report_info import ReportInfo
|
|
7
|
+
from .report_result import ReportResult
|
|
8
8
|
|
|
9
9
|
__all__ = ["ReportCitationsResponse"]
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
class ReportCitationsResponse(BaseModel):
|
|
13
|
-
data: List[
|
|
13
|
+
data: List[ReportResult]
|
|
14
14
|
|
|
15
|
-
info:
|
|
15
|
+
info: ReportInfo
|
|
16
16
|
"""Base model for report information."""
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
from typing import List
|
|
4
4
|
|
|
5
|
-
from .info import Info
|
|
6
|
-
from .result import Result
|
|
7
5
|
from .._models import BaseModel
|
|
6
|
+
from .report_info import ReportInfo
|
|
7
|
+
from .report_result import ReportResult
|
|
8
8
|
|
|
9
|
-
__all__ = ["
|
|
9
|
+
__all__ = ["ReportResponse"]
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
class
|
|
13
|
-
data: List[
|
|
12
|
+
class ReportResponse(BaseModel):
|
|
13
|
+
data: List[ReportResult]
|
|
14
14
|
|
|
15
|
-
info:
|
|
15
|
+
info: ReportInfo
|
|
16
16
|
"""Base model for report information."""
|
|
@@ -8,7 +8,7 @@ from typing_extensions import Literal, Required, Annotated, TypedDict
|
|
|
8
8
|
|
|
9
9
|
from .._types import SequenceNotStr
|
|
10
10
|
from .._utils import PropertyInfo
|
|
11
|
-
from .
|
|
11
|
+
from .shared_params.pagination import Pagination
|
|
12
12
|
|
|
13
13
|
__all__ = ["ReportSentimentParams", "Filter"]
|
|
14
14
|
|
|
@@ -33,7 +33,7 @@ class ReportSentimentParams(TypedDict, total=False):
|
|
|
33
33
|
date_interval: Literal["day", "week", "month", "year"]
|
|
34
34
|
"""Date interval for the report. (only used with date dimension)"""
|
|
35
35
|
|
|
36
|
-
dimensions: List[Literal["theme", "date", "region", "topic", "model", "asset_name", "tag"]]
|
|
36
|
+
dimensions: List[Literal["theme", "date", "region", "topic", "model", "asset_name", "tag", "prompt"]]
|
|
37
37
|
"""Dimensions to group the report by."""
|
|
38
38
|
|
|
39
39
|
filters: Iterable[Filter]
|
|
@@ -55,7 +55,7 @@ class ReportSentimentParams(TypedDict, total=False):
|
|
|
55
55
|
descending.
|
|
56
56
|
"""
|
|
57
57
|
|
|
58
|
-
pagination:
|
|
58
|
+
pagination: Pagination
|
|
59
59
|
"""Pagination settings for the report results."""
|
|
60
60
|
|
|
61
61
|
|
|
@@ -8,7 +8,7 @@ from typing_extensions import Literal, Required, Annotated, TypedDict
|
|
|
8
8
|
|
|
9
9
|
from .._types import SequenceNotStr
|
|
10
10
|
from .._utils import PropertyInfo
|
|
11
|
-
from .
|
|
11
|
+
from .shared_params.pagination import Pagination
|
|
12
12
|
|
|
13
13
|
__all__ = ["ReportVisibilityParams", "Filter"]
|
|
14
14
|
|
|
@@ -55,7 +55,7 @@ class ReportVisibilityParams(TypedDict, total=False):
|
|
|
55
55
|
descending.
|
|
56
56
|
"""
|
|
57
57
|
|
|
58
|
-
pagination:
|
|
58
|
+
pagination: Pagination
|
|
59
59
|
"""Pagination settings for the report results."""
|
|
60
60
|
|
|
61
61
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
from ..._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["Pagination"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Pagination(BaseModel):
|
|
11
|
+
limit: Optional[int] = None
|
|
12
|
+
"""Maximum number of results to return. Default is 10,000, maximum is 50,000."""
|
|
13
|
+
|
|
14
|
+
offset: Optional[int] = None
|
|
15
|
+
"""Offset for the results. Used for pagination."""
|
|
@@ -4,10 +4,10 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
from typing_extensions import TypedDict
|
|
6
6
|
|
|
7
|
-
__all__ = ["
|
|
7
|
+
__all__ = ["Pagination"]
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
class
|
|
10
|
+
class Pagination(TypedDict, total=False):
|
|
11
11
|
limit: int
|
|
12
12
|
"""Maximum number of results to return. Default is 10,000, maximum is 50,000."""
|
|
13
13
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: profound
|
|
3
|
-
Version: 0.1
|
|
3
|
+
Version: 0.2.1
|
|
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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
profound/__init__.py,sha256=HRSN6HOLquGlgt_YTzCJPZEhmDZXsKybF1ZmQK8XKeY,2683
|
|
2
2
|
profound/_base_client.py,sha256=v8BLlCfQx4-sNQrC9d6CVsYAcXoS2INlkf-ng8f1R6w,67049
|
|
3
|
-
profound/_client.py,sha256=
|
|
3
|
+
profound/_client.py,sha256=pspv7eKPSV1ng98wnlT8lGBOuV9GEjr6tc7-bIxattM,16745
|
|
4
4
|
profound/_compat.py,sha256=DQBVORjFb33zch24jzkhM14msvnzY7mmSmgDLaVFUM8,6562
|
|
5
5
|
profound/_constants.py,sha256=S14PFzyN9-I31wiV7SmIlL5Ga0MLHxdvegInGdXH7tM,462
|
|
6
6
|
profound/_exceptions.py,sha256=Nuk1mF-xw9lC3BANLWQ_-trv2zh_pVAjJC7IgpPhLHY,3224
|
|
@@ -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=3zpztKdmgTXfCQe-0CytfvJl1ANtAIQsmDNiBs9_NkQ,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,40 +27,43 @@ 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=XhERp4L4FVE4xTngslgmV7AVRh6SZzGcQzHO1lP02Hg,7525
|
|
31
|
+
profound/resources/reports.py,sha256=1mKC3DMerg7dPl8pht-RrkfUQAngHn9QJAv1Evx7r1Y,24435
|
|
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=Kt8qDBKXe8qvSi0pxPMOok72_7UQ1qczle8nka1aVWg,18950
|
|
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
|
|
38
|
-
profound/types/__init__.py,sha256=
|
|
39
|
-
profound/types/info.py,sha256=gk6QqoZkF3dyDXQm94KFJG-3erH20FWigoXGvFkC6bc,266
|
|
38
|
+
profound/types/__init__.py,sha256=NUlK_Mn9QqsbVgmbye_CO8XsHnUPvORzVb6_RflpK0k,1146
|
|
40
39
|
profound/types/organization_domains_response.py,sha256=vpXf7RJnU8CoSbpeAgRzBPeDw7pVnr4LHOjsxdh17oc,478
|
|
41
40
|
profound/types/organization_models_response.py,sha256=7k8rbvmOA-iusEiTOfK7ZCC4d4BKBwDkKCUTjC3MCRM,293
|
|
42
41
|
profound/types/organization_regions_response.py,sha256=3rQ20rxQs7qGuHVx8W5P6y1dGSM9Qds3vwCQLm6Xqpk,295
|
|
43
|
-
profound/types/
|
|
44
|
-
profound/types/prompt_answers_params.py,sha256=AkOGZNxIJFYnBjYuguBilNpN98_iQ0EM6a7IqAfVTGs,1781
|
|
42
|
+
profound/types/prompt_answers_params.py,sha256=5q2hrBL5ulpwqpDjr7C3zEvoXICMGTF44dxJHLYmUjQ,1779
|
|
45
43
|
profound/types/prompt_answers_response.py,sha256=lxRsAz3uWn7NQUXh1oTYHahCFDa5DF66zy07iDfWiPc,870
|
|
46
|
-
profound/types/report_citations_params.py,sha256=
|
|
47
|
-
profound/types/report_citations_response.py,sha256=
|
|
48
|
-
profound/types/
|
|
49
|
-
profound/types/
|
|
50
|
-
profound/types/
|
|
51
|
-
profound/types/
|
|
44
|
+
profound/types/report_citations_params.py,sha256=wrC8OMXiLvQcTz4AfRUurqIzaOJVFU5uNtFZw5JsPzk,2524
|
|
45
|
+
profound/types/report_citations_response.py,sha256=x7cWeAIS8coXoYmk0KxPB8idvnC-Qrdnhkubes7qWiI,399
|
|
46
|
+
profound/types/report_info.py,sha256=UCM4Ip1JQSjcO_0UfRivj1aLBSDbiynJxbZnp9UAc2k,278
|
|
47
|
+
profound/types/report_response.py,sha256=a9ffmdhkvoBQ8RiyV76XJ7kxIofm1t2d6QhDPQofPf0,381
|
|
48
|
+
profound/types/report_result.py,sha256=JOqZQb5keNw9wfaNF4YHGRgV3RTXgwfWhs1VM8Prqsk,257
|
|
49
|
+
profound/types/report_sentiment_params.py,sha256=YdGw_Aa3rRJZPQkjpvQwMWDnPNOc5acDVk2Zj4eIjrQ,2527
|
|
50
|
+
profound/types/report_visibility_params.py,sha256=LXqAUo8itg6z7xx0-FoIEE3RI35MkEeprpdKygmENxw,2553
|
|
52
51
|
profound/types/logs/__init__.py,sha256=s00zfNR32tlguLjmtxhC_YcH8a1GVzhJEZOC6cYzr28,375
|
|
53
|
-
profound/types/logs/raw_bots_params.py,sha256=
|
|
54
|
-
profound/types/logs/raw_bots_response.py,sha256=
|
|
55
|
-
profound/types/logs/raw_logs_params.py,sha256=
|
|
56
|
-
profound/types/logs/raw_logs_response.py,sha256=
|
|
52
|
+
profound/types/logs/raw_bots_params.py,sha256=ZDD82DcyNzbA4qlZsg9ApsfXKl0b2zsqXcYSpWAxwLo,2917
|
|
53
|
+
profound/types/logs/raw_bots_response.py,sha256=aktdinSJtpCsUF6rQBOTbB_3yHTn7uEaQKApoBZWNDk,873
|
|
54
|
+
profound/types/logs/raw_logs_params.py,sha256=I1enumH8pAiOp7EZoE5FPu5ed_eP-3vTJFmwA_6wlMY,2752
|
|
55
|
+
profound/types/logs/raw_logs_response.py,sha256=Z3qafXC6qUZ8e_sG7x9PBKXU4Uu8eqBt2kb27FU3tAU,743
|
|
57
56
|
profound/types/organizations/__init__.py,sha256=feq64-7LJFh2pvyzJGJzAL-q8DG_KPkMC06dL5J-35g,503
|
|
58
57
|
profound/types/organizations/category_list_response.py,sha256=AvLmruxYC42Pn9ibXNiUah7idFW-tpn1HCBd399zkl4,267
|
|
59
58
|
profound/types/organizations/category_prompts_response.py,sha256=PZ1GaZUK8asTFGxDvOb4iM9VPeHGNRBES3Ly7XfycTc,549
|
|
60
59
|
profound/types/organizations/category_tags_response.py,sha256=Zqxq9O6iUr9WTSXC_T1eF15nbo0zJzu9L0SZW663Kas,267
|
|
61
60
|
profound/types/organizations/category_topics_response.py,sha256=6KXLR0dm3n5WfjxnmN4FGwI7sIUCnBZn9RYXtQ2e914,271
|
|
62
61
|
profound/types/organizations/org_item.py,sha256=UuDIT8tcWLjplrT9Fr37bz1MO-HCQB8Hxdtb4g6POl8,198
|
|
63
|
-
profound
|
|
64
|
-
profound
|
|
65
|
-
profound
|
|
66
|
-
profound
|
|
62
|
+
profound/types/shared/__init__.py,sha256=Htv0wQd-4CHTwCC1FaroMpYcWIGFM2KdvXF8ay0nYuE,136
|
|
63
|
+
profound/types/shared/pagination.py,sha256=JU0XsGFY16yro_-uEvzI9rP0uMO583Q475htFoFeHjQ,412
|
|
64
|
+
profound/types/shared_params/__init__.py,sha256=Htv0wQd-4CHTwCC1FaroMpYcWIGFM2KdvXF8ay0nYuE,136
|
|
65
|
+
profound/types/shared_params/pagination.py,sha256=F8KqTI_WcSmLpLaGg8Vp4wEuNifrOBPY5MZV-GNy11E,405
|
|
66
|
+
profound-0.2.1.dist-info/METADATA,sha256=L7lfqozO2ozSDFh8Ojv7xbd9AjRd-kF77-YF4QhZxKs,14203
|
|
67
|
+
profound-0.2.1.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
|
68
|
+
profound-0.2.1.dist-info/licenses/LICENSE,sha256=mQrIrzZE8kr7w7NuHiw98Xz-EopSKzbT0MKGCsSRuPI,11338
|
|
69
|
+
profound-0.2.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|