scale-gp-beta 0.1.0a25__py3-none-any.whl → 0.1.0a26__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 +8 -5
- scale_gp_beta/_version.py +1 -1
- scale_gp_beta/types/chat/chat_completion.py +1 -1
- scale_gp_beta/types/chat/chat_completion_chunk.py +1 -1
- {scale_gp_beta-0.1.0a25.dist-info → scale_gp_beta-0.1.0a26.dist-info}/METADATA +1 -1
- {scale_gp_beta-0.1.0a25.dist-info → scale_gp_beta-0.1.0a26.dist-info}/RECORD +8 -8
- {scale_gp_beta-0.1.0a25.dist-info → scale_gp_beta-0.1.0a26.dist-info}/WHEEL +0 -0
- {scale_gp_beta-0.1.0a25.dist-info → scale_gp_beta-0.1.0a26.dist-info}/licenses/LICENSE +0 -0
scale_gp_beta/_models.py
CHANGED
|
@@ -2,9 +2,10 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
import os
|
|
4
4
|
import inspect
|
|
5
|
-
from typing import TYPE_CHECKING, Any, Type, Union, Generic, TypeVar, Callable, cast
|
|
5
|
+
from typing import TYPE_CHECKING, Any, Type, Union, Generic, TypeVar, Callable, Optional, cast
|
|
6
6
|
from datetime import date, datetime
|
|
7
7
|
from typing_extensions import (
|
|
8
|
+
List,
|
|
8
9
|
Unpack,
|
|
9
10
|
Literal,
|
|
10
11
|
ClassVar,
|
|
@@ -366,7 +367,7 @@ def _construct_field(value: object, field: FieldInfo, key: str) -> object:
|
|
|
366
367
|
if type_ is None:
|
|
367
368
|
raise RuntimeError(f"Unexpected field type is None for {key}")
|
|
368
369
|
|
|
369
|
-
return construct_type(value=value, type_=type_)
|
|
370
|
+
return construct_type(value=value, type_=type_, metadata=getattr(field, "metadata", None))
|
|
370
371
|
|
|
371
372
|
|
|
372
373
|
def is_basemodel(type_: type) -> bool:
|
|
@@ -420,7 +421,7 @@ def construct_type_unchecked(*, value: object, type_: type[_T]) -> _T:
|
|
|
420
421
|
return cast(_T, construct_type(value=value, type_=type_))
|
|
421
422
|
|
|
422
423
|
|
|
423
|
-
def construct_type(*, value: object, type_: object) -> object:
|
|
424
|
+
def construct_type(*, value: object, type_: object, metadata: Optional[List[Any]] = None) -> object:
|
|
424
425
|
"""Loose coercion to the expected type with construction of nested values.
|
|
425
426
|
|
|
426
427
|
If the given value does not match the expected type then it is returned as-is.
|
|
@@ -438,8 +439,10 @@ def construct_type(*, value: object, type_: object) -> object:
|
|
|
438
439
|
type_ = type_.__value__ # type: ignore[unreachable]
|
|
439
440
|
|
|
440
441
|
# unwrap `Annotated[T, ...]` -> `T`
|
|
441
|
-
if
|
|
442
|
-
meta: tuple[Any, ...] =
|
|
442
|
+
if metadata is not None:
|
|
443
|
+
meta: tuple[Any, ...] = tuple(metadata)
|
|
444
|
+
elif is_annotated_type(type_):
|
|
445
|
+
meta = get_args(type_)[1:]
|
|
443
446
|
type_ = extract_type_arg(type_, 0)
|
|
444
447
|
else:
|
|
445
448
|
meta = tuple()
|
scale_gp_beta/_version.py
CHANGED
|
@@ -276,7 +276,7 @@ class ChatCompletion(BaseModel):
|
|
|
276
276
|
|
|
277
277
|
object: Optional[Literal["chat.completion"]] = None
|
|
278
278
|
|
|
279
|
-
service_tier: Optional[Literal["auto", "default", "flex", "scale"]] = None
|
|
279
|
+
service_tier: Optional[Literal["auto", "default", "flex", "scale", "priority"]] = None
|
|
280
280
|
|
|
281
281
|
system_fingerprint: Optional[str] = None
|
|
282
282
|
|
|
@@ -227,7 +227,7 @@ class ChatCompletionChunk(BaseModel):
|
|
|
227
227
|
|
|
228
228
|
object: Optional[Literal["chat.completion.chunk"]] = None
|
|
229
229
|
|
|
230
|
-
service_tier: Optional[Literal["auto", "default", "flex", "scale"]] = None
|
|
230
|
+
service_tier: Optional[Literal["auto", "default", "flex", "scale", "priority"]] = None
|
|
231
231
|
|
|
232
232
|
system_fingerprint: Optional[str] = None
|
|
233
233
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: scale-gp-beta
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.0a26
|
|
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=viD5E6aDMhxslcFHDYvkHaKzE8YLcNmsPsMe8STixvs,29294
|
|
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=GemuybPk0uemovTlGHyHkj-ScYTTDJA0jqH5FQqIPwQ,28852
|
|
12
12
|
scale_gp_beta/_streaming.py,sha256=fcCSGXslmi2SmmkM05g2SACXHk2Mj7k1X5uMBu6U5s8,10112
|
|
13
13
|
scale_gp_beta/_types.py,sha256=0wSs40TefKMPBj2wQKenEeZ0lzedoHClNJeqrpAgkII,6204
|
|
14
|
-
scale_gp_beta/_version.py,sha256=
|
|
14
|
+
scale_gp_beta/_version.py,sha256=a3A3ZJ3GGbEmFnL4rjXbroDX1dq8r9ZDEI2rLL3BuIU,174
|
|
15
15
|
scale_gp_beta/pagination.py,sha256=t-U86PYxl20VRsz8VXOMJJDe7HxkX7ISFMvRNbBNy9s,4054
|
|
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
|
|
@@ -113,15 +113,15 @@ scale_gp_beta/types/span_update_params.py,sha256=zT-O1SE5K-KkbGxjLGkjgvhBRYTP8r_
|
|
|
113
113
|
scale_gp_beta/types/span_upsert_batch_params.py,sha256=MrqPpOhJ122X8qf8S6aobfwkemQJ89Q23SPhmsSqhog,1886
|
|
114
114
|
scale_gp_beta/types/span_upsert_batch_response.py,sha256=Gkndmd_cyfodeGaCJu4sF4TsgB22hgHVlmoek3e_Kkc,366
|
|
115
115
|
scale_gp_beta/types/chat/__init__.py,sha256=YmEJo3C_C7aRkImUaKB5BG97oOGkV0q3sHimL8cMa4g,688
|
|
116
|
-
scale_gp_beta/types/chat/chat_completion.py,sha256=
|
|
117
|
-
scale_gp_beta/types/chat/chat_completion_chunk.py,sha256
|
|
116
|
+
scale_gp_beta/types/chat/chat_completion.py,sha256=NsxSieotlSx-Juc71V6CCyD2zqh0xfLpDYFTVgQ8Gv4,8278
|
|
117
|
+
scale_gp_beta/types/chat/chat_completion_chunk.py,sha256=jtqQEmCqVfe9UY2EAmEDvGHXCLvgtzl0x69PaceG2Wk,7088
|
|
118
118
|
scale_gp_beta/types/chat/completion_create_params.py,sha256=Y7vJNvNM4Sov77l55aS5YtyRnrf7isediu3nKr6YE-A,4505
|
|
119
119
|
scale_gp_beta/types/chat/completion_create_response.py,sha256=0OhfoJW8azVRrZdXRRMuiJ7kEEeMDnKScxrr3sayzDo,374
|
|
120
120
|
scale_gp_beta/types/chat/completion_models_params.py,sha256=NdZ3Lkgclq6UKc9iae-evvCFuaOQszCwwubVjP1MYfk,635
|
|
121
121
|
scale_gp_beta/types/chat/completion_models_response.py,sha256=Ctgj6o-QWPSdjBKzG9J4Id0-DjXu4UGGw1NR6-840Ec,403
|
|
122
122
|
scale_gp_beta/types/chat/model_definition.py,sha256=XPkHEe4tY442oLSMlaotClNDv5XeQ3j5RrXgLZFo1Qk,841
|
|
123
123
|
scale_gp_beta/types/files/__init__.py,sha256=OKfJYcKb4NObdiRObqJV_dOyDQ8feXekDUge2o_4pXQ,122
|
|
124
|
-
scale_gp_beta-0.1.
|
|
125
|
-
scale_gp_beta-0.1.
|
|
126
|
-
scale_gp_beta-0.1.
|
|
127
|
-
scale_gp_beta-0.1.
|
|
124
|
+
scale_gp_beta-0.1.0a26.dist-info/METADATA,sha256=prd8poY95iVXq74tFDvSORgl6xx0wENE4p7SBf1Po-w,28723
|
|
125
|
+
scale_gp_beta-0.1.0a26.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
|
126
|
+
scale_gp_beta-0.1.0a26.dist-info/licenses/LICENSE,sha256=x49Bj8r_ZpqfzThbmfHyZ_bE88XvHdIMI_ANyLHFFRE,11338
|
|
127
|
+
scale_gp_beta-0.1.0a26.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|