scale-gp-beta 0.1.0a6__py3-none-any.whl → 0.1.0a7__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/_models.py +1 -1
- scale_gp_beta/_utils/_transform.py +1 -1
- scale_gp_beta/_version.py +1 -1
- scale_gp_beta/resources/evaluations.py +14 -10
- scale_gp_beta/types/chat/chat_completion.py +32 -0
- scale_gp_beta/types/chat/chat_completion_chunk.py +1 -1
- scale_gp_beta/types/evaluation_create_params.py +3 -3
- {scale_gp_beta-0.1.0a6.dist-info → scale_gp_beta-0.1.0a7.dist-info}/METADATA +1 -1
- {scale_gp_beta-0.1.0a6.dist-info → scale_gp_beta-0.1.0a7.dist-info}/RECORD +11 -11
- {scale_gp_beta-0.1.0a6.dist-info → scale_gp_beta-0.1.0a7.dist-info}/WHEEL +0 -0
- {scale_gp_beta-0.1.0a6.dist-info → scale_gp_beta-0.1.0a7.dist-info}/licenses/LICENSE +0 -0
scale_gp_beta/_models.py
CHANGED
|
@@ -681,7 +681,7 @@ def set_pydantic_config(typ: Any, config: pydantic.ConfigDict) -> None:
|
|
|
681
681
|
setattr(typ, "__pydantic_config__", config) # noqa: B010
|
|
682
682
|
|
|
683
683
|
|
|
684
|
-
# our use of
|
|
684
|
+
# our use of subclassing here causes weirdness for type checkers,
|
|
685
685
|
# so we just pretend that we don't subclass
|
|
686
686
|
if TYPE_CHECKING:
|
|
687
687
|
GenericModel = BaseModel
|
|
@@ -126,7 +126,7 @@ def _get_annotated_type(type_: type) -> type | None:
|
|
|
126
126
|
def _maybe_transform_key(key: str, type_: type) -> str:
|
|
127
127
|
"""Transform the given `data` based on the annotations provided in `type_`.
|
|
128
128
|
|
|
129
|
-
Note: this function only looks at `Annotated` types that contain `
|
|
129
|
+
Note: this function only looks at `Annotated` types that contain `PropertyInfo` metadata.
|
|
130
130
|
"""
|
|
131
131
|
annotated_type = _get_annotated_type(type_)
|
|
132
132
|
if annotated_type is None:
|
scale_gp_beta/_version.py
CHANGED
|
@@ -87,9 +87,9 @@ class EvaluationsResource(SyncAPIResource):
|
|
|
87
87
|
def create(
|
|
88
88
|
self,
|
|
89
89
|
*,
|
|
90
|
-
data: Iterable[evaluation_create_params.EvaluationFromDatasetCreateRequestData],
|
|
91
90
|
dataset_id: str,
|
|
92
91
|
name: str,
|
|
92
|
+
data: Iterable[evaluation_create_params.EvaluationFromDatasetCreateRequestData] | NotGiven = NOT_GIVEN,
|
|
93
93
|
description: str | NotGiven = NOT_GIVEN,
|
|
94
94
|
tasks: Iterable[evaluation_create_params.EvaluationFromDatasetCreateRequestTask] | NotGiven = NOT_GIVEN,
|
|
95
95
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
@@ -103,10 +103,10 @@ class EvaluationsResource(SyncAPIResource):
|
|
|
103
103
|
Create Evaluation
|
|
104
104
|
|
|
105
105
|
Args:
|
|
106
|
-
data: Items to be evaluated, including references to the input dataset items
|
|
107
|
-
|
|
108
106
|
dataset_id: The ID of the dataset containing the items referenced by the `data` field
|
|
109
107
|
|
|
108
|
+
data: Items to be evaluated, including references to the input dataset items
|
|
109
|
+
|
|
110
110
|
tasks: Tasks allow you to augment and evaluate your data
|
|
111
111
|
|
|
112
112
|
extra_headers: Send extra headers
|
|
@@ -155,11 +155,13 @@ class EvaluationsResource(SyncAPIResource):
|
|
|
155
155
|
"""
|
|
156
156
|
...
|
|
157
157
|
|
|
158
|
-
@required_args(["data", "name"], ["
|
|
158
|
+
@required_args(["data", "name"], ["dataset_id", "name"], ["data", "dataset", "name"])
|
|
159
159
|
def create(
|
|
160
160
|
self,
|
|
161
161
|
*,
|
|
162
|
-
data: Iterable[Dict[str, object]]
|
|
162
|
+
data: Iterable[Dict[str, object]]
|
|
163
|
+
| Iterable[evaluation_create_params.EvaluationFromDatasetCreateRequestData]
|
|
164
|
+
| NotGiven = NOT_GIVEN,
|
|
163
165
|
name: str,
|
|
164
166
|
description: str | NotGiven = NOT_GIVEN,
|
|
165
167
|
tasks: Iterable[evaluation_create_params.EvaluationStandaloneCreateRequestTask] | NotGiven = NOT_GIVEN,
|
|
@@ -369,9 +371,9 @@ class AsyncEvaluationsResource(AsyncAPIResource):
|
|
|
369
371
|
async def create(
|
|
370
372
|
self,
|
|
371
373
|
*,
|
|
372
|
-
data: Iterable[evaluation_create_params.EvaluationFromDatasetCreateRequestData],
|
|
373
374
|
dataset_id: str,
|
|
374
375
|
name: str,
|
|
376
|
+
data: Iterable[evaluation_create_params.EvaluationFromDatasetCreateRequestData] | NotGiven = NOT_GIVEN,
|
|
375
377
|
description: str | NotGiven = NOT_GIVEN,
|
|
376
378
|
tasks: Iterable[evaluation_create_params.EvaluationFromDatasetCreateRequestTask] | NotGiven = NOT_GIVEN,
|
|
377
379
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
@@ -385,10 +387,10 @@ class AsyncEvaluationsResource(AsyncAPIResource):
|
|
|
385
387
|
Create Evaluation
|
|
386
388
|
|
|
387
389
|
Args:
|
|
388
|
-
data: Items to be evaluated, including references to the input dataset items
|
|
389
|
-
|
|
390
390
|
dataset_id: The ID of the dataset containing the items referenced by the `data` field
|
|
391
391
|
|
|
392
|
+
data: Items to be evaluated, including references to the input dataset items
|
|
393
|
+
|
|
392
394
|
tasks: Tasks allow you to augment and evaluate your data
|
|
393
395
|
|
|
394
396
|
extra_headers: Send extra headers
|
|
@@ -437,11 +439,13 @@ class AsyncEvaluationsResource(AsyncAPIResource):
|
|
|
437
439
|
"""
|
|
438
440
|
...
|
|
439
441
|
|
|
440
|
-
@required_args(["data", "name"], ["
|
|
442
|
+
@required_args(["data", "name"], ["dataset_id", "name"], ["data", "dataset", "name"])
|
|
441
443
|
async def create(
|
|
442
444
|
self,
|
|
443
445
|
*,
|
|
444
|
-
data: Iterable[Dict[str, object]]
|
|
446
|
+
data: Iterable[Dict[str, object]]
|
|
447
|
+
| Iterable[evaluation_create_params.EvaluationFromDatasetCreateRequestData]
|
|
448
|
+
| NotGiven = NOT_GIVEN,
|
|
445
449
|
name: str,
|
|
446
450
|
description: str | NotGiven = NOT_GIVEN,
|
|
447
451
|
tasks: Iterable[evaluation_create_params.EvaluationStandaloneCreateRequestTask] | NotGiven = NOT_GIVEN,
|
|
@@ -10,6 +10,8 @@ __all__ = [
|
|
|
10
10
|
"ChatCompletion",
|
|
11
11
|
"Choice",
|
|
12
12
|
"ChoiceMessage",
|
|
13
|
+
"ChoiceMessageAnnotation",
|
|
14
|
+
"ChoiceMessageAnnotationURLCitation",
|
|
13
15
|
"ChoiceMessageAudio",
|
|
14
16
|
"ChoiceMessageFunctionCall",
|
|
15
17
|
"ChoiceMessageToolCall",
|
|
@@ -25,6 +27,34 @@ __all__ = [
|
|
|
25
27
|
]
|
|
26
28
|
|
|
27
29
|
|
|
30
|
+
class ChoiceMessageAnnotationURLCitation(BaseModel):
|
|
31
|
+
end_index: int
|
|
32
|
+
|
|
33
|
+
start_index: int
|
|
34
|
+
|
|
35
|
+
title: str
|
|
36
|
+
|
|
37
|
+
url: str
|
|
38
|
+
|
|
39
|
+
if TYPE_CHECKING:
|
|
40
|
+
# Stub to indicate that arbitrary properties are accepted.
|
|
41
|
+
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
42
|
+
# `getattr(obj, '$type')`
|
|
43
|
+
def __getattr__(self, attr: str) -> object: ...
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
class ChoiceMessageAnnotation(BaseModel):
|
|
47
|
+
type: Literal["url_citation"]
|
|
48
|
+
|
|
49
|
+
url_citation: ChoiceMessageAnnotationURLCitation
|
|
50
|
+
|
|
51
|
+
if TYPE_CHECKING:
|
|
52
|
+
# Stub to indicate that arbitrary properties are accepted.
|
|
53
|
+
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
54
|
+
# `getattr(obj, '$type')`
|
|
55
|
+
def __getattr__(self, attr: str) -> object: ...
|
|
56
|
+
|
|
57
|
+
|
|
28
58
|
class ChoiceMessageAudio(BaseModel):
|
|
29
59
|
id: str
|
|
30
60
|
|
|
@@ -82,6 +112,8 @@ class ChoiceMessageToolCall(BaseModel):
|
|
|
82
112
|
class ChoiceMessage(BaseModel):
|
|
83
113
|
role: Literal["assistant"]
|
|
84
114
|
|
|
115
|
+
annotations: Optional[List[ChoiceMessageAnnotation]] = None
|
|
116
|
+
|
|
85
117
|
audio: Optional[ChoiceMessageAudio] = None
|
|
86
118
|
|
|
87
119
|
content: Optional[str] = None
|
|
@@ -71,7 +71,7 @@ class ChoiceDelta(BaseModel):
|
|
|
71
71
|
|
|
72
72
|
refusal: Optional[str] = None
|
|
73
73
|
|
|
74
|
-
role: Optional[Literal["system", "user", "assistant", "tool"]] = None
|
|
74
|
+
role: Optional[Literal["developer", "system", "user", "assistant", "tool"]] = None
|
|
75
75
|
|
|
76
76
|
tool_calls: Optional[List[ChoiceDeltaToolCall]] = None
|
|
77
77
|
|
|
@@ -272,14 +272,14 @@ EvaluationStandaloneCreateRequestTask: TypeAlias = Union[
|
|
|
272
272
|
|
|
273
273
|
|
|
274
274
|
class EvaluationFromDatasetCreateRequest(TypedDict, total=False):
|
|
275
|
-
data: Required[Iterable[EvaluationFromDatasetCreateRequestData]]
|
|
276
|
-
"""Items to be evaluated, including references to the input dataset items"""
|
|
277
|
-
|
|
278
275
|
dataset_id: Required[str]
|
|
279
276
|
"""The ID of the dataset containing the items referenced by the `data` field"""
|
|
280
277
|
|
|
281
278
|
name: Required[str]
|
|
282
279
|
|
|
280
|
+
data: Iterable[EvaluationFromDatasetCreateRequestData]
|
|
281
|
+
"""Items to be evaluated, including references to the input dataset items"""
|
|
282
|
+
|
|
283
283
|
description: str
|
|
284
284
|
|
|
285
285
|
tasks: Iterable[EvaluationFromDatasetCreateRequestTask]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: scale-gp-beta
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.0a7
|
|
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
|
|
@@ -5,13 +5,13 @@ 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=Bg-k8-T1kDWURAYXrbDF5FSAyLEy7k90Jrvne-dF4Wc,29070
|
|
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=KSWPU-p5jxwoaiMKwQY3DBrRMgwdqktC2IwLdFBWU-c,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
|
|
@@ -20,7 +20,7 @@ scale_gp_beta/_utils/_proxy.py,sha256=z3zsateHtb0EARTWKk8QZNHfPkqJbqwd1lM993LBwG
|
|
|
20
20
|
scale_gp_beta/_utils/_reflection.py,sha256=ZmGkIgT_PuwedyNBrrKGbxoWtkpytJNU1uU4QHnmEMU,1364
|
|
21
21
|
scale_gp_beta/_utils/_streams.py,sha256=SMC90diFFecpEg_zgDRVbdR3hSEIgVVij4taD-noMLM,289
|
|
22
22
|
scale_gp_beta/_utils/_sync.py,sha256=TpGLrrhRNWTJtODNE6Fup3_k7zrWm1j2RlirzBwre-0,2862
|
|
23
|
-
scale_gp_beta/_utils/_transform.py,sha256=
|
|
23
|
+
scale_gp_beta/_utils/_transform.py,sha256=asrbdx4Pf5NupzaB8QdEjypW_DgHjjkpswHT0Jum4S0,13987
|
|
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
|
|
@@ -29,7 +29,7 @@ scale_gp_beta/resources/completions.py,sha256=dk7Uvl8dnnieRWTJr2fhzJMZwOzGIjsYSw
|
|
|
29
29
|
scale_gp_beta/resources/dataset_items.py,sha256=BOx6ddLcDvL5L9HweCY62QnxflAs1jQJC-Ni-xzMUf0,22361
|
|
30
30
|
scale_gp_beta/resources/datasets.py,sha256=tE2JKxlHc48Sm-SpySH4f265CxCBlaHWT68jKiJKJc8,20717
|
|
31
31
|
scale_gp_beta/resources/evaluation_items.py,sha256=iD-srR9ZQQ3WAutxA98_MMj4_1h-B1_lZ_Ujb9F6Ino,11460
|
|
32
|
-
scale_gp_beta/resources/evaluations.py,sha256=
|
|
32
|
+
scale_gp_beta/resources/evaluations.py,sha256=t40uRcRiWHw82aIdlY0w1Cm3Z2LDYBxcj-c3fVMjfU0,25963
|
|
33
33
|
scale_gp_beta/resources/inference.py,sha256=_20eN0x0PZBPNLx2VrozQrJgRVjtlXPjeTpTcnuP0bU,7576
|
|
34
34
|
scale_gp_beta/resources/models.py,sha256=85F8qPJN9lBPbfNm9F8bHpdJSsyekS9B3GDPJtCXaMA,32658
|
|
35
35
|
scale_gp_beta/resources/chat/__init__.py,sha256=BVAfz9TM3DT5W9f_mt0P9YRxL_MsUxKCWAH6u1iogmA,1041
|
|
@@ -56,7 +56,7 @@ scale_gp_beta/types/dataset_retrieve_params.py,sha256=5tpzuzX6y1WKKxP2AbjYwwcATp
|
|
|
56
56
|
scale_gp_beta/types/dataset_update_params.py,sha256=Aw7m-jat5P82qJGJgsuz6xx6nu96jYdfJnM_TR94PAE,287
|
|
57
57
|
scale_gp_beta/types/evaluation.py,sha256=U8m8P0dX290Pv-jG2ZiiV9djQ1dUkyLI1tv0SGgIH8c,609
|
|
58
58
|
scale_gp_beta/types/evaluation_archive_response.py,sha256=SkGy3GourPaQRPt84smBd1XhwZqeDTDINK7PtyEEpSY,356
|
|
59
|
-
scale_gp_beta/types/evaluation_create_params.py,sha256=
|
|
59
|
+
scale_gp_beta/types/evaluation_create_params.py,sha256=5vC1smjjju8v3_EzjAYgUfEeLeK04R2ECRI_evbmi6w,25494
|
|
60
60
|
scale_gp_beta/types/evaluation_item.py,sha256=KENQ19JXAEGD0q82HwQ6GDx69giPmzP0h0Uo8ehWF8w,603
|
|
61
61
|
scale_gp_beta/types/evaluation_item_list_params.py,sha256=LquF3dWIU6b7O_Sy_b0R2FMk5XC-Jm6mEHLJGUOKLuk,435
|
|
62
62
|
scale_gp_beta/types/evaluation_item_retrieve_params.py,sha256=UYEKIAQ4dy92ZOSV1tWDZcvXG7_0BSpOND5Ehzs7QM4,296
|
|
@@ -79,12 +79,12 @@ scale_gp_beta/types/model_delete_response.py,sha256=fSpTChRLHPOoc9SJbkS4wcLxVOc3
|
|
|
79
79
|
scale_gp_beta/types/model_list_params.py,sha256=617LRolXLNCV8kadHK7XRGN-0woh0mvj88ZSbPLdGDg,702
|
|
80
80
|
scale_gp_beta/types/model_update_params.py,sha256=RFXvs-EIDHmNO-fnPB8H6B9DlK6bYVsiwFDMPPFHGII,3701
|
|
81
81
|
scale_gp_beta/types/chat/__init__.py,sha256=DA0PFPt0oaPb25RI7Cs3RQEJfDLg5-qBiU8l0S_3nnw,443
|
|
82
|
-
scale_gp_beta/types/chat/chat_completion.py,sha256=
|
|
83
|
-
scale_gp_beta/types/chat/chat_completion_chunk.py,sha256=
|
|
82
|
+
scale_gp_beta/types/chat/chat_completion.py,sha256=oYOrsTBdGwV9e_mF4F06XmdyZI4pyw06IQ-0mFn0etk,8250
|
|
83
|
+
scale_gp_beta/types/chat/chat_completion_chunk.py,sha256=57-i6LyOk6IX2HZvXsoUC26e0D0dVBNQjX_GbT0eKEw,7060
|
|
84
84
|
scale_gp_beta/types/chat/completion_create_params.py,sha256=Y7vJNvNM4Sov77l55aS5YtyRnrf7isediu3nKr6YE-A,4505
|
|
85
85
|
scale_gp_beta/types/chat/completion_create_response.py,sha256=0OhfoJW8azVRrZdXRRMuiJ7kEEeMDnKScxrr3sayzDo,374
|
|
86
86
|
scale_gp_beta/types/files/__init__.py,sha256=OKfJYcKb4NObdiRObqJV_dOyDQ8feXekDUge2o_4pXQ,122
|
|
87
|
-
scale_gp_beta-0.1.
|
|
88
|
-
scale_gp_beta-0.1.
|
|
89
|
-
scale_gp_beta-0.1.
|
|
90
|
-
scale_gp_beta-0.1.
|
|
87
|
+
scale_gp_beta-0.1.0a7.dist-info/METADATA,sha256=o96YasDyknKFxFjg-qLA_4kbh5Cxq-nHPvwSv-uYQ-o,16938
|
|
88
|
+
scale_gp_beta-0.1.0a7.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
|
89
|
+
scale_gp_beta-0.1.0a7.dist-info/licenses/LICENSE,sha256=x49Bj8r_ZpqfzThbmfHyZ_bE88XvHdIMI_ANyLHFFRE,11338
|
|
90
|
+
scale_gp_beta-0.1.0a7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|