scale-gp-beta 0.1.0a3__py3-none-any.whl → 0.1.0a5__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.
- scale_gp_beta/_base_client.py +1 -96
- scale_gp_beta/_client.py +17 -17
- scale_gp_beta/_models.py +5 -2
- scale_gp_beta/_version.py +1 -1
- scale_gp_beta/resources/__init__.py +27 -27
- scale_gp_beta/resources/chat/completions.py +86 -92
- scale_gp_beta/resources/datasets.py +569 -0
- scale_gp_beta/resources/{question_sets.py → evaluations.py} +259 -273
- scale_gp_beta/resources/models.py +2 -0
- scale_gp_beta/types/__init__.py +11 -11
- scale_gp_beta/types/dataset.py +27 -0
- scale_gp_beta/types/dataset_create_params.py +17 -0
- scale_gp_beta/types/{question_set_delete_response.py → dataset_delete_response.py} +3 -3
- scale_gp_beta/types/{question_list_params.py → dataset_list_params.py} +4 -2
- scale_gp_beta/types/dataset_retrieve_params.py +11 -0
- scale_gp_beta/types/dataset_update_params.py +13 -0
- scale_gp_beta/types/evaluation.py +30 -0
- scale_gp_beta/types/evaluation_archive_response.py +16 -0
- scale_gp_beta/types/evaluation_create_params.py +734 -0
- scale_gp_beta/types/{question_set_list_params.py → evaluation_list_params.py} +4 -6
- scale_gp_beta/types/evaluation_retrieve_params.py +11 -0
- scale_gp_beta/types/inference_model.py +16 -2
- scale_gp_beta/types/model_list_params.py +1 -0
- {scale_gp_beta-0.1.0a3.dist-info → scale_gp_beta-0.1.0a5.dist-info}/METADATA +24 -4
- {scale_gp_beta-0.1.0a3.dist-info → scale_gp_beta-0.1.0a5.dist-info}/RECORD +27 -27
- {scale_gp_beta-0.1.0a3.dist-info → scale_gp_beta-0.1.0a5.dist-info}/WHEEL +1 -1
- scale_gp_beta/resources/questions.py +0 -396
- scale_gp_beta/types/question.py +0 -68
- scale_gp_beta/types/question_create_params.py +0 -59
- scale_gp_beta/types/question_list.py +0 -27
- scale_gp_beta/types/question_set.py +0 -106
- scale_gp_beta/types/question_set_create_params.py +0 -115
- scale_gp_beta/types/question_set_list.py +0 -27
- scale_gp_beta/types/question_set_retrieve_params.py +0 -12
- scale_gp_beta/types/question_set_update_params.py +0 -23
- {scale_gp_beta-0.1.0a3.dist-info → scale_gp_beta-0.1.0a5.dist-info}/licenses/LICENSE +0 -0
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import
|
|
6
|
-
from typing_extensions import
|
|
5
|
+
from typing import Optional
|
|
6
|
+
from typing_extensions import TypedDict
|
|
7
7
|
|
|
8
|
-
__all__ = ["
|
|
8
|
+
__all__ = ["EvaluationListParams"]
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
class
|
|
11
|
+
class EvaluationListParams(TypedDict, total=False):
|
|
12
12
|
ending_before: Optional[str]
|
|
13
13
|
|
|
14
14
|
include_archived: bool
|
|
@@ -16,5 +16,3 @@ class QuestionSetListParams(TypedDict, total=False):
|
|
|
16
16
|
limit: int
|
|
17
17
|
|
|
18
18
|
starting_after: Optional[str]
|
|
19
|
-
|
|
20
|
-
views: List[Literal["questions"]]
|
|
@@ -0,0 +1,11 @@
|
|
|
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__ = ["EvaluationRetrieveParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class EvaluationRetrieveParams(TypedDict, total=False):
|
|
11
|
+
include_archived: bool
|
|
@@ -153,15 +153,29 @@ class InferenceModel(BaseModel):
|
|
|
153
153
|
api_model_type: Literal["generic", "completion", "chat_completion"] = FieldInfo(alias="model_type")
|
|
154
154
|
|
|
155
155
|
api_model_vendor: Literal[
|
|
156
|
-
"openai",
|
|
156
|
+
"openai",
|
|
157
|
+
"cohere",
|
|
158
|
+
"vertex_ai",
|
|
159
|
+
"anthropic",
|
|
160
|
+
"azure",
|
|
161
|
+
"gemini",
|
|
162
|
+
"launch",
|
|
163
|
+
"llmengine",
|
|
164
|
+
"model_zoo",
|
|
165
|
+
"bedrock",
|
|
166
|
+
"xai",
|
|
157
167
|
] = FieldInfo(alias="model_vendor")
|
|
158
168
|
|
|
159
169
|
name: str
|
|
160
170
|
|
|
161
171
|
status: Literal["failed", "ready", "deploying"]
|
|
162
172
|
|
|
163
|
-
|
|
173
|
+
description: Optional[str] = None
|
|
174
|
+
|
|
175
|
+
display_name: Optional[str] = None
|
|
164
176
|
|
|
165
177
|
api_model_metadata: Optional[Dict[str, object]] = FieldInfo(alias="model_metadata", default=None)
|
|
166
178
|
|
|
167
179
|
object: Optional[Literal["model"]] = None
|
|
180
|
+
|
|
181
|
+
vendor_configuration: Optional[VendorConfiguration] = None
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
2
|
Name: scale-gp-beta
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.0a5
|
|
4
4
|
Summary: The official Python library for the Scale GP API
|
|
5
5
|
Project-URL: Homepage, https://github.com/scaleapi/sgp-python-beta
|
|
6
6
|
Project-URL: Repository, https://github.com/scaleapi/sgp-python-beta
|
|
7
7
|
Author-email: Scale GP <anish.agrawal@scale.com>
|
|
8
|
-
License
|
|
9
|
-
License-File: LICENSE
|
|
8
|
+
License: Apache-2.0
|
|
10
9
|
Classifier: Intended Audience :: Developers
|
|
11
10
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
12
11
|
Classifier: Operating System :: MacOS
|
|
@@ -230,6 +229,27 @@ for model in first_page.items:
|
|
|
230
229
|
# Remove `await` for non-async usage.
|
|
231
230
|
```
|
|
232
231
|
|
|
232
|
+
## Nested params
|
|
233
|
+
|
|
234
|
+
Nested parameters are dictionaries, typed using `TypedDict`, for example:
|
|
235
|
+
|
|
236
|
+
```python
|
|
237
|
+
from scale_gp_beta import SGPClient
|
|
238
|
+
|
|
239
|
+
client = SGPClient(
|
|
240
|
+
account_id="My Account ID",
|
|
241
|
+
)
|
|
242
|
+
|
|
243
|
+
inference = client.inference.create(
|
|
244
|
+
model="model",
|
|
245
|
+
inference_configuration={
|
|
246
|
+
"num_retries": 0,
|
|
247
|
+
"timeout_seconds": 0,
|
|
248
|
+
},
|
|
249
|
+
)
|
|
250
|
+
print(inference.inference_configuration)
|
|
251
|
+
```
|
|
252
|
+
|
|
233
253
|
## File uploads
|
|
234
254
|
|
|
235
255
|
Request parameters that correspond to file uploads can be passed as `bytes`, a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance or a tuple of `(filename, contents, media type)`.
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
scale_gp_beta/__init__.py,sha256=XmzYbUteZA7f7EPIFNKcPSnSgFpK6ovSlHY57Xk-WGo,2535
|
|
2
|
-
scale_gp_beta/_base_client.py,sha256=
|
|
3
|
-
scale_gp_beta/_client.py,sha256=
|
|
2
|
+
scale_gp_beta/_base_client.py,sha256=gMRzeMNQ9Z7kaex2ofZ7U0pd-E-7M754bDa7cVhQXvo,64964
|
|
3
|
+
scale_gp_beta/_client.py,sha256=6asGfvGJmCgTz9HEECs5pZoufPGvSmqB50D0Mvnk7QQ,22522
|
|
4
4
|
scale_gp_beta/_compat.py,sha256=VWemUKbj6DDkQ-O4baSpHVLJafotzeXmCQGJugfVTIw,6580
|
|
5
5
|
scale_gp_beta/_constants.py,sha256=S14PFzyN9-I31wiV7SmIlL5Ga0MLHxdvegInGdXH7tM,462
|
|
6
6
|
scale_gp_beta/_exceptions.py,sha256=95GM5CLFtP-QMjjmzsr5ajjZOyEZvyaETfGmqNPR8YM,3226
|
|
7
7
|
scale_gp_beta/_files.py,sha256=VHiUi-XDLm5MK8EbVoB2TdgX3jbYshIfxYLeKv5jaYI,3620
|
|
8
|
-
scale_gp_beta/_models.py,sha256=
|
|
8
|
+
scale_gp_beta/_models.py,sha256=CTC-fpbbGneROztxHX-PkLntPt1ZMmwDqoKY9VAIOVg,29071
|
|
9
9
|
scale_gp_beta/_qs.py,sha256=AOkSz4rHtK4YI3ZU_kzea-zpwBUgEY8WniGmTPyEimc,4846
|
|
10
10
|
scale_gp_beta/_resource.py,sha256=siZly_U6D0AOVLAzaOsqUdEFFzVMbWRj-ml30nvRp7E,1118
|
|
11
11
|
scale_gp_beta/_response.py,sha256=ATtij8CjXVjmhdOWozU9Y0SP4Q_uxCYGFUHroxFnSc4,28853
|
|
12
12
|
scale_gp_beta/_streaming.py,sha256=fcCSGXslmi2SmmkM05g2SACXHk2Mj7k1X5uMBu6U5s8,10112
|
|
13
13
|
scale_gp_beta/_types.py,sha256=ScQhVBaKbtJrER3NkXbjokWE9DqSqREMIw9LE0NrFfA,6150
|
|
14
|
-
scale_gp_beta/_version.py,sha256=
|
|
14
|
+
scale_gp_beta/_version.py,sha256=LsIGgvN7B9kghhD-GMMkkGdleY9x2u2i-hCcZVdxIwc,173
|
|
15
15
|
scale_gp_beta/pagination.py,sha256=6AAa8_V0wARlMd1MIXijugYbG1mILGc2tHVKbUQbZyQ,2595
|
|
16
16
|
scale_gp_beta/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
17
|
scale_gp_beta/_utils/__init__.py,sha256=PNZ_QJuzZEgyYXqkO1HVhGkj5IU9bglVUcw7H-Knjzw,2062
|
|
@@ -24,21 +24,32 @@ scale_gp_beta/_utils/_transform.py,sha256=tsSFOIZ7iczaUsMSGBD_iSFOOdUyT2xtkcq1xy
|
|
|
24
24
|
scale_gp_beta/_utils/_typing.py,sha256=nTJz0jcrQbEgxwy4TtAkNxuU0QHHlmc6mQtA6vIR8tg,4501
|
|
25
25
|
scale_gp_beta/_utils/_utils.py,sha256=8UmbPOy_AAr2uUjjFui-VZSrVBHRj6bfNEKRp5YZP2A,12004
|
|
26
26
|
scale_gp_beta/lib/.keep,sha256=wuNrz-5SXo3jJaJOJgz4vFHM41YH_g20F5cRQo0vLes,224
|
|
27
|
-
scale_gp_beta/resources/__init__.py,sha256=
|
|
27
|
+
scale_gp_beta/resources/__init__.py,sha256=Aox7fBbozdmVvq6gu4pTSCcr5E7hg_yPthF1a7xLa34,3408
|
|
28
28
|
scale_gp_beta/resources/completions.py,sha256=dk7Uvl8dnnieRWTJr2fhzJMZwOzGIjsYSw2GjaMWlCs,31653
|
|
29
|
+
scale_gp_beta/resources/datasets.py,sha256=tE2JKxlHc48Sm-SpySH4f265CxCBlaHWT68jKiJKJc8,20717
|
|
30
|
+
scale_gp_beta/resources/evaluations.py,sha256=61sMyGqrH-gztzhY82UmXyV0Ip-s9LQvBiuFEzQgHsQ,25855
|
|
29
31
|
scale_gp_beta/resources/inference.py,sha256=_20eN0x0PZBPNLx2VrozQrJgRVjtlXPjeTpTcnuP0bU,7576
|
|
30
|
-
scale_gp_beta/resources/models.py,sha256=
|
|
31
|
-
scale_gp_beta/resources/question_sets.py,sha256=X9eGII0Nh2jP7PTU86wLB6Blj0QIvYMJWUJm0D76QIU,25923
|
|
32
|
-
scale_gp_beta/resources/questions.py,sha256=XP-PJoGyGTIlNkCMhmBAUbHp2m4yT81ofBnVds4o0Jg,14835
|
|
32
|
+
scale_gp_beta/resources/models.py,sha256=85F8qPJN9lBPbfNm9F8bHpdJSsyekS9B3GDPJtCXaMA,32658
|
|
33
33
|
scale_gp_beta/resources/chat/__init__.py,sha256=BVAfz9TM3DT5W9f_mt0P9YRxL_MsUxKCWAH6u1iogmA,1041
|
|
34
34
|
scale_gp_beta/resources/chat/chat.py,sha256=4OG_TrwVqYvV-7Ha8Nbc6iuXQuys9wKXgkxYmE6p6jk,3672
|
|
35
|
-
scale_gp_beta/resources/chat/completions.py,sha256=
|
|
35
|
+
scale_gp_beta/resources/chat/completions.py,sha256=ZPa4-9RNKTXldq2VjWahNrlXeO_jYGswyPzgWlPuAVQ,46581
|
|
36
36
|
scale_gp_beta/resources/files/__init__.py,sha256=VgAtqUimN5Kf_-lmEaNBnu_ApGegKsJQ1zNf-42MXFA,1002
|
|
37
37
|
scale_gp_beta/resources/files/content.py,sha256=oJxb-28ZOUBgzE_MiAaJOcKFmtlB-N5APdhfZBNJna8,5762
|
|
38
38
|
scale_gp_beta/resources/files/files.py,sha256=M8OdZoIi3fFjJL7oIn8w9TD6TVcASCMy1Ze1YZRbPMo,20530
|
|
39
|
-
scale_gp_beta/types/__init__.py,sha256=
|
|
39
|
+
scale_gp_beta/types/__init__.py,sha256=5KRwCU53Hx-wFv78yza-DCfdWyD8kKclXoE5AJNmrpE,2209
|
|
40
40
|
scale_gp_beta/types/completion.py,sha256=5eewo25sdqL4vutqvE8wmugE0Cw6YLzZ0_AD6yjP9NM,3259
|
|
41
41
|
scale_gp_beta/types/completion_create_params.py,sha256=LE9vna29Kbh7E8qUq7EhQbcu7YuCF_h663maKtzOnhk,3063
|
|
42
|
+
scale_gp_beta/types/dataset.py,sha256=uTlOPgxkzpiAFOr_NOOYqhTsrqOKkOyXvxzczIe9gaE,511
|
|
43
|
+
scale_gp_beta/types/dataset_create_params.py,sha256=k-JIiwO_4rSM3jzOpgq5d_7i7VSt3tik-kvAt1PXzfI,436
|
|
44
|
+
scale_gp_beta/types/dataset_delete_response.py,sha256=Lc4K761LM__hosWI3gYjYnEl5JXL-cg4DU3lXKhtQoo,345
|
|
45
|
+
scale_gp_beta/types/dataset_list_params.py,sha256=4rITQ1avOcQObS17cT0NDikOmF7Fd_rxkSlRIfzzfF4,387
|
|
46
|
+
scale_gp_beta/types/dataset_retrieve_params.py,sha256=5tpzuzX6y1WKKxP2AbjYwwcATpB1eZCv4wZABG3baIQ,282
|
|
47
|
+
scale_gp_beta/types/dataset_update_params.py,sha256=Aw7m-jat5P82qJGJgsuz6xx6nu96jYdfJnM_TR94PAE,287
|
|
48
|
+
scale_gp_beta/types/evaluation.py,sha256=U8m8P0dX290Pv-jG2ZiiV9djQ1dUkyLI1tv0SGgIH8c,609
|
|
49
|
+
scale_gp_beta/types/evaluation_archive_response.py,sha256=SkGy3GourPaQRPt84smBd1XhwZqeDTDINK7PtyEEpSY,356
|
|
50
|
+
scale_gp_beta/types/evaluation_create_params.py,sha256=nmbi633xCnOY28cnvH595s2hlk7xKU0surVyYAbeSlQ,25504
|
|
51
|
+
scale_gp_beta/types/evaluation_list_params.py,sha256=3e8fR1LCDhODoRrvgriRvgLhpIp0HXEZdjQ6P9p-eD4,393
|
|
52
|
+
scale_gp_beta/types/evaluation_retrieve_params.py,sha256=tqzzbcD-hEcUcGFrfIhH3fG1cXuLvQGHZlyS-e3Zsx4,288
|
|
42
53
|
scale_gp_beta/types/file.py,sha256=Xkha0eSr1q6hkwjE9e2XNgk8kuHNoTEe1LXNhz6o-1k,528
|
|
43
54
|
scale_gp_beta/types/file_create_params.py,sha256=KpXv6JCbd8BlgceTmBTewxOky2JTJaTW3mcGiVVU7wE,317
|
|
44
55
|
scale_gp_beta/types/file_delete_response.py,sha256=lOsiaw8qrUOnH7smxb27-n7M4D1chfXlAUaMTRmdldY,336
|
|
@@ -47,32 +58,21 @@ scale_gp_beta/types/file_list_params.py,sha256=NkyOFeSJOTcPKd-JQnYa52KOEhEOJF-aU
|
|
|
47
58
|
scale_gp_beta/types/file_update_params.py,sha256=cZAz43aIXmc0jOz-uKWDsZIJx24NN4t9kQ2XDORvQ-Q,297
|
|
48
59
|
scale_gp_beta/types/inference_create_params.py,sha256=lpdMjG-ufUDpH8bGPbt2klG0I9Q3o374WrqHBjEpPwE,665
|
|
49
60
|
scale_gp_beta/types/inference_create_response.py,sha256=JgoDjN5B8zRUpOXXasD97vFKVN7A6QHKz_PN64pKB6s,390
|
|
50
|
-
scale_gp_beta/types/inference_model.py,sha256=
|
|
61
|
+
scale_gp_beta/types/inference_model.py,sha256=Zzc3_-YvN8Xd_4Vad5ZkYm_0lqVAbMfNtpBRHTQ2AXM,4480
|
|
51
62
|
scale_gp_beta/types/inference_model_list.py,sha256=I5qlOvpe-kX2HUp-C0h47Na0w6tRfZiC5wGCJ_KMxUk,688
|
|
52
63
|
scale_gp_beta/types/inference_response.py,sha256=PIX9ihGJ6IP6D6i8gk3o_mbSLy9fvRwZdGyICQKh-q8,337
|
|
53
64
|
scale_gp_beta/types/inference_response_chunk.py,sha256=UIw0gVwnqtQKPTH3QAW9UYVlD0lBz7av-EzcMqF7xgg,353
|
|
54
65
|
scale_gp_beta/types/model_create_params.py,sha256=K04FNqloYYTwffMHnNLRnrPNOKPgG70R6xKXZzR3Uu0,3484
|
|
55
66
|
scale_gp_beta/types/model_delete_response.py,sha256=fSpTChRLHPOoc9SJbkS4wcLxVOc3kKBOya8wkGow5pY,339
|
|
56
|
-
scale_gp_beta/types/model_list_params.py,sha256=
|
|
67
|
+
scale_gp_beta/types/model_list_params.py,sha256=617LRolXLNCV8kadHK7XRGN-0woh0mvj88ZSbPLdGDg,702
|
|
57
68
|
scale_gp_beta/types/model_update_params.py,sha256=RFXvs-EIDHmNO-fnPB8H6B9DlK6bYVsiwFDMPPFHGII,3701
|
|
58
|
-
scale_gp_beta/types/question.py,sha256=aETwjezMGu6hxG9wCa9uBM2H0d9xKRIWu1t2S01bfdw,1597
|
|
59
|
-
scale_gp_beta/types/question_create_params.py,sha256=EqXkbj9zx5M8GPpGVv0XChE-jaxSUHR_UwiyCwsOVZ8,1517
|
|
60
|
-
scale_gp_beta/types/question_list.py,sha256=lk4GWhnnThcqnwmbxUNq07vqyXS8ToUYRp4nf7YctGs,657
|
|
61
|
-
scale_gp_beta/types/question_list_params.py,sha256=vf0ADgkIyuYiye4ySEvJSwj4wkwfPJUPHh0lIE77s_k,361
|
|
62
|
-
scale_gp_beta/types/question_set.py,sha256=QMhZ9mIzkzkzITTHFgWlWgHPP4CWTt0v3M9TZc2_VFY,2525
|
|
63
|
-
scale_gp_beta/types/question_set_create_params.py,sha256=fb_DmwtOj4q61cbP-0v5Ckq76tT-cbQEyRKj8TkHf7c,3785
|
|
64
|
-
scale_gp_beta/types/question_set_delete_response.py,sha256=WfKpVppIGoBG96_CxFmD01QLsj7iAOuG1DJug3l4eF4,358
|
|
65
|
-
scale_gp_beta/types/question_set_list.py,sha256=GDZWcjbLARtLSHZiCGbwdcXQe4inaSfddxu8mgSnAzQ,673
|
|
66
|
-
scale_gp_beta/types/question_set_list_params.py,sha256=omaQ4bD-Zh_CvMvul9O0-tPU18C888QTC6Q9v5tlJkU,449
|
|
67
|
-
scale_gp_beta/types/question_set_retrieve_params.py,sha256=NUXBXehGZDxkaqYHke-aJRXp_YITeN6Hr3cjv95ssDM,334
|
|
68
|
-
scale_gp_beta/types/question_set_update_params.py,sha256=znfOyD45Fhsu6oCw1IrjSSvcYrRLXI6WbWVxnulSSlc,691
|
|
69
69
|
scale_gp_beta/types/chat/__init__.py,sha256=DA0PFPt0oaPb25RI7Cs3RQEJfDLg5-qBiU8l0S_3nnw,443
|
|
70
70
|
scale_gp_beta/types/chat/chat_completion.py,sha256=MswoiGtEb_ik1OHkk6k4jrpcH4lqmOdnIXLnGZJy7wM,7314
|
|
71
71
|
scale_gp_beta/types/chat/chat_completion_chunk.py,sha256=6anUxR5cLdhEhhSgjh3tFbH_7crpD9dktsAnrBLxykQ,7047
|
|
72
72
|
scale_gp_beta/types/chat/completion_create_params.py,sha256=Y7vJNvNM4Sov77l55aS5YtyRnrf7isediu3nKr6YE-A,4505
|
|
73
73
|
scale_gp_beta/types/chat/completion_create_response.py,sha256=0OhfoJW8azVRrZdXRRMuiJ7kEEeMDnKScxrr3sayzDo,374
|
|
74
74
|
scale_gp_beta/types/files/__init__.py,sha256=OKfJYcKb4NObdiRObqJV_dOyDQ8feXekDUge2o_4pXQ,122
|
|
75
|
-
scale_gp_beta-0.1.
|
|
76
|
-
scale_gp_beta-0.1.
|
|
77
|
-
scale_gp_beta-0.1.
|
|
78
|
-
scale_gp_beta-0.1.
|
|
75
|
+
scale_gp_beta-0.1.0a5.dist-info/METADATA,sha256=hlWX2f9t_Y4QL_5txpmQJOKTCuW-cWkqackYx6deku0,16938
|
|
76
|
+
scale_gp_beta-0.1.0a5.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
|
77
|
+
scale_gp_beta-0.1.0a5.dist-info/licenses/LICENSE,sha256=x49Bj8r_ZpqfzThbmfHyZ_bE88XvHdIMI_ANyLHFFRE,11338
|
|
78
|
+
scale_gp_beta-0.1.0a5.dist-info/RECORD,,
|
|
@@ -1,396 +0,0 @@
|
|
|
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, Iterable, Optional
|
|
6
|
-
from typing_extensions import Literal
|
|
7
|
-
|
|
8
|
-
import httpx
|
|
9
|
-
|
|
10
|
-
from ..types import question_list_params, question_create_params
|
|
11
|
-
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
12
|
-
from .._utils import (
|
|
13
|
-
maybe_transform,
|
|
14
|
-
async_maybe_transform,
|
|
15
|
-
)
|
|
16
|
-
from .._compat import cached_property
|
|
17
|
-
from .._resource import SyncAPIResource, AsyncAPIResource
|
|
18
|
-
from .._response import (
|
|
19
|
-
to_raw_response_wrapper,
|
|
20
|
-
to_streamed_response_wrapper,
|
|
21
|
-
async_to_raw_response_wrapper,
|
|
22
|
-
async_to_streamed_response_wrapper,
|
|
23
|
-
)
|
|
24
|
-
from ..pagination import SyncCursorPage, AsyncCursorPage
|
|
25
|
-
from .._base_client import AsyncPaginator, make_request_options
|
|
26
|
-
from ..types.question import Question
|
|
27
|
-
|
|
28
|
-
__all__ = ["QuestionsResource", "AsyncQuestionsResource"]
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
class QuestionsResource(SyncAPIResource):
|
|
32
|
-
@cached_property
|
|
33
|
-
def with_raw_response(self) -> QuestionsResourceWithRawResponse:
|
|
34
|
-
"""
|
|
35
|
-
This property can be used as a prefix for any HTTP method call to return
|
|
36
|
-
the raw response object instead of the parsed content.
|
|
37
|
-
|
|
38
|
-
For more information, see https://www.github.com/scaleapi/sgp-python-beta#accessing-raw-response-data-eg-headers
|
|
39
|
-
"""
|
|
40
|
-
return QuestionsResourceWithRawResponse(self)
|
|
41
|
-
|
|
42
|
-
@cached_property
|
|
43
|
-
def with_streaming_response(self) -> QuestionsResourceWithStreamingResponse:
|
|
44
|
-
"""
|
|
45
|
-
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
46
|
-
|
|
47
|
-
For more information, see https://www.github.com/scaleapi/sgp-python-beta#with_streaming_response
|
|
48
|
-
"""
|
|
49
|
-
return QuestionsResourceWithStreamingResponse(self)
|
|
50
|
-
|
|
51
|
-
def create(
|
|
52
|
-
self,
|
|
53
|
-
*,
|
|
54
|
-
prompt: str,
|
|
55
|
-
title: str,
|
|
56
|
-
type: Literal["categorical", "free_text", "rating", "number"],
|
|
57
|
-
choices: Iterable[question_create_params.Choice] | NotGiven = NOT_GIVEN,
|
|
58
|
-
conditions: Iterable[Dict[str, object]] | NotGiven = NOT_GIVEN,
|
|
59
|
-
dropdown: bool | NotGiven = NOT_GIVEN,
|
|
60
|
-
multi: bool | NotGiven = NOT_GIVEN,
|
|
61
|
-
number_options: question_create_params.NumberOptions | NotGiven = NOT_GIVEN,
|
|
62
|
-
rating_options: question_create_params.RatingOptions | NotGiven = NOT_GIVEN,
|
|
63
|
-
required: bool | NotGiven = NOT_GIVEN,
|
|
64
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
65
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
66
|
-
extra_headers: Headers | None = None,
|
|
67
|
-
extra_query: Query | None = None,
|
|
68
|
-
extra_body: Body | None = None,
|
|
69
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
70
|
-
) -> Question:
|
|
71
|
-
"""
|
|
72
|
-
Create Question
|
|
73
|
-
|
|
74
|
-
Args:
|
|
75
|
-
extra_headers: Send extra headers
|
|
76
|
-
|
|
77
|
-
extra_query: Add additional query parameters to the request
|
|
78
|
-
|
|
79
|
-
extra_body: Add additional JSON properties to the request
|
|
80
|
-
|
|
81
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
82
|
-
"""
|
|
83
|
-
return self._post(
|
|
84
|
-
"/v5/questions",
|
|
85
|
-
body=maybe_transform(
|
|
86
|
-
{
|
|
87
|
-
"prompt": prompt,
|
|
88
|
-
"title": title,
|
|
89
|
-
"type": type,
|
|
90
|
-
"choices": choices,
|
|
91
|
-
"conditions": conditions,
|
|
92
|
-
"dropdown": dropdown,
|
|
93
|
-
"multi": multi,
|
|
94
|
-
"number_options": number_options,
|
|
95
|
-
"rating_options": rating_options,
|
|
96
|
-
"required": required,
|
|
97
|
-
},
|
|
98
|
-
question_create_params.QuestionCreateParams,
|
|
99
|
-
),
|
|
100
|
-
options=make_request_options(
|
|
101
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
102
|
-
),
|
|
103
|
-
cast_to=Question,
|
|
104
|
-
)
|
|
105
|
-
|
|
106
|
-
def retrieve(
|
|
107
|
-
self,
|
|
108
|
-
question_id: str,
|
|
109
|
-
*,
|
|
110
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
111
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
112
|
-
extra_headers: Headers | None = None,
|
|
113
|
-
extra_query: Query | None = None,
|
|
114
|
-
extra_body: Body | None = None,
|
|
115
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
116
|
-
) -> Question:
|
|
117
|
-
"""
|
|
118
|
-
Get Question
|
|
119
|
-
|
|
120
|
-
Args:
|
|
121
|
-
extra_headers: Send extra headers
|
|
122
|
-
|
|
123
|
-
extra_query: Add additional query parameters to the request
|
|
124
|
-
|
|
125
|
-
extra_body: Add additional JSON properties to the request
|
|
126
|
-
|
|
127
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
128
|
-
"""
|
|
129
|
-
if not question_id:
|
|
130
|
-
raise ValueError(f"Expected a non-empty value for `question_id` but received {question_id!r}")
|
|
131
|
-
return self._get(
|
|
132
|
-
f"/v5/questions/{question_id}",
|
|
133
|
-
options=make_request_options(
|
|
134
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
135
|
-
),
|
|
136
|
-
cast_to=Question,
|
|
137
|
-
)
|
|
138
|
-
|
|
139
|
-
def list(
|
|
140
|
-
self,
|
|
141
|
-
*,
|
|
142
|
-
ending_before: Optional[str] | NotGiven = NOT_GIVEN,
|
|
143
|
-
limit: int | NotGiven = NOT_GIVEN,
|
|
144
|
-
starting_after: Optional[str] | NotGiven = NOT_GIVEN,
|
|
145
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
146
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
147
|
-
extra_headers: Headers | None = None,
|
|
148
|
-
extra_query: Query | None = None,
|
|
149
|
-
extra_body: Body | None = None,
|
|
150
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
151
|
-
) -> SyncCursorPage[Question]:
|
|
152
|
-
"""
|
|
153
|
-
List Questions
|
|
154
|
-
|
|
155
|
-
Args:
|
|
156
|
-
extra_headers: Send extra headers
|
|
157
|
-
|
|
158
|
-
extra_query: Add additional query parameters to the request
|
|
159
|
-
|
|
160
|
-
extra_body: Add additional JSON properties to the request
|
|
161
|
-
|
|
162
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
163
|
-
"""
|
|
164
|
-
return self._get_api_list(
|
|
165
|
-
"/v5/questions",
|
|
166
|
-
page=SyncCursorPage[Question],
|
|
167
|
-
options=make_request_options(
|
|
168
|
-
extra_headers=extra_headers,
|
|
169
|
-
extra_query=extra_query,
|
|
170
|
-
extra_body=extra_body,
|
|
171
|
-
timeout=timeout,
|
|
172
|
-
query=maybe_transform(
|
|
173
|
-
{
|
|
174
|
-
"ending_before": ending_before,
|
|
175
|
-
"limit": limit,
|
|
176
|
-
"starting_after": starting_after,
|
|
177
|
-
},
|
|
178
|
-
question_list_params.QuestionListParams,
|
|
179
|
-
),
|
|
180
|
-
),
|
|
181
|
-
model=Question,
|
|
182
|
-
)
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
class AsyncQuestionsResource(AsyncAPIResource):
|
|
186
|
-
@cached_property
|
|
187
|
-
def with_raw_response(self) -> AsyncQuestionsResourceWithRawResponse:
|
|
188
|
-
"""
|
|
189
|
-
This property can be used as a prefix for any HTTP method call to return
|
|
190
|
-
the raw response object instead of the parsed content.
|
|
191
|
-
|
|
192
|
-
For more information, see https://www.github.com/scaleapi/sgp-python-beta#accessing-raw-response-data-eg-headers
|
|
193
|
-
"""
|
|
194
|
-
return AsyncQuestionsResourceWithRawResponse(self)
|
|
195
|
-
|
|
196
|
-
@cached_property
|
|
197
|
-
def with_streaming_response(self) -> AsyncQuestionsResourceWithStreamingResponse:
|
|
198
|
-
"""
|
|
199
|
-
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
200
|
-
|
|
201
|
-
For more information, see https://www.github.com/scaleapi/sgp-python-beta#with_streaming_response
|
|
202
|
-
"""
|
|
203
|
-
return AsyncQuestionsResourceWithStreamingResponse(self)
|
|
204
|
-
|
|
205
|
-
async def create(
|
|
206
|
-
self,
|
|
207
|
-
*,
|
|
208
|
-
prompt: str,
|
|
209
|
-
title: str,
|
|
210
|
-
type: Literal["categorical", "free_text", "rating", "number"],
|
|
211
|
-
choices: Iterable[question_create_params.Choice] | NotGiven = NOT_GIVEN,
|
|
212
|
-
conditions: Iterable[Dict[str, object]] | NotGiven = NOT_GIVEN,
|
|
213
|
-
dropdown: bool | NotGiven = NOT_GIVEN,
|
|
214
|
-
multi: bool | NotGiven = NOT_GIVEN,
|
|
215
|
-
number_options: question_create_params.NumberOptions | NotGiven = NOT_GIVEN,
|
|
216
|
-
rating_options: question_create_params.RatingOptions | NotGiven = NOT_GIVEN,
|
|
217
|
-
required: bool | NotGiven = NOT_GIVEN,
|
|
218
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
219
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
220
|
-
extra_headers: Headers | None = None,
|
|
221
|
-
extra_query: Query | None = None,
|
|
222
|
-
extra_body: Body | None = None,
|
|
223
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
224
|
-
) -> Question:
|
|
225
|
-
"""
|
|
226
|
-
Create Question
|
|
227
|
-
|
|
228
|
-
Args:
|
|
229
|
-
extra_headers: Send extra headers
|
|
230
|
-
|
|
231
|
-
extra_query: Add additional query parameters to the request
|
|
232
|
-
|
|
233
|
-
extra_body: Add additional JSON properties to the request
|
|
234
|
-
|
|
235
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
236
|
-
"""
|
|
237
|
-
return await self._post(
|
|
238
|
-
"/v5/questions",
|
|
239
|
-
body=await async_maybe_transform(
|
|
240
|
-
{
|
|
241
|
-
"prompt": prompt,
|
|
242
|
-
"title": title,
|
|
243
|
-
"type": type,
|
|
244
|
-
"choices": choices,
|
|
245
|
-
"conditions": conditions,
|
|
246
|
-
"dropdown": dropdown,
|
|
247
|
-
"multi": multi,
|
|
248
|
-
"number_options": number_options,
|
|
249
|
-
"rating_options": rating_options,
|
|
250
|
-
"required": required,
|
|
251
|
-
},
|
|
252
|
-
question_create_params.QuestionCreateParams,
|
|
253
|
-
),
|
|
254
|
-
options=make_request_options(
|
|
255
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
256
|
-
),
|
|
257
|
-
cast_to=Question,
|
|
258
|
-
)
|
|
259
|
-
|
|
260
|
-
async def retrieve(
|
|
261
|
-
self,
|
|
262
|
-
question_id: str,
|
|
263
|
-
*,
|
|
264
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
265
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
266
|
-
extra_headers: Headers | None = None,
|
|
267
|
-
extra_query: Query | None = None,
|
|
268
|
-
extra_body: Body | None = None,
|
|
269
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
270
|
-
) -> Question:
|
|
271
|
-
"""
|
|
272
|
-
Get Question
|
|
273
|
-
|
|
274
|
-
Args:
|
|
275
|
-
extra_headers: Send extra headers
|
|
276
|
-
|
|
277
|
-
extra_query: Add additional query parameters to the request
|
|
278
|
-
|
|
279
|
-
extra_body: Add additional JSON properties to the request
|
|
280
|
-
|
|
281
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
282
|
-
"""
|
|
283
|
-
if not question_id:
|
|
284
|
-
raise ValueError(f"Expected a non-empty value for `question_id` but received {question_id!r}")
|
|
285
|
-
return await self._get(
|
|
286
|
-
f"/v5/questions/{question_id}",
|
|
287
|
-
options=make_request_options(
|
|
288
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
289
|
-
),
|
|
290
|
-
cast_to=Question,
|
|
291
|
-
)
|
|
292
|
-
|
|
293
|
-
def list(
|
|
294
|
-
self,
|
|
295
|
-
*,
|
|
296
|
-
ending_before: Optional[str] | NotGiven = NOT_GIVEN,
|
|
297
|
-
limit: int | NotGiven = NOT_GIVEN,
|
|
298
|
-
starting_after: Optional[str] | NotGiven = NOT_GIVEN,
|
|
299
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
300
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
301
|
-
extra_headers: Headers | None = None,
|
|
302
|
-
extra_query: Query | None = None,
|
|
303
|
-
extra_body: Body | None = None,
|
|
304
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
305
|
-
) -> AsyncPaginator[Question, AsyncCursorPage[Question]]:
|
|
306
|
-
"""
|
|
307
|
-
List Questions
|
|
308
|
-
|
|
309
|
-
Args:
|
|
310
|
-
extra_headers: Send extra headers
|
|
311
|
-
|
|
312
|
-
extra_query: Add additional query parameters to the request
|
|
313
|
-
|
|
314
|
-
extra_body: Add additional JSON properties to the request
|
|
315
|
-
|
|
316
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
317
|
-
"""
|
|
318
|
-
return self._get_api_list(
|
|
319
|
-
"/v5/questions",
|
|
320
|
-
page=AsyncCursorPage[Question],
|
|
321
|
-
options=make_request_options(
|
|
322
|
-
extra_headers=extra_headers,
|
|
323
|
-
extra_query=extra_query,
|
|
324
|
-
extra_body=extra_body,
|
|
325
|
-
timeout=timeout,
|
|
326
|
-
query=maybe_transform(
|
|
327
|
-
{
|
|
328
|
-
"ending_before": ending_before,
|
|
329
|
-
"limit": limit,
|
|
330
|
-
"starting_after": starting_after,
|
|
331
|
-
},
|
|
332
|
-
question_list_params.QuestionListParams,
|
|
333
|
-
),
|
|
334
|
-
),
|
|
335
|
-
model=Question,
|
|
336
|
-
)
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
class QuestionsResourceWithRawResponse:
|
|
340
|
-
def __init__(self, questions: QuestionsResource) -> None:
|
|
341
|
-
self._questions = questions
|
|
342
|
-
|
|
343
|
-
self.create = to_raw_response_wrapper(
|
|
344
|
-
questions.create,
|
|
345
|
-
)
|
|
346
|
-
self.retrieve = to_raw_response_wrapper(
|
|
347
|
-
questions.retrieve,
|
|
348
|
-
)
|
|
349
|
-
self.list = to_raw_response_wrapper(
|
|
350
|
-
questions.list,
|
|
351
|
-
)
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
class AsyncQuestionsResourceWithRawResponse:
|
|
355
|
-
def __init__(self, questions: AsyncQuestionsResource) -> None:
|
|
356
|
-
self._questions = questions
|
|
357
|
-
|
|
358
|
-
self.create = async_to_raw_response_wrapper(
|
|
359
|
-
questions.create,
|
|
360
|
-
)
|
|
361
|
-
self.retrieve = async_to_raw_response_wrapper(
|
|
362
|
-
questions.retrieve,
|
|
363
|
-
)
|
|
364
|
-
self.list = async_to_raw_response_wrapper(
|
|
365
|
-
questions.list,
|
|
366
|
-
)
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
class QuestionsResourceWithStreamingResponse:
|
|
370
|
-
def __init__(self, questions: QuestionsResource) -> None:
|
|
371
|
-
self._questions = questions
|
|
372
|
-
|
|
373
|
-
self.create = to_streamed_response_wrapper(
|
|
374
|
-
questions.create,
|
|
375
|
-
)
|
|
376
|
-
self.retrieve = to_streamed_response_wrapper(
|
|
377
|
-
questions.retrieve,
|
|
378
|
-
)
|
|
379
|
-
self.list = to_streamed_response_wrapper(
|
|
380
|
-
questions.list,
|
|
381
|
-
)
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
class AsyncQuestionsResourceWithStreamingResponse:
|
|
385
|
-
def __init__(self, questions: AsyncQuestionsResource) -> None:
|
|
386
|
-
self._questions = questions
|
|
387
|
-
|
|
388
|
-
self.create = async_to_streamed_response_wrapper(
|
|
389
|
-
questions.create,
|
|
390
|
-
)
|
|
391
|
-
self.retrieve = async_to_streamed_response_wrapper(
|
|
392
|
-
questions.retrieve,
|
|
393
|
-
)
|
|
394
|
-
self.list = async_to_streamed_response_wrapper(
|
|
395
|
-
questions.list,
|
|
396
|
-
)
|