profound 0.1.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/__init__.py +102 -0
- profound/_base_client.py +1995 -0
- profound/_client.py +448 -0
- profound/_compat.py +219 -0
- profound/_constants.py +14 -0
- profound/_exceptions.py +108 -0
- profound/_files.py +123 -0
- profound/_models.py +835 -0
- profound/_qs.py +150 -0
- profound/_resource.py +43 -0
- profound/_response.py +830 -0
- profound/_streaming.py +333 -0
- profound/_types.py +260 -0
- profound/_utils/__init__.py +64 -0
- profound/_utils/_compat.py +45 -0
- profound/_utils/_datetime_parse.py +136 -0
- profound/_utils/_logs.py +25 -0
- profound/_utils/_proxy.py +65 -0
- profound/_utils/_reflection.py +42 -0
- profound/_utils/_resources_proxy.py +24 -0
- profound/_utils/_streams.py +12 -0
- profound/_utils/_sync.py +86 -0
- profound/_utils/_transform.py +457 -0
- profound/_utils/_typing.py +156 -0
- profound/_utils/_utils.py +421 -0
- profound/_version.py +4 -0
- profound/lib/.keep +4 -0
- profound/py.typed +0 -0
- profound/resources/__init__.py +61 -0
- profound/resources/logs/__init__.py +33 -0
- profound/resources/logs/logs.py +102 -0
- profound/resources/logs/raw.py +511 -0
- profound/resources/organizations/__init__.py +33 -0
- profound/resources/organizations/categories.py +372 -0
- profound/resources/organizations/organizations.py +269 -0
- profound/resources/prompts.py +201 -0
- profound/resources/reports.py +609 -0
- profound/types/__init__.py +17 -0
- profound/types/info.py +13 -0
- profound/types/logs/__init__.py +8 -0
- profound/types/logs/raw_bots_params.py +111 -0
- profound/types/logs/raw_bots_response.py +45 -0
- profound/types/logs/raw_logs_params.py +99 -0
- profound/types/logs/raw_logs_response.py +39 -0
- profound/types/organization_domains_response.py +20 -0
- profound/types/organization_models_response.py +10 -0
- profound/types/organization_regions_response.py +10 -0
- profound/types/organizations/__init__.py +9 -0
- profound/types/organizations/category_list_response.py +10 -0
- profound/types/organizations/category_prompts_response.py +31 -0
- profound/types/organizations/category_tags_response.py +10 -0
- profound/types/organizations/category_topics_response.py +10 -0
- profound/types/organizations/org_item.py +11 -0
- profound/types/pagination_param.py +15 -0
- profound/types/prompt_answers_params.py +82 -0
- profound/types/prompt_answers_response.py +44 -0
- profound/types/report_citations_params.py +83 -0
- profound/types/report_citations_response.py +16 -0
- profound/types/report_sentiment_params.py +83 -0
- profound/types/report_visibility_params.py +83 -0
- profound/types/response.py +16 -0
- profound/types/result.py +13 -0
- profound-0.1.0.dist-info/METADATA +415 -0
- profound-0.1.0.dist-info/RECORD +66 -0
- profound-0.1.0.dist-info/WHEEL +4 -0
- profound-0.1.0.dist-info/licenses/LICENSE +201 -0
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Dict, List, Union, Iterable
|
|
6
|
+
from datetime import datetime
|
|
7
|
+
from typing_extensions import Literal, Required, Annotated, TypedDict
|
|
8
|
+
|
|
9
|
+
from ..._types import SequenceNotStr
|
|
10
|
+
from ..._utils import PropertyInfo
|
|
11
|
+
from ..pagination_param import PaginationParam
|
|
12
|
+
|
|
13
|
+
__all__ = ["RawBotsParams", "Filter"]
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class RawBotsParams(TypedDict, total=False):
|
|
17
|
+
domain: Required[str]
|
|
18
|
+
"""Domain to query logs for."""
|
|
19
|
+
|
|
20
|
+
metrics: Required[List[Literal["count"]]]
|
|
21
|
+
|
|
22
|
+
start_date: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
|
|
23
|
+
"""Start date for logs.
|
|
24
|
+
|
|
25
|
+
Accepts: YYYY-MM-DD, YYYY-MM-DD HH:MM, YYYY-MM-DD HH:MM:SS, or full ISO
|
|
26
|
+
timestamp.
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
date_interval: Literal["day", "week", "month", "year"]
|
|
30
|
+
"""Date interval for the report. (only used with date dimension)"""
|
|
31
|
+
|
|
32
|
+
dimensions: List[
|
|
33
|
+
Literal[
|
|
34
|
+
"method",
|
|
35
|
+
"path",
|
|
36
|
+
"status_code",
|
|
37
|
+
"ip",
|
|
38
|
+
"user_agent",
|
|
39
|
+
"referer",
|
|
40
|
+
"query_params",
|
|
41
|
+
"bot_name",
|
|
42
|
+
"bot_provider",
|
|
43
|
+
"bot_types",
|
|
44
|
+
]
|
|
45
|
+
]
|
|
46
|
+
"""Dimensions to group the report by."""
|
|
47
|
+
|
|
48
|
+
end_date: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
|
|
49
|
+
"""End date for logs.
|
|
50
|
+
|
|
51
|
+
Accepts same formats as start_date. Defaults to now if omitted.
|
|
52
|
+
"""
|
|
53
|
+
|
|
54
|
+
filters: Iterable[Filter]
|
|
55
|
+
"""List of filters to apply to the report.
|
|
56
|
+
|
|
57
|
+
Each filter has an operator, field, and value.
|
|
58
|
+
"""
|
|
59
|
+
|
|
60
|
+
order_by: Dict[str, Literal["asc", "desc"]]
|
|
61
|
+
"""Custom ordering of the report results.
|
|
62
|
+
|
|
63
|
+
The order is a record of key-value pairs where:
|
|
64
|
+
|
|
65
|
+
- key is the field to order by, which can be a metric or dimension
|
|
66
|
+
- value is the direction of the order, either 'asc' for ascending or 'desc' for
|
|
67
|
+
descending.
|
|
68
|
+
|
|
69
|
+
When not specified, the default order is the first metric in the query
|
|
70
|
+
descending.
|
|
71
|
+
"""
|
|
72
|
+
|
|
73
|
+
pagination: PaginationParam
|
|
74
|
+
"""Pagination settings for the report results."""
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
class Filter(TypedDict, total=False):
|
|
78
|
+
field: Required[
|
|
79
|
+
Literal[
|
|
80
|
+
"method",
|
|
81
|
+
"path",
|
|
82
|
+
"status_code",
|
|
83
|
+
"ip",
|
|
84
|
+
"user_agent",
|
|
85
|
+
"referer",
|
|
86
|
+
"query_params",
|
|
87
|
+
"bot_name",
|
|
88
|
+
"bot_provider",
|
|
89
|
+
"bot_types",
|
|
90
|
+
]
|
|
91
|
+
]
|
|
92
|
+
|
|
93
|
+
operator: Required[
|
|
94
|
+
Literal[
|
|
95
|
+
"is",
|
|
96
|
+
"not_is",
|
|
97
|
+
"in",
|
|
98
|
+
"not_in",
|
|
99
|
+
"contains",
|
|
100
|
+
"not_contains",
|
|
101
|
+
"contains_case_insensitive",
|
|
102
|
+
"not_contains_case_insensitive",
|
|
103
|
+
"matches",
|
|
104
|
+
]
|
|
105
|
+
]
|
|
106
|
+
|
|
107
|
+
value: Required[Union[str, SequenceNotStr[str], int, Iterable[int]]]
|
|
108
|
+
"""Value for the filter.
|
|
109
|
+
|
|
110
|
+
Can be a single value or a list of depending on the operator.
|
|
111
|
+
"""
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Dict, List, Union, Optional
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
from typing_extensions import Literal, TypeAlias
|
|
6
|
+
|
|
7
|
+
from ..._models import BaseModel
|
|
8
|
+
from ..response import Response
|
|
9
|
+
|
|
10
|
+
__all__ = ["RawBotsResponse", "LogVisitBotList"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class LogVisitBotList(BaseModel):
|
|
14
|
+
bot_name: str
|
|
15
|
+
|
|
16
|
+
bot_provider: str
|
|
17
|
+
|
|
18
|
+
bot_types: List[Literal["ai_assistant", "ai_training", "index"]]
|
|
19
|
+
|
|
20
|
+
host: str
|
|
21
|
+
|
|
22
|
+
ip: str
|
|
23
|
+
|
|
24
|
+
method: str
|
|
25
|
+
|
|
26
|
+
org_id: str
|
|
27
|
+
|
|
28
|
+
path: str
|
|
29
|
+
|
|
30
|
+
status_code: int
|
|
31
|
+
|
|
32
|
+
timestamp: datetime
|
|
33
|
+
|
|
34
|
+
user_agent: str
|
|
35
|
+
|
|
36
|
+
bytes_sent: Optional[int] = None
|
|
37
|
+
|
|
38
|
+
duration_ms: Optional[int] = None
|
|
39
|
+
|
|
40
|
+
query_params: Optional[Dict[str, str]] = None
|
|
41
|
+
|
|
42
|
+
referer: Optional[str] = None
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
RawBotsResponse: TypeAlias = Union[List[LogVisitBotList], Response]
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Dict, List, Union, Iterable
|
|
6
|
+
from datetime import datetime
|
|
7
|
+
from typing_extensions import Literal, Required, Annotated, TypedDict
|
|
8
|
+
|
|
9
|
+
from ..._types import SequenceNotStr
|
|
10
|
+
from ..._utils import PropertyInfo
|
|
11
|
+
from ..pagination_param import PaginationParam
|
|
12
|
+
|
|
13
|
+
__all__ = ["RawLogsParams", "Filter"]
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class RawLogsParams(TypedDict, total=False):
|
|
17
|
+
domain: Required[str]
|
|
18
|
+
"""Domain to query logs for."""
|
|
19
|
+
|
|
20
|
+
metrics: Required[List[Literal["count"]]]
|
|
21
|
+
|
|
22
|
+
start_date: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
|
|
23
|
+
"""Start date for logs.
|
|
24
|
+
|
|
25
|
+
Accepts: YYYY-MM-DD, YYYY-MM-DD HH:MM, YYYY-MM-DD HH:MM:SS, or full ISO
|
|
26
|
+
timestamp.
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
date_interval: Literal["day", "week", "month", "year"]
|
|
30
|
+
"""Date interval for the report. (only used with date dimension)"""
|
|
31
|
+
|
|
32
|
+
dimensions: List[
|
|
33
|
+
Literal[
|
|
34
|
+
"timestamp",
|
|
35
|
+
"method",
|
|
36
|
+
"host",
|
|
37
|
+
"path",
|
|
38
|
+
"status_code",
|
|
39
|
+
"ip",
|
|
40
|
+
"user_agent",
|
|
41
|
+
"referer",
|
|
42
|
+
"bytes_sent",
|
|
43
|
+
"duration_ms",
|
|
44
|
+
"query_params",
|
|
45
|
+
]
|
|
46
|
+
]
|
|
47
|
+
"""Dimensions to group the report by."""
|
|
48
|
+
|
|
49
|
+
end_date: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
|
|
50
|
+
"""End date for logs.
|
|
51
|
+
|
|
52
|
+
Accepts same formats as start_date. Defaults to now if omitted.
|
|
53
|
+
"""
|
|
54
|
+
|
|
55
|
+
filters: Iterable[Filter]
|
|
56
|
+
"""List of filters to apply to the report.
|
|
57
|
+
|
|
58
|
+
Each filter has an operator, field, and value.
|
|
59
|
+
"""
|
|
60
|
+
|
|
61
|
+
order_by: Dict[str, Literal["asc", "desc"]]
|
|
62
|
+
"""Custom ordering of the report results.
|
|
63
|
+
|
|
64
|
+
The order is a record of key-value pairs where:
|
|
65
|
+
|
|
66
|
+
- key is the field to order by, which can be a metric or dimension
|
|
67
|
+
- value is the direction of the order, either 'asc' for ascending or 'desc' for
|
|
68
|
+
descending.
|
|
69
|
+
|
|
70
|
+
When not specified, the default order is the first metric in the query
|
|
71
|
+
descending.
|
|
72
|
+
"""
|
|
73
|
+
|
|
74
|
+
pagination: PaginationParam
|
|
75
|
+
"""Pagination settings for the report results."""
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
class Filter(TypedDict, total=False):
|
|
79
|
+
field: Required[Literal["method", "path", "status_code", "ip", "user_agent", "referer", "query_params"]]
|
|
80
|
+
|
|
81
|
+
operator: Required[
|
|
82
|
+
Literal[
|
|
83
|
+
"is",
|
|
84
|
+
"not_is",
|
|
85
|
+
"in",
|
|
86
|
+
"not_in",
|
|
87
|
+
"contains",
|
|
88
|
+
"not_contains",
|
|
89
|
+
"contains_case_insensitive",
|
|
90
|
+
"not_contains_case_insensitive",
|
|
91
|
+
"matches",
|
|
92
|
+
]
|
|
93
|
+
]
|
|
94
|
+
|
|
95
|
+
value: Required[Union[str, SequenceNotStr[str], int, Iterable[int]]]
|
|
96
|
+
"""Value for the filter.
|
|
97
|
+
|
|
98
|
+
Can be a single value or a list of depending on the operator.
|
|
99
|
+
"""
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Dict, List, Union, Optional
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
from typing_extensions import TypeAlias
|
|
6
|
+
|
|
7
|
+
from ..._models import BaseModel
|
|
8
|
+
from ..response import Response
|
|
9
|
+
|
|
10
|
+
__all__ = ["RawLogsResponse", "LogVisitList"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class LogVisitList(BaseModel):
|
|
14
|
+
host: str
|
|
15
|
+
|
|
16
|
+
ip: str
|
|
17
|
+
|
|
18
|
+
method: str
|
|
19
|
+
|
|
20
|
+
org_id: str
|
|
21
|
+
|
|
22
|
+
path: str
|
|
23
|
+
|
|
24
|
+
status_code: int
|
|
25
|
+
|
|
26
|
+
timestamp: datetime
|
|
27
|
+
|
|
28
|
+
user_agent: str
|
|
29
|
+
|
|
30
|
+
bytes_sent: Optional[int] = None
|
|
31
|
+
|
|
32
|
+
duration_ms: Optional[int] = None
|
|
33
|
+
|
|
34
|
+
query_params: Optional[Dict[str, str]] = None
|
|
35
|
+
|
|
36
|
+
referer: Optional[str] = None
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
RawLogsResponse: TypeAlias = Union[List[LogVisitList], Response]
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
from typing_extensions import TypeAlias
|
|
6
|
+
|
|
7
|
+
from .._models import BaseModel
|
|
8
|
+
|
|
9
|
+
__all__ = ["OrganizationDomainsResponse", "OrganizationDomainsResponseItem"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class OrganizationDomainsResponseItem(BaseModel):
|
|
13
|
+
id: str
|
|
14
|
+
|
|
15
|
+
created_at: datetime
|
|
16
|
+
|
|
17
|
+
name: str
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
OrganizationDomainsResponse: TypeAlias = List[OrganizationDomainsResponseItem]
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List
|
|
4
|
+
from typing_extensions import TypeAlias
|
|
5
|
+
|
|
6
|
+
from .organizations.org_item import OrgItem
|
|
7
|
+
|
|
8
|
+
__all__ = ["OrganizationModelsResponse"]
|
|
9
|
+
|
|
10
|
+
OrganizationModelsResponse: TypeAlias = List[OrgItem]
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List
|
|
4
|
+
from typing_extensions import TypeAlias
|
|
5
|
+
|
|
6
|
+
from .organizations.org_item import OrgItem
|
|
7
|
+
|
|
8
|
+
__all__ = ["OrganizationRegionsResponse"]
|
|
9
|
+
|
|
10
|
+
OrganizationRegionsResponse: TypeAlias = List[OrgItem]
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from .org_item import OrgItem as OrgItem
|
|
6
|
+
from .category_list_response import CategoryListResponse as CategoryListResponse
|
|
7
|
+
from .category_tags_response import CategoryTagsResponse as CategoryTagsResponse
|
|
8
|
+
from .category_topics_response import CategoryTopicsResponse as CategoryTopicsResponse
|
|
9
|
+
from .category_prompts_response import CategoryPromptsResponse as CategoryPromptsResponse
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List
|
|
4
|
+
from typing_extensions import TypeAlias
|
|
5
|
+
|
|
6
|
+
from .org_item import OrgItem
|
|
7
|
+
|
|
8
|
+
__all__ = ["CategoryListResponse"]
|
|
9
|
+
|
|
10
|
+
CategoryListResponse: TypeAlias = List[OrgItem]
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Optional
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
|
|
6
|
+
from .org_item import OrgItem
|
|
7
|
+
from ..._models import BaseModel
|
|
8
|
+
|
|
9
|
+
__all__ = ["CategoryPromptsResponse", "Data"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class Data(BaseModel):
|
|
13
|
+
id: str
|
|
14
|
+
|
|
15
|
+
created_at: datetime
|
|
16
|
+
|
|
17
|
+
platforms: List[OrgItem]
|
|
18
|
+
|
|
19
|
+
prompt: str
|
|
20
|
+
|
|
21
|
+
prompt_type: str
|
|
22
|
+
|
|
23
|
+
regions: List[OrgItem]
|
|
24
|
+
|
|
25
|
+
topic: OrgItem
|
|
26
|
+
|
|
27
|
+
tags: Optional[List[OrgItem]] = None
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class CategoryPromptsResponse(BaseModel):
|
|
31
|
+
data: List[Data]
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List
|
|
4
|
+
from typing_extensions import TypeAlias
|
|
5
|
+
|
|
6
|
+
from .org_item import OrgItem
|
|
7
|
+
|
|
8
|
+
__all__ = ["CategoryTagsResponse"]
|
|
9
|
+
|
|
10
|
+
CategoryTagsResponse: TypeAlias = List[OrgItem]
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List
|
|
4
|
+
from typing_extensions import TypeAlias
|
|
5
|
+
|
|
6
|
+
from .org_item import OrgItem
|
|
7
|
+
|
|
8
|
+
__all__ = ["CategoryTopicsResponse"]
|
|
9
|
+
|
|
10
|
+
CategoryTopicsResponse: TypeAlias = List[OrgItem]
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["PaginationParam"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class PaginationParam(TypedDict, total=False):
|
|
11
|
+
limit: int
|
|
12
|
+
"""Maximum number of results to return. Default is 10,000, maximum is 50,000."""
|
|
13
|
+
|
|
14
|
+
offset: int
|
|
15
|
+
"""Offset for the results. Used for pagination."""
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Union, Iterable
|
|
6
|
+
from datetime import datetime
|
|
7
|
+
from typing_extensions import Literal, Required, Annotated, TypedDict
|
|
8
|
+
|
|
9
|
+
from .._types import SequenceNotStr
|
|
10
|
+
from .._utils import PropertyInfo
|
|
11
|
+
from .pagination_param import PaginationParam
|
|
12
|
+
|
|
13
|
+
__all__ = ["PromptAnswersParams", "Filter", "Include"]
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class PromptAnswersParams(TypedDict, total=False):
|
|
17
|
+
category_id: Required[str]
|
|
18
|
+
|
|
19
|
+
end_date: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
|
|
20
|
+
|
|
21
|
+
start_date: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
|
|
22
|
+
|
|
23
|
+
filters: Iterable[Filter]
|
|
24
|
+
|
|
25
|
+
include: Include
|
|
26
|
+
|
|
27
|
+
pagination: PaginationParam
|
|
28
|
+
"""Pagination parameters for the results. Default is 10,000 rows with no offset."""
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class Filter(TypedDict, total=False):
|
|
32
|
+
field: Required[Literal["region", "topic", "model", "prompt_type", "prompt", "tag"]]
|
|
33
|
+
|
|
34
|
+
operator: Required[
|
|
35
|
+
Literal[
|
|
36
|
+
"is",
|
|
37
|
+
"not_is",
|
|
38
|
+
"in",
|
|
39
|
+
"not_in",
|
|
40
|
+
"contains",
|
|
41
|
+
"not_contains",
|
|
42
|
+
"contains_case_insensitive",
|
|
43
|
+
"not_contains_case_insensitive",
|
|
44
|
+
"matches",
|
|
45
|
+
]
|
|
46
|
+
]
|
|
47
|
+
|
|
48
|
+
value: Required[Union[str, SequenceNotStr[str], int, Iterable[int]]]
|
|
49
|
+
"""Value for the filter.
|
|
50
|
+
|
|
51
|
+
Can be a single value or a list of depending on the operator.
|
|
52
|
+
"""
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
class Include(TypedDict, total=False):
|
|
56
|
+
asset: bool
|
|
57
|
+
|
|
58
|
+
citations: bool
|
|
59
|
+
|
|
60
|
+
created_at: bool
|
|
61
|
+
|
|
62
|
+
mentions: bool
|
|
63
|
+
|
|
64
|
+
model: bool
|
|
65
|
+
|
|
66
|
+
prompt: bool
|
|
67
|
+
|
|
68
|
+
prompt_id: bool
|
|
69
|
+
|
|
70
|
+
prompt_type: bool
|
|
71
|
+
|
|
72
|
+
region: bool
|
|
73
|
+
|
|
74
|
+
response: bool
|
|
75
|
+
|
|
76
|
+
run_id: bool
|
|
77
|
+
|
|
78
|
+
tags: bool
|
|
79
|
+
|
|
80
|
+
themes: bool
|
|
81
|
+
|
|
82
|
+
topic: bool
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Dict, List, Optional
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
|
|
6
|
+
from .._models import BaseModel
|
|
7
|
+
|
|
8
|
+
__all__ = ["PromptAnswersResponse", "Data"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class Data(BaseModel):
|
|
12
|
+
asset: Optional[str] = None
|
|
13
|
+
|
|
14
|
+
citations: Optional[List[str]] = None
|
|
15
|
+
|
|
16
|
+
created_at: Optional[datetime] = None
|
|
17
|
+
|
|
18
|
+
mentions: Optional[List[str]] = None
|
|
19
|
+
|
|
20
|
+
model: Optional[str] = None
|
|
21
|
+
|
|
22
|
+
prompt: Optional[str] = None
|
|
23
|
+
|
|
24
|
+
prompt_id: Optional[str] = None
|
|
25
|
+
|
|
26
|
+
prompt_type: Optional[str] = None
|
|
27
|
+
|
|
28
|
+
region: Optional[str] = None
|
|
29
|
+
|
|
30
|
+
response: Optional[str] = None
|
|
31
|
+
|
|
32
|
+
run_id: Optional[str] = None
|
|
33
|
+
|
|
34
|
+
tags: Optional[List[str]] = None
|
|
35
|
+
|
|
36
|
+
themes: Optional[List[str]] = None
|
|
37
|
+
|
|
38
|
+
topic: Optional[str] = None
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class PromptAnswersResponse(BaseModel):
|
|
42
|
+
data: List[Data]
|
|
43
|
+
|
|
44
|
+
info: Dict[str, object]
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Dict, List, Union, Iterable
|
|
6
|
+
from datetime import datetime
|
|
7
|
+
from typing_extensions import Literal, Required, Annotated, TypedDict
|
|
8
|
+
|
|
9
|
+
from .._types import SequenceNotStr
|
|
10
|
+
from .._utils import PropertyInfo
|
|
11
|
+
from .pagination_param import PaginationParam
|
|
12
|
+
|
|
13
|
+
__all__ = ["ReportCitationsParams", "Filter"]
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class ReportCitationsParams(TypedDict, total=False):
|
|
17
|
+
category_id: Required[str]
|
|
18
|
+
|
|
19
|
+
end_date: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
|
|
20
|
+
"""End date for the report.
|
|
21
|
+
|
|
22
|
+
Accepts formats: YYYY-MM-DD, YYYY-MM-DD HH:MM, or full ISO timestamp.
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
metrics: Required[List[Literal["count", "share_of_voice"]]]
|
|
26
|
+
|
|
27
|
+
start_date: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
|
|
28
|
+
"""Start date for the report.
|
|
29
|
+
|
|
30
|
+
Accepts formats: YYYY-MM-DD, YYYY-MM-DD HH:MM, or full ISO timestamp.
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
date_interval: Literal["day", "week", "month", "year"]
|
|
34
|
+
"""Date interval for the report. (only used with date dimension)"""
|
|
35
|
+
|
|
36
|
+
dimensions: List[Literal["hostname", "path", "date", "region", "topic", "model", "tag"]]
|
|
37
|
+
"""Dimensions to group the report by."""
|
|
38
|
+
|
|
39
|
+
filters: Iterable[Filter]
|
|
40
|
+
"""List of filters to apply to the report.
|
|
41
|
+
|
|
42
|
+
Each filter has an operator, field, and value.
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
order_by: Dict[str, Literal["asc", "desc"]]
|
|
46
|
+
"""Custom ordering of the report results.
|
|
47
|
+
|
|
48
|
+
The order is a record of key-value pairs where:
|
|
49
|
+
|
|
50
|
+
- key is the field to order by, which can be a metric or dimension
|
|
51
|
+
- value is the direction of the order, either 'asc' for ascending or 'desc' for
|
|
52
|
+
descending.
|
|
53
|
+
|
|
54
|
+
When not specified, the default order is the first metric in the query
|
|
55
|
+
descending.
|
|
56
|
+
"""
|
|
57
|
+
|
|
58
|
+
pagination: PaginationParam
|
|
59
|
+
"""Pagination settings for the report results."""
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
class Filter(TypedDict, total=False):
|
|
63
|
+
field: Required[Literal["hostname", "path", "region", "topic", "model", "tag"]]
|
|
64
|
+
|
|
65
|
+
operator: Required[
|
|
66
|
+
Literal[
|
|
67
|
+
"is",
|
|
68
|
+
"not_is",
|
|
69
|
+
"in",
|
|
70
|
+
"not_in",
|
|
71
|
+
"contains",
|
|
72
|
+
"not_contains",
|
|
73
|
+
"contains_case_insensitive",
|
|
74
|
+
"not_contains_case_insensitive",
|
|
75
|
+
"matches",
|
|
76
|
+
]
|
|
77
|
+
]
|
|
78
|
+
|
|
79
|
+
value: Required[Union[str, SequenceNotStr[str], int, Iterable[int]]]
|
|
80
|
+
"""Value for the filter.
|
|
81
|
+
|
|
82
|
+
Can be a single value or a list of depending on the operator.
|
|
83
|
+
"""
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List
|
|
4
|
+
|
|
5
|
+
from .info import Info
|
|
6
|
+
from .result import Result
|
|
7
|
+
from .._models import BaseModel
|
|
8
|
+
|
|
9
|
+
__all__ = ["ReportCitationsResponse"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ReportCitationsResponse(BaseModel):
|
|
13
|
+
data: List[Result]
|
|
14
|
+
|
|
15
|
+
info: Info
|
|
16
|
+
"""Base model for report information."""
|