scale-gp-beta 0.1.0a2__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.
Files changed (78) hide show
  1. scale_gp/__init__.py +96 -0
  2. scale_gp/_base_client.py +2058 -0
  3. scale_gp/_client.py +544 -0
  4. scale_gp/_compat.py +219 -0
  5. scale_gp/_constants.py +14 -0
  6. scale_gp/_exceptions.py +108 -0
  7. scale_gp/_files.py +123 -0
  8. scale_gp/_models.py +801 -0
  9. scale_gp/_qs.py +150 -0
  10. scale_gp/_resource.py +43 -0
  11. scale_gp/_response.py +830 -0
  12. scale_gp/_streaming.py +333 -0
  13. scale_gp/_types.py +217 -0
  14. scale_gp/_utils/__init__.py +57 -0
  15. scale_gp/_utils/_logs.py +25 -0
  16. scale_gp/_utils/_proxy.py +62 -0
  17. scale_gp/_utils/_reflection.py +42 -0
  18. scale_gp/_utils/_streams.py +12 -0
  19. scale_gp/_utils/_sync.py +86 -0
  20. scale_gp/_utils/_transform.py +402 -0
  21. scale_gp/_utils/_typing.py +149 -0
  22. scale_gp/_utils/_utils.py +414 -0
  23. scale_gp/_version.py +4 -0
  24. scale_gp/lib/.keep +4 -0
  25. scale_gp/pagination.py +83 -0
  26. scale_gp/py.typed +0 -0
  27. scale_gp/resources/__init__.py +103 -0
  28. scale_gp/resources/chat/__init__.py +33 -0
  29. scale_gp/resources/chat/chat.py +102 -0
  30. scale_gp/resources/chat/completions.py +1054 -0
  31. scale_gp/resources/completions.py +765 -0
  32. scale_gp/resources/files/__init__.py +33 -0
  33. scale_gp/resources/files/content.py +162 -0
  34. scale_gp/resources/files/files.py +558 -0
  35. scale_gp/resources/inference.py +210 -0
  36. scale_gp/resources/models.py +834 -0
  37. scale_gp/resources/question_sets.py +680 -0
  38. scale_gp/resources/questions.py +396 -0
  39. scale_gp/types/__init__.py +33 -0
  40. scale_gp/types/chat/__init__.py +8 -0
  41. scale_gp/types/chat/chat_completion.py +257 -0
  42. scale_gp/types/chat/chat_completion_chunk.py +240 -0
  43. scale_gp/types/chat/completion_create_params.py +156 -0
  44. scale_gp/types/chat/completion_create_response.py +11 -0
  45. scale_gp/types/completion.py +116 -0
  46. scale_gp/types/completion_create_params.py +108 -0
  47. scale_gp/types/file.py +30 -0
  48. scale_gp/types/file_create_params.py +13 -0
  49. scale_gp/types/file_delete_response.py +16 -0
  50. scale_gp/types/file_list.py +27 -0
  51. scale_gp/types/file_list_params.py +16 -0
  52. scale_gp/types/file_update_params.py +12 -0
  53. scale_gp/types/files/__init__.py +3 -0
  54. scale_gp/types/inference_create_params.py +25 -0
  55. scale_gp/types/inference_create_response.py +11 -0
  56. scale_gp/types/inference_model.py +167 -0
  57. scale_gp/types/inference_model_list.py +27 -0
  58. scale_gp/types/inference_response.py +14 -0
  59. scale_gp/types/inference_response_chunk.py +14 -0
  60. scale_gp/types/model_create_params.py +165 -0
  61. scale_gp/types/model_delete_response.py +16 -0
  62. scale_gp/types/model_list_params.py +20 -0
  63. scale_gp/types/model_update_params.py +161 -0
  64. scale_gp/types/question.py +68 -0
  65. scale_gp/types/question_create_params.py +59 -0
  66. scale_gp/types/question_list.py +27 -0
  67. scale_gp/types/question_list_params.py +16 -0
  68. scale_gp/types/question_set.py +106 -0
  69. scale_gp/types/question_set_create_params.py +115 -0
  70. scale_gp/types/question_set_delete_response.py +16 -0
  71. scale_gp/types/question_set_list.py +27 -0
  72. scale_gp/types/question_set_list_params.py +20 -0
  73. scale_gp/types/question_set_retrieve_params.py +12 -0
  74. scale_gp/types/question_set_update_params.py +23 -0
  75. scale_gp_beta-0.1.0a2.dist-info/METADATA +440 -0
  76. scale_gp_beta-0.1.0a2.dist-info/RECORD +78 -0
  77. scale_gp_beta-0.1.0a2.dist-info/WHEEL +4 -0
  78. scale_gp_beta-0.1.0a2.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,33 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from .files import (
4
+ FilesResource,
5
+ AsyncFilesResource,
6
+ FilesResourceWithRawResponse,
7
+ AsyncFilesResourceWithRawResponse,
8
+ FilesResourceWithStreamingResponse,
9
+ AsyncFilesResourceWithStreamingResponse,
10
+ )
11
+ from .content import (
12
+ ContentResource,
13
+ AsyncContentResource,
14
+ ContentResourceWithRawResponse,
15
+ AsyncContentResourceWithRawResponse,
16
+ ContentResourceWithStreamingResponse,
17
+ AsyncContentResourceWithStreamingResponse,
18
+ )
19
+
20
+ __all__ = [
21
+ "ContentResource",
22
+ "AsyncContentResource",
23
+ "ContentResourceWithRawResponse",
24
+ "AsyncContentResourceWithRawResponse",
25
+ "ContentResourceWithStreamingResponse",
26
+ "AsyncContentResourceWithStreamingResponse",
27
+ "FilesResource",
28
+ "AsyncFilesResource",
29
+ "FilesResourceWithRawResponse",
30
+ "AsyncFilesResourceWithRawResponse",
31
+ "FilesResourceWithStreamingResponse",
32
+ "AsyncFilesResourceWithStreamingResponse",
33
+ ]
@@ -0,0 +1,162 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ import httpx
6
+
7
+ from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
8
+ from ..._compat import cached_property
9
+ from ..._resource import SyncAPIResource, AsyncAPIResource
10
+ from ..._response import (
11
+ to_raw_response_wrapper,
12
+ to_streamed_response_wrapper,
13
+ async_to_raw_response_wrapper,
14
+ async_to_streamed_response_wrapper,
15
+ )
16
+ from ..._base_client import make_request_options
17
+
18
+ __all__ = ["ContentResource", "AsyncContentResource"]
19
+
20
+
21
+ class ContentResource(SyncAPIResource):
22
+ @cached_property
23
+ def with_raw_response(self) -> ContentResourceWithRawResponse:
24
+ """
25
+ This property can be used as a prefix for any HTTP method call to return
26
+ the raw response object instead of the parsed content.
27
+
28
+ For more information, see https://www.github.com/scaleapi/sgp-python-beta#accessing-raw-response-data-eg-headers
29
+ """
30
+ return ContentResourceWithRawResponse(self)
31
+
32
+ @cached_property
33
+ def with_streaming_response(self) -> ContentResourceWithStreamingResponse:
34
+ """
35
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
36
+
37
+ For more information, see https://www.github.com/scaleapi/sgp-python-beta#with_streaming_response
38
+ """
39
+ return ContentResourceWithStreamingResponse(self)
40
+
41
+ def retrieve(
42
+ self,
43
+ file_id: str,
44
+ *,
45
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
46
+ # The extra values given here take precedence over values defined on the client or passed to this method.
47
+ extra_headers: Headers | None = None,
48
+ extra_query: Query | None = None,
49
+ extra_body: Body | None = None,
50
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
51
+ ) -> object:
52
+ """
53
+ Get File Content
54
+
55
+ Args:
56
+ extra_headers: Send extra headers
57
+
58
+ extra_query: Add additional query parameters to the request
59
+
60
+ extra_body: Add additional JSON properties to the request
61
+
62
+ timeout: Override the client-level default timeout for this request, in seconds
63
+ """
64
+ if not file_id:
65
+ raise ValueError(f"Expected a non-empty value for `file_id` but received {file_id!r}")
66
+ return self._get(
67
+ f"/v5/files/{file_id}/content",
68
+ options=make_request_options(
69
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
70
+ ),
71
+ cast_to=object,
72
+ )
73
+
74
+
75
+ class AsyncContentResource(AsyncAPIResource):
76
+ @cached_property
77
+ def with_raw_response(self) -> AsyncContentResourceWithRawResponse:
78
+ """
79
+ This property can be used as a prefix for any HTTP method call to return
80
+ the raw response object instead of the parsed content.
81
+
82
+ For more information, see https://www.github.com/scaleapi/sgp-python-beta#accessing-raw-response-data-eg-headers
83
+ """
84
+ return AsyncContentResourceWithRawResponse(self)
85
+
86
+ @cached_property
87
+ def with_streaming_response(self) -> AsyncContentResourceWithStreamingResponse:
88
+ """
89
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
90
+
91
+ For more information, see https://www.github.com/scaleapi/sgp-python-beta#with_streaming_response
92
+ """
93
+ return AsyncContentResourceWithStreamingResponse(self)
94
+
95
+ async def retrieve(
96
+ self,
97
+ file_id: str,
98
+ *,
99
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
100
+ # The extra values given here take precedence over values defined on the client or passed to this method.
101
+ extra_headers: Headers | None = None,
102
+ extra_query: Query | None = None,
103
+ extra_body: Body | None = None,
104
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
105
+ ) -> object:
106
+ """
107
+ Get File Content
108
+
109
+ Args:
110
+ extra_headers: Send extra headers
111
+
112
+ extra_query: Add additional query parameters to the request
113
+
114
+ extra_body: Add additional JSON properties to the request
115
+
116
+ timeout: Override the client-level default timeout for this request, in seconds
117
+ """
118
+ if not file_id:
119
+ raise ValueError(f"Expected a non-empty value for `file_id` but received {file_id!r}")
120
+ return await self._get(
121
+ f"/v5/files/{file_id}/content",
122
+ options=make_request_options(
123
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
124
+ ),
125
+ cast_to=object,
126
+ )
127
+
128
+
129
+ class ContentResourceWithRawResponse:
130
+ def __init__(self, content: ContentResource) -> None:
131
+ self._content = content
132
+
133
+ self.retrieve = to_raw_response_wrapper(
134
+ content.retrieve,
135
+ )
136
+
137
+
138
+ class AsyncContentResourceWithRawResponse:
139
+ def __init__(self, content: AsyncContentResource) -> None:
140
+ self._content = content
141
+
142
+ self.retrieve = async_to_raw_response_wrapper(
143
+ content.retrieve,
144
+ )
145
+
146
+
147
+ class ContentResourceWithStreamingResponse:
148
+ def __init__(self, content: ContentResource) -> None:
149
+ self._content = content
150
+
151
+ self.retrieve = to_streamed_response_wrapper(
152
+ content.retrieve,
153
+ )
154
+
155
+
156
+ class AsyncContentResourceWithStreamingResponse:
157
+ def __init__(self, content: AsyncContentResource) -> None:
158
+ self._content = content
159
+
160
+ self.retrieve = async_to_streamed_response_wrapper(
161
+ content.retrieve,
162
+ )