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.

Files changed (66) hide show
  1. profound/__init__.py +102 -0
  2. profound/_base_client.py +1995 -0
  3. profound/_client.py +448 -0
  4. profound/_compat.py +219 -0
  5. profound/_constants.py +14 -0
  6. profound/_exceptions.py +108 -0
  7. profound/_files.py +123 -0
  8. profound/_models.py +835 -0
  9. profound/_qs.py +150 -0
  10. profound/_resource.py +43 -0
  11. profound/_response.py +830 -0
  12. profound/_streaming.py +333 -0
  13. profound/_types.py +260 -0
  14. profound/_utils/__init__.py +64 -0
  15. profound/_utils/_compat.py +45 -0
  16. profound/_utils/_datetime_parse.py +136 -0
  17. profound/_utils/_logs.py +25 -0
  18. profound/_utils/_proxy.py +65 -0
  19. profound/_utils/_reflection.py +42 -0
  20. profound/_utils/_resources_proxy.py +24 -0
  21. profound/_utils/_streams.py +12 -0
  22. profound/_utils/_sync.py +86 -0
  23. profound/_utils/_transform.py +457 -0
  24. profound/_utils/_typing.py +156 -0
  25. profound/_utils/_utils.py +421 -0
  26. profound/_version.py +4 -0
  27. profound/lib/.keep +4 -0
  28. profound/py.typed +0 -0
  29. profound/resources/__init__.py +61 -0
  30. profound/resources/logs/__init__.py +33 -0
  31. profound/resources/logs/logs.py +102 -0
  32. profound/resources/logs/raw.py +511 -0
  33. profound/resources/organizations/__init__.py +33 -0
  34. profound/resources/organizations/categories.py +372 -0
  35. profound/resources/organizations/organizations.py +269 -0
  36. profound/resources/prompts.py +201 -0
  37. profound/resources/reports.py +609 -0
  38. profound/types/__init__.py +17 -0
  39. profound/types/info.py +13 -0
  40. profound/types/logs/__init__.py +8 -0
  41. profound/types/logs/raw_bots_params.py +111 -0
  42. profound/types/logs/raw_bots_response.py +45 -0
  43. profound/types/logs/raw_logs_params.py +99 -0
  44. profound/types/logs/raw_logs_response.py +39 -0
  45. profound/types/organization_domains_response.py +20 -0
  46. profound/types/organization_models_response.py +10 -0
  47. profound/types/organization_regions_response.py +10 -0
  48. profound/types/organizations/__init__.py +9 -0
  49. profound/types/organizations/category_list_response.py +10 -0
  50. profound/types/organizations/category_prompts_response.py +31 -0
  51. profound/types/organizations/category_tags_response.py +10 -0
  52. profound/types/organizations/category_topics_response.py +10 -0
  53. profound/types/organizations/org_item.py +11 -0
  54. profound/types/pagination_param.py +15 -0
  55. profound/types/prompt_answers_params.py +82 -0
  56. profound/types/prompt_answers_response.py +44 -0
  57. profound/types/report_citations_params.py +83 -0
  58. profound/types/report_citations_response.py +16 -0
  59. profound/types/report_sentiment_params.py +83 -0
  60. profound/types/report_visibility_params.py +83 -0
  61. profound/types/response.py +16 -0
  62. profound/types/result.py +13 -0
  63. profound-0.1.0.dist-info/METADATA +415 -0
  64. profound-0.1.0.dist-info/RECORD +66 -0
  65. profound-0.1.0.dist-info/WHEEL +4 -0
  66. profound-0.1.0.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,201 @@
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
+
8
+ import httpx
9
+
10
+ from ..types import prompt_answers_params
11
+ from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
12
+ from .._utils import maybe_transform, async_maybe_transform
13
+ from .._compat import cached_property
14
+ from .._resource import SyncAPIResource, AsyncAPIResource
15
+ from .._response import (
16
+ to_raw_response_wrapper,
17
+ to_streamed_response_wrapper,
18
+ async_to_raw_response_wrapper,
19
+ async_to_streamed_response_wrapper,
20
+ )
21
+ from .._base_client import make_request_options
22
+ from ..types.pagination_param import PaginationParam
23
+ from ..types.prompt_answers_response import PromptAnswersResponse
24
+
25
+ __all__ = ["PromptsResource", "AsyncPromptsResource"]
26
+
27
+
28
+ class PromptsResource(SyncAPIResource):
29
+ @cached_property
30
+ def with_raw_response(self) -> PromptsResourceWithRawResponse:
31
+ """
32
+ This property can be used as a prefix for any HTTP method call to return
33
+ the raw response object instead of the parsed content.
34
+
35
+ For more information, see https://www.github.com/cooper-square-technologies/profound-python-sdk#accessing-raw-response-data-eg-headers
36
+ """
37
+ return PromptsResourceWithRawResponse(self)
38
+
39
+ @cached_property
40
+ def with_streaming_response(self) -> PromptsResourceWithStreamingResponse:
41
+ """
42
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
43
+
44
+ For more information, see https://www.github.com/cooper-square-technologies/profound-python-sdk#with_streaming_response
45
+ """
46
+ return PromptsResourceWithStreamingResponse(self)
47
+
48
+ def answers(
49
+ self,
50
+ *,
51
+ category_id: str,
52
+ end_date: Union[str, datetime],
53
+ start_date: Union[str, datetime],
54
+ filters: Iterable[prompt_answers_params.Filter] | Omit = omit,
55
+ include: prompt_answers_params.Include | Omit = omit,
56
+ pagination: PaginationParam | Omit = omit,
57
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
58
+ # The extra values given here take precedence over values defined on the client or passed to this method.
59
+ extra_headers: Headers | None = None,
60
+ extra_query: Query | None = None,
61
+ extra_body: Body | None = None,
62
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
63
+ ) -> PromptAnswersResponse:
64
+ """
65
+ Get the answers for the prompts.
66
+
67
+ Args:
68
+ pagination: Pagination parameters for the results. Default is 10,000 rows with no offset.
69
+
70
+ extra_headers: Send extra headers
71
+
72
+ extra_query: Add additional query parameters to the request
73
+
74
+ extra_body: Add additional JSON properties to the request
75
+
76
+ timeout: Override the client-level default timeout for this request, in seconds
77
+ """
78
+ return self._post(
79
+ "/v1/prompts/answers",
80
+ body=maybe_transform(
81
+ {
82
+ "category_id": category_id,
83
+ "end_date": end_date,
84
+ "start_date": start_date,
85
+ "filters": filters,
86
+ "include": include,
87
+ "pagination": pagination,
88
+ },
89
+ prompt_answers_params.PromptAnswersParams,
90
+ ),
91
+ options=make_request_options(
92
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
93
+ ),
94
+ cast_to=PromptAnswersResponse,
95
+ )
96
+
97
+
98
+ class AsyncPromptsResource(AsyncAPIResource):
99
+ @cached_property
100
+ def with_raw_response(self) -> AsyncPromptsResourceWithRawResponse:
101
+ """
102
+ This property can be used as a prefix for any HTTP method call to return
103
+ the raw response object instead of the parsed content.
104
+
105
+ For more information, see https://www.github.com/cooper-square-technologies/profound-python-sdk#accessing-raw-response-data-eg-headers
106
+ """
107
+ return AsyncPromptsResourceWithRawResponse(self)
108
+
109
+ @cached_property
110
+ def with_streaming_response(self) -> AsyncPromptsResourceWithStreamingResponse:
111
+ """
112
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
113
+
114
+ For more information, see https://www.github.com/cooper-square-technologies/profound-python-sdk#with_streaming_response
115
+ """
116
+ return AsyncPromptsResourceWithStreamingResponse(self)
117
+
118
+ async def answers(
119
+ self,
120
+ *,
121
+ category_id: str,
122
+ end_date: Union[str, datetime],
123
+ start_date: Union[str, datetime],
124
+ filters: Iterable[prompt_answers_params.Filter] | Omit = omit,
125
+ include: prompt_answers_params.Include | Omit = omit,
126
+ pagination: PaginationParam | Omit = omit,
127
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
128
+ # The extra values given here take precedence over values defined on the client or passed to this method.
129
+ extra_headers: Headers | None = None,
130
+ extra_query: Query | None = None,
131
+ extra_body: Body | None = None,
132
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
133
+ ) -> PromptAnswersResponse:
134
+ """
135
+ Get the answers for the prompts.
136
+
137
+ Args:
138
+ pagination: Pagination parameters for the results. Default is 10,000 rows with no offset.
139
+
140
+ extra_headers: Send extra headers
141
+
142
+ extra_query: Add additional query parameters to the request
143
+
144
+ extra_body: Add additional JSON properties to the request
145
+
146
+ timeout: Override the client-level default timeout for this request, in seconds
147
+ """
148
+ return await self._post(
149
+ "/v1/prompts/answers",
150
+ body=await async_maybe_transform(
151
+ {
152
+ "category_id": category_id,
153
+ "end_date": end_date,
154
+ "start_date": start_date,
155
+ "filters": filters,
156
+ "include": include,
157
+ "pagination": pagination,
158
+ },
159
+ prompt_answers_params.PromptAnswersParams,
160
+ ),
161
+ options=make_request_options(
162
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
163
+ ),
164
+ cast_to=PromptAnswersResponse,
165
+ )
166
+
167
+
168
+ class PromptsResourceWithRawResponse:
169
+ def __init__(self, prompts: PromptsResource) -> None:
170
+ self._prompts = prompts
171
+
172
+ self.answers = to_raw_response_wrapper(
173
+ prompts.answers,
174
+ )
175
+
176
+
177
+ class AsyncPromptsResourceWithRawResponse:
178
+ def __init__(self, prompts: AsyncPromptsResource) -> None:
179
+ self._prompts = prompts
180
+
181
+ self.answers = async_to_raw_response_wrapper(
182
+ prompts.answers,
183
+ )
184
+
185
+
186
+ class PromptsResourceWithStreamingResponse:
187
+ def __init__(self, prompts: PromptsResource) -> None:
188
+ self._prompts = prompts
189
+
190
+ self.answers = to_streamed_response_wrapper(
191
+ prompts.answers,
192
+ )
193
+
194
+
195
+ class AsyncPromptsResourceWithStreamingResponse:
196
+ def __init__(self, prompts: AsyncPromptsResource) -> None:
197
+ self._prompts = prompts
198
+
199
+ self.answers = async_to_streamed_response_wrapper(
200
+ prompts.answers,
201
+ )