scale-gp-beta 0.1.0a29__py3-none-any.whl → 0.1.0a30__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 +4 -1
- scale_gp_beta/_client.py +9 -0
- scale_gp_beta/_files.py +4 -4
- scale_gp_beta/_models.py +24 -3
- scale_gp_beta/_version.py +1 -1
- scale_gp_beta/lib/CONTRIBUTING.MD +53 -0
- scale_gp_beta/lib/tracing/trace_queue_manager.py +14 -0
- scale_gp_beta/resources/__init__.py +14 -0
- scale_gp_beta/resources/chat/completions.py +4 -0
- scale_gp_beta/resources/responses.py +314 -0
- scale_gp_beta/resources/spans.py +14 -22
- scale_gp_beta/types/__init__.py +17 -0
- scale_gp_beta/types/chat/chat_completion.py +61 -6
- scale_gp_beta/types/chat/chat_completion_chunk.py +17 -1
- scale_gp_beta/types/chat/completion_models_params.py +2 -0
- scale_gp_beta/types/chat/model_definition.py +6 -0
- scale_gp_beta/types/completion.py +8 -0
- scale_gp_beta/types/container.py +0 -6
- scale_gp_beta/types/dataset.py +3 -1
- scale_gp_beta/types/dataset_item.py +3 -1
- scale_gp_beta/types/evaluation.py +3 -7
- scale_gp_beta/types/evaluation_item.py +3 -1
- scale_gp_beta/types/evaluation_task.py +31 -55
- scale_gp_beta/types/evaluation_task_param.py +28 -1
- scale_gp_beta/types/file.py +3 -1
- scale_gp_beta/types/inference_model.py +3 -0
- scale_gp_beta/types/question.py +11 -10
- scale_gp_beta/types/response.py +2852 -0
- scale_gp_beta/types/response_create_params.py +817 -0
- scale_gp_beta/types/response_create_response.py +20891 -0
- scale_gp_beta/types/shared/__init__.py +3 -0
- scale_gp_beta/types/shared/identity.py +16 -0
- scale_gp_beta/types/span.py +4 -2
- scale_gp_beta/types/span_search_params.py +4 -7
- {scale_gp_beta-0.1.0a29.dist-info → scale_gp_beta-0.1.0a30.dist-info}/METADATA +2 -3
- {scale_gp_beta-0.1.0a29.dist-info → scale_gp_beta-0.1.0a30.dist-info}/RECORD +38 -31
- {scale_gp_beta-0.1.0a29.dist-info → scale_gp_beta-0.1.0a30.dist-info}/WHEEL +0 -0
- {scale_gp_beta-0.1.0a29.dist-info → scale_gp_beta-0.1.0a30.dist-info}/licenses/LICENSE +0 -0
scale_gp_beta/resources/spans.py
CHANGED
|
@@ -255,17 +255,16 @@ class SpansResource(SyncAPIResource):
|
|
|
255
255
|
sort_order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
|
|
256
256
|
starting_after: str | NotGiven = NOT_GIVEN,
|
|
257
257
|
to_ts: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
|
258
|
+
application_variant_ids: List[str] | NotGiven = NOT_GIVEN,
|
|
258
259
|
excluded_span_ids: List[str] | NotGiven = NOT_GIVEN,
|
|
259
260
|
excluded_trace_ids: List[str] | NotGiven = NOT_GIVEN,
|
|
260
261
|
extra_metadata: Dict[str, object] | NotGiven = NOT_GIVEN,
|
|
261
262
|
group_id: str | NotGiven = NOT_GIVEN,
|
|
262
263
|
names: List[str] | NotGiven = NOT_GIVEN,
|
|
263
264
|
parents_only: bool | NotGiven = NOT_GIVEN,
|
|
264
|
-
|
|
265
|
-
span_id: str | NotGiven = NOT_GIVEN,
|
|
265
|
+
search_texts: List[str] | NotGiven = NOT_GIVEN,
|
|
266
266
|
span_ids: List[str] | NotGiven = NOT_GIVEN,
|
|
267
267
|
statuses: List[SpanStatus] | NotGiven = NOT_GIVEN,
|
|
268
|
-
trace_id: str | NotGiven = NOT_GIVEN,
|
|
269
268
|
trace_ids: List[str] | NotGiven = NOT_GIVEN,
|
|
270
269
|
types: List[SpanType] | NotGiven = NOT_GIVEN,
|
|
271
270
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
@@ -283,6 +282,8 @@ class SpansResource(SyncAPIResource):
|
|
|
283
282
|
|
|
284
283
|
to_ts: The ending (most recent) timestamp in ISO format.
|
|
285
284
|
|
|
285
|
+
application_variant_ids: Filter by application variant IDs
|
|
286
|
+
|
|
286
287
|
excluded_span_ids: List of span IDs to exclude from results
|
|
287
288
|
|
|
288
289
|
excluded_trace_ids: List of trace IDs to exclude from results
|
|
@@ -295,16 +296,12 @@ class SpansResource(SyncAPIResource):
|
|
|
295
296
|
|
|
296
297
|
parents_only: Only fetch spans that are the top-level (ie. have no parent_id)
|
|
297
298
|
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
span_id: Filter by span ID (deprecated: use span_ids instead)
|
|
299
|
+
search_texts: Free text search across span input and output fields
|
|
301
300
|
|
|
302
301
|
span_ids: Filter by span IDs
|
|
303
302
|
|
|
304
303
|
statuses: Filter on span status
|
|
305
304
|
|
|
306
|
-
trace_id: Filter by trace ID (deprecated: use trace_ids instead)
|
|
307
|
-
|
|
308
305
|
trace_ids: Filter by trace IDs
|
|
309
306
|
|
|
310
307
|
extra_headers: Send extra headers
|
|
@@ -320,17 +317,16 @@ class SpansResource(SyncAPIResource):
|
|
|
320
317
|
page=SyncCursorPage[Span],
|
|
321
318
|
body=maybe_transform(
|
|
322
319
|
{
|
|
320
|
+
"application_variant_ids": application_variant_ids,
|
|
323
321
|
"excluded_span_ids": excluded_span_ids,
|
|
324
322
|
"excluded_trace_ids": excluded_trace_ids,
|
|
325
323
|
"extra_metadata": extra_metadata,
|
|
326
324
|
"group_id": group_id,
|
|
327
325
|
"names": names,
|
|
328
326
|
"parents_only": parents_only,
|
|
329
|
-
"
|
|
330
|
-
"span_id": span_id,
|
|
327
|
+
"search_texts": search_texts,
|
|
331
328
|
"span_ids": span_ids,
|
|
332
329
|
"statuses": statuses,
|
|
333
|
-
"trace_id": trace_id,
|
|
334
330
|
"trace_ids": trace_ids,
|
|
335
331
|
"types": types,
|
|
336
332
|
},
|
|
@@ -607,17 +603,16 @@ class AsyncSpansResource(AsyncAPIResource):
|
|
|
607
603
|
sort_order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
|
|
608
604
|
starting_after: str | NotGiven = NOT_GIVEN,
|
|
609
605
|
to_ts: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
|
606
|
+
application_variant_ids: List[str] | NotGiven = NOT_GIVEN,
|
|
610
607
|
excluded_span_ids: List[str] | NotGiven = NOT_GIVEN,
|
|
611
608
|
excluded_trace_ids: List[str] | NotGiven = NOT_GIVEN,
|
|
612
609
|
extra_metadata: Dict[str, object] | NotGiven = NOT_GIVEN,
|
|
613
610
|
group_id: str | NotGiven = NOT_GIVEN,
|
|
614
611
|
names: List[str] | NotGiven = NOT_GIVEN,
|
|
615
612
|
parents_only: bool | NotGiven = NOT_GIVEN,
|
|
616
|
-
|
|
617
|
-
span_id: str | NotGiven = NOT_GIVEN,
|
|
613
|
+
search_texts: List[str] | NotGiven = NOT_GIVEN,
|
|
618
614
|
span_ids: List[str] | NotGiven = NOT_GIVEN,
|
|
619
615
|
statuses: List[SpanStatus] | NotGiven = NOT_GIVEN,
|
|
620
|
-
trace_id: str | NotGiven = NOT_GIVEN,
|
|
621
616
|
trace_ids: List[str] | NotGiven = NOT_GIVEN,
|
|
622
617
|
types: List[SpanType] | NotGiven = NOT_GIVEN,
|
|
623
618
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
@@ -635,6 +630,8 @@ class AsyncSpansResource(AsyncAPIResource):
|
|
|
635
630
|
|
|
636
631
|
to_ts: The ending (most recent) timestamp in ISO format.
|
|
637
632
|
|
|
633
|
+
application_variant_ids: Filter by application variant IDs
|
|
634
|
+
|
|
638
635
|
excluded_span_ids: List of span IDs to exclude from results
|
|
639
636
|
|
|
640
637
|
excluded_trace_ids: List of trace IDs to exclude from results
|
|
@@ -647,16 +644,12 @@ class AsyncSpansResource(AsyncAPIResource):
|
|
|
647
644
|
|
|
648
645
|
parents_only: Only fetch spans that are the top-level (ie. have no parent_id)
|
|
649
646
|
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
span_id: Filter by span ID (deprecated: use span_ids instead)
|
|
647
|
+
search_texts: Free text search across span input and output fields
|
|
653
648
|
|
|
654
649
|
span_ids: Filter by span IDs
|
|
655
650
|
|
|
656
651
|
statuses: Filter on span status
|
|
657
652
|
|
|
658
|
-
trace_id: Filter by trace ID (deprecated: use trace_ids instead)
|
|
659
|
-
|
|
660
653
|
trace_ids: Filter by trace IDs
|
|
661
654
|
|
|
662
655
|
extra_headers: Send extra headers
|
|
@@ -672,17 +665,16 @@ class AsyncSpansResource(AsyncAPIResource):
|
|
|
672
665
|
page=AsyncCursorPage[Span],
|
|
673
666
|
body=maybe_transform(
|
|
674
667
|
{
|
|
668
|
+
"application_variant_ids": application_variant_ids,
|
|
675
669
|
"excluded_span_ids": excluded_span_ids,
|
|
676
670
|
"excluded_trace_ids": excluded_trace_ids,
|
|
677
671
|
"extra_metadata": extra_metadata,
|
|
678
672
|
"group_id": group_id,
|
|
679
673
|
"names": names,
|
|
680
674
|
"parents_only": parents_only,
|
|
681
|
-
"
|
|
682
|
-
"span_id": span_id,
|
|
675
|
+
"search_texts": search_texts,
|
|
683
676
|
"span_ids": span_ids,
|
|
684
677
|
"statuses": statuses,
|
|
685
|
-
"trace_id": trace_id,
|
|
686
678
|
"trace_ids": trace_ids,
|
|
687
679
|
"types": types,
|
|
688
680
|
},
|
scale_gp_beta/types/__init__.py
CHANGED
|
@@ -2,10 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
from . import container, evaluation
|
|
6
|
+
from .. import _compat
|
|
5
7
|
from .file import File as File
|
|
6
8
|
from .span import Span as Span
|
|
9
|
+
from .shared import Identity as Identity
|
|
7
10
|
from .dataset import Dataset as Dataset
|
|
8
11
|
from .question import Question as Question
|
|
12
|
+
from .response import Response as Response
|
|
9
13
|
from .component import Component as Component
|
|
10
14
|
from .container import Container as Container
|
|
11
15
|
from .file_list import FileList as FileList
|
|
@@ -44,6 +48,7 @@ from .item_locator_template import ItemLocatorTemplate as ItemLocatorTemplate
|
|
|
44
48
|
from .model_delete_response import ModelDeleteResponse as ModelDeleteResponse
|
|
45
49
|
from .evaluation_list_params import EvaluationListParams as EvaluationListParams
|
|
46
50
|
from .question_create_params import QuestionCreateParams as QuestionCreateParams
|
|
51
|
+
from .response_create_params import ResponseCreateParams as ResponseCreateParams
|
|
47
52
|
from .dataset_delete_response import DatasetDeleteResponse as DatasetDeleteResponse
|
|
48
53
|
from .dataset_retrieve_params import DatasetRetrieveParams as DatasetRetrieveParams
|
|
49
54
|
from .inference_create_params import InferenceCreateParams as InferenceCreateParams
|
|
@@ -52,6 +57,7 @@ from .dataset_item_list_params import DatasetItemListParams as DatasetItemListPa
|
|
|
52
57
|
from .evaluation_create_params import EvaluationCreateParams as EvaluationCreateParams
|
|
53
58
|
from .evaluation_update_params import EvaluationUpdateParams as EvaluationUpdateParams
|
|
54
59
|
from .inference_response_chunk import InferenceResponseChunk as InferenceResponseChunk
|
|
60
|
+
from .response_create_response import ResponseCreateResponse as ResponseCreateResponse
|
|
55
61
|
from .span_upsert_batch_params import SpanUpsertBatchParams as SpanUpsertBatchParams
|
|
56
62
|
from .inference_create_response import InferenceCreateResponse as InferenceCreateResponse
|
|
57
63
|
from .dataset_item_update_params import DatasetItemUpdateParams as DatasetItemUpdateParams
|
|
@@ -64,3 +70,14 @@ from .dataset_item_retrieve_params import DatasetItemRetrieveParams as DatasetIt
|
|
|
64
70
|
from .evaluation_item_retrieve_params import EvaluationItemRetrieveParams as EvaluationItemRetrieveParams
|
|
65
71
|
from .dataset_item_batch_create_params import DatasetItemBatchCreateParams as DatasetItemBatchCreateParams
|
|
66
72
|
from .dataset_item_batch_create_response import DatasetItemBatchCreateResponse as DatasetItemBatchCreateResponse
|
|
73
|
+
|
|
74
|
+
# Rebuild cyclical models only after all modules are imported.
|
|
75
|
+
# This ensures that, when building the deferred (due to cyclical references) model schema,
|
|
76
|
+
# Pydantic can resolve the necessary references.
|
|
77
|
+
# See: https://github.com/pydantic/pydantic/issues/11250 for more context.
|
|
78
|
+
if _compat.PYDANTIC_V2:
|
|
79
|
+
evaluation.Evaluation.model_rebuild(_parent_namespace_depth=0)
|
|
80
|
+
container.Container.model_rebuild(_parent_namespace_depth=0)
|
|
81
|
+
else:
|
|
82
|
+
evaluation.Evaluation.update_forward_refs() # type: ignore
|
|
83
|
+
container.Container.update_forward_refs() # type: ignore
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import builtins
|
|
4
|
-
from typing import TYPE_CHECKING, List, Optional
|
|
5
|
-
from typing_extensions import Literal
|
|
4
|
+
from typing import TYPE_CHECKING, Dict, List, Union, Optional
|
|
5
|
+
from typing_extensions import Literal, TypeAlias
|
|
6
|
+
|
|
7
|
+
from pydantic import Field as FieldInfo
|
|
6
8
|
|
|
7
9
|
from ..._models import BaseModel
|
|
8
10
|
|
|
@@ -15,7 +17,10 @@ __all__ = [
|
|
|
15
17
|
"ChoiceMessageAudio",
|
|
16
18
|
"ChoiceMessageFunctionCall",
|
|
17
19
|
"ChoiceMessageToolCall",
|
|
18
|
-
"
|
|
20
|
+
"ChoiceMessageToolCallChatCompletionMessageFunctionToolCall",
|
|
21
|
+
"ChoiceMessageToolCallChatCompletionMessageFunctionToolCallFunction",
|
|
22
|
+
"ChoiceMessageToolCallChatCompletionMessageCustomToolCall",
|
|
23
|
+
"ChoiceMessageToolCallChatCompletionMessageCustomToolCallCustom",
|
|
19
24
|
"ChoiceLogprobs",
|
|
20
25
|
"ChoiceLogprobsContent",
|
|
21
26
|
"ChoiceLogprobsContentTopLogprob",
|
|
@@ -36,6 +41,7 @@ class ChoiceMessageAnnotationURLCitation(BaseModel):
|
|
|
36
41
|
|
|
37
42
|
url: str
|
|
38
43
|
|
|
44
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
39
45
|
if TYPE_CHECKING:
|
|
40
46
|
# Stub to indicate that arbitrary properties are accepted.
|
|
41
47
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -48,6 +54,7 @@ class ChoiceMessageAnnotation(BaseModel):
|
|
|
48
54
|
|
|
49
55
|
url_citation: ChoiceMessageAnnotationURLCitation
|
|
50
56
|
|
|
57
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
51
58
|
if TYPE_CHECKING:
|
|
52
59
|
# Stub to indicate that arbitrary properties are accepted.
|
|
53
60
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -64,6 +71,7 @@ class ChoiceMessageAudio(BaseModel):
|
|
|
64
71
|
|
|
65
72
|
transcript: str
|
|
66
73
|
|
|
74
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
67
75
|
if TYPE_CHECKING:
|
|
68
76
|
# Stub to indicate that arbitrary properties are accepted.
|
|
69
77
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -76,6 +84,7 @@ class ChoiceMessageFunctionCall(BaseModel):
|
|
|
76
84
|
|
|
77
85
|
name: str
|
|
78
86
|
|
|
87
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
79
88
|
if TYPE_CHECKING:
|
|
80
89
|
# Stub to indicate that arbitrary properties are accepted.
|
|
81
90
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -83,11 +92,12 @@ class ChoiceMessageFunctionCall(BaseModel):
|
|
|
83
92
|
def __getattr__(self, attr: str) -> object: ...
|
|
84
93
|
|
|
85
94
|
|
|
86
|
-
class
|
|
95
|
+
class ChoiceMessageToolCallChatCompletionMessageFunctionToolCallFunction(BaseModel):
|
|
87
96
|
arguments: str
|
|
88
97
|
|
|
89
98
|
name: str
|
|
90
99
|
|
|
100
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
91
101
|
if TYPE_CHECKING:
|
|
92
102
|
# Stub to indicate that arbitrary properties are accepted.
|
|
93
103
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -95,13 +105,14 @@ class ChoiceMessageToolCallFunction(BaseModel):
|
|
|
95
105
|
def __getattr__(self, attr: str) -> object: ...
|
|
96
106
|
|
|
97
107
|
|
|
98
|
-
class
|
|
108
|
+
class ChoiceMessageToolCallChatCompletionMessageFunctionToolCall(BaseModel):
|
|
99
109
|
id: str
|
|
100
110
|
|
|
101
|
-
function:
|
|
111
|
+
function: ChoiceMessageToolCallChatCompletionMessageFunctionToolCallFunction
|
|
102
112
|
|
|
103
113
|
type: Literal["function"]
|
|
104
114
|
|
|
115
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
105
116
|
if TYPE_CHECKING:
|
|
106
117
|
# Stub to indicate that arbitrary properties are accepted.
|
|
107
118
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -109,6 +120,39 @@ class ChoiceMessageToolCall(BaseModel):
|
|
|
109
120
|
def __getattr__(self, attr: str) -> object: ...
|
|
110
121
|
|
|
111
122
|
|
|
123
|
+
class ChoiceMessageToolCallChatCompletionMessageCustomToolCallCustom(BaseModel):
|
|
124
|
+
input: str
|
|
125
|
+
|
|
126
|
+
name: str
|
|
127
|
+
|
|
128
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
129
|
+
if TYPE_CHECKING:
|
|
130
|
+
# Stub to indicate that arbitrary properties are accepted.
|
|
131
|
+
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
132
|
+
# `getattr(obj, '$type')`
|
|
133
|
+
def __getattr__(self, attr: str) -> object: ...
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
class ChoiceMessageToolCallChatCompletionMessageCustomToolCall(BaseModel):
|
|
137
|
+
id: str
|
|
138
|
+
|
|
139
|
+
custom: ChoiceMessageToolCallChatCompletionMessageCustomToolCallCustom
|
|
140
|
+
|
|
141
|
+
type: Literal["custom"]
|
|
142
|
+
|
|
143
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
144
|
+
if TYPE_CHECKING:
|
|
145
|
+
# Stub to indicate that arbitrary properties are accepted.
|
|
146
|
+
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
147
|
+
# `getattr(obj, '$type')`
|
|
148
|
+
def __getattr__(self, attr: str) -> object: ...
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
ChoiceMessageToolCall: TypeAlias = Union[
|
|
152
|
+
ChoiceMessageToolCallChatCompletionMessageFunctionToolCall, ChoiceMessageToolCallChatCompletionMessageCustomToolCall
|
|
153
|
+
]
|
|
154
|
+
|
|
155
|
+
|
|
112
156
|
class ChoiceMessage(BaseModel):
|
|
113
157
|
role: Literal["assistant"]
|
|
114
158
|
|
|
@@ -124,6 +168,7 @@ class ChoiceMessage(BaseModel):
|
|
|
124
168
|
|
|
125
169
|
tool_calls: Optional[List[ChoiceMessageToolCall]] = None
|
|
126
170
|
|
|
171
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
127
172
|
if TYPE_CHECKING:
|
|
128
173
|
# Stub to indicate that arbitrary properties are accepted.
|
|
129
174
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -138,6 +183,7 @@ class ChoiceLogprobsContentTopLogprob(BaseModel):
|
|
|
138
183
|
|
|
139
184
|
bytes: Optional[List[int]] = None
|
|
140
185
|
|
|
186
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
141
187
|
if TYPE_CHECKING:
|
|
142
188
|
# Stub to indicate that arbitrary properties are accepted.
|
|
143
189
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -154,6 +200,7 @@ class ChoiceLogprobsContent(BaseModel):
|
|
|
154
200
|
|
|
155
201
|
bytes: Optional[List[int]] = None
|
|
156
202
|
|
|
203
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
157
204
|
if TYPE_CHECKING:
|
|
158
205
|
# Stub to indicate that arbitrary properties are accepted.
|
|
159
206
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -168,6 +215,7 @@ class ChoiceLogprobsRefusalTopLogprob(BaseModel):
|
|
|
168
215
|
|
|
169
216
|
bytes: Optional[List[int]] = None
|
|
170
217
|
|
|
218
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
171
219
|
if TYPE_CHECKING:
|
|
172
220
|
# Stub to indicate that arbitrary properties are accepted.
|
|
173
221
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -184,6 +232,7 @@ class ChoiceLogprobsRefusal(BaseModel):
|
|
|
184
232
|
|
|
185
233
|
bytes: Optional[List[int]] = None
|
|
186
234
|
|
|
235
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
187
236
|
if TYPE_CHECKING:
|
|
188
237
|
# Stub to indicate that arbitrary properties are accepted.
|
|
189
238
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -196,6 +245,7 @@ class ChoiceLogprobs(BaseModel):
|
|
|
196
245
|
|
|
197
246
|
refusal: Optional[List[ChoiceLogprobsRefusal]] = None
|
|
198
247
|
|
|
248
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
199
249
|
if TYPE_CHECKING:
|
|
200
250
|
# Stub to indicate that arbitrary properties are accepted.
|
|
201
251
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -212,6 +262,7 @@ class Choice(BaseModel):
|
|
|
212
262
|
|
|
213
263
|
logprobs: Optional[ChoiceLogprobs] = None
|
|
214
264
|
|
|
265
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
215
266
|
if TYPE_CHECKING:
|
|
216
267
|
# Stub to indicate that arbitrary properties are accepted.
|
|
217
268
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -228,6 +279,7 @@ class UsageCompletionTokensDetails(BaseModel):
|
|
|
228
279
|
|
|
229
280
|
rejected_prediction_tokens: Optional[int] = None
|
|
230
281
|
|
|
282
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
231
283
|
if TYPE_CHECKING:
|
|
232
284
|
# Stub to indicate that arbitrary properties are accepted.
|
|
233
285
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -240,6 +292,7 @@ class UsagePromptTokensDetails(BaseModel):
|
|
|
240
292
|
|
|
241
293
|
cached_tokens: Optional[int] = None
|
|
242
294
|
|
|
295
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
243
296
|
if TYPE_CHECKING:
|
|
244
297
|
# Stub to indicate that arbitrary properties are accepted.
|
|
245
298
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -258,6 +311,7 @@ class Usage(BaseModel):
|
|
|
258
311
|
|
|
259
312
|
prompt_tokens_details: Optional[UsagePromptTokensDetails] = None
|
|
260
313
|
|
|
314
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
261
315
|
if TYPE_CHECKING:
|
|
262
316
|
# Stub to indicate that arbitrary properties are accepted.
|
|
263
317
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -282,6 +336,7 @@ class ChatCompletion(BaseModel):
|
|
|
282
336
|
|
|
283
337
|
usage: Optional[Usage] = None
|
|
284
338
|
|
|
339
|
+
__pydantic_extra__: Dict[str, builtins.object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
285
340
|
if TYPE_CHECKING:
|
|
286
341
|
# Stub to indicate that arbitrary properties are accepted.
|
|
287
342
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import builtins
|
|
4
|
-
from typing import TYPE_CHECKING, List, Optional
|
|
4
|
+
from typing import TYPE_CHECKING, Dict, List, Optional
|
|
5
5
|
from typing_extensions import Literal
|
|
6
6
|
|
|
7
|
+
from pydantic import Field as FieldInfo
|
|
8
|
+
|
|
7
9
|
from ..._models import BaseModel
|
|
8
10
|
|
|
9
11
|
__all__ = [
|
|
@@ -29,6 +31,7 @@ class ChoiceDeltaFunctionCall(BaseModel):
|
|
|
29
31
|
|
|
30
32
|
name: Optional[str] = None
|
|
31
33
|
|
|
34
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
32
35
|
if TYPE_CHECKING:
|
|
33
36
|
# Stub to indicate that arbitrary properties are accepted.
|
|
34
37
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -41,6 +44,7 @@ class ChoiceDeltaToolCallFunction(BaseModel):
|
|
|
41
44
|
|
|
42
45
|
name: Optional[str] = None
|
|
43
46
|
|
|
47
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
44
48
|
if TYPE_CHECKING:
|
|
45
49
|
# Stub to indicate that arbitrary properties are accepted.
|
|
46
50
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -57,6 +61,7 @@ class ChoiceDeltaToolCall(BaseModel):
|
|
|
57
61
|
|
|
58
62
|
type: Optional[Literal["function"]] = None
|
|
59
63
|
|
|
64
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
60
65
|
if TYPE_CHECKING:
|
|
61
66
|
# Stub to indicate that arbitrary properties are accepted.
|
|
62
67
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -75,6 +80,7 @@ class ChoiceDelta(BaseModel):
|
|
|
75
80
|
|
|
76
81
|
tool_calls: Optional[List[ChoiceDeltaToolCall]] = None
|
|
77
82
|
|
|
83
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
78
84
|
if TYPE_CHECKING:
|
|
79
85
|
# Stub to indicate that arbitrary properties are accepted.
|
|
80
86
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -89,6 +95,7 @@ class ChoiceLogprobsContentTopLogprob(BaseModel):
|
|
|
89
95
|
|
|
90
96
|
bytes: Optional[List[int]] = None
|
|
91
97
|
|
|
98
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
92
99
|
if TYPE_CHECKING:
|
|
93
100
|
# Stub to indicate that arbitrary properties are accepted.
|
|
94
101
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -105,6 +112,7 @@ class ChoiceLogprobsContent(BaseModel):
|
|
|
105
112
|
|
|
106
113
|
bytes: Optional[List[int]] = None
|
|
107
114
|
|
|
115
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
108
116
|
if TYPE_CHECKING:
|
|
109
117
|
# Stub to indicate that arbitrary properties are accepted.
|
|
110
118
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -119,6 +127,7 @@ class ChoiceLogprobsRefusalTopLogprob(BaseModel):
|
|
|
119
127
|
|
|
120
128
|
bytes: Optional[List[int]] = None
|
|
121
129
|
|
|
130
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
122
131
|
if TYPE_CHECKING:
|
|
123
132
|
# Stub to indicate that arbitrary properties are accepted.
|
|
124
133
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -135,6 +144,7 @@ class ChoiceLogprobsRefusal(BaseModel):
|
|
|
135
144
|
|
|
136
145
|
bytes: Optional[List[int]] = None
|
|
137
146
|
|
|
147
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
138
148
|
if TYPE_CHECKING:
|
|
139
149
|
# Stub to indicate that arbitrary properties are accepted.
|
|
140
150
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -147,6 +157,7 @@ class ChoiceLogprobs(BaseModel):
|
|
|
147
157
|
|
|
148
158
|
refusal: Optional[List[ChoiceLogprobsRefusal]] = None
|
|
149
159
|
|
|
160
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
150
161
|
if TYPE_CHECKING:
|
|
151
162
|
# Stub to indicate that arbitrary properties are accepted.
|
|
152
163
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -163,6 +174,7 @@ class Choice(BaseModel):
|
|
|
163
174
|
|
|
164
175
|
logprobs: Optional[ChoiceLogprobs] = None
|
|
165
176
|
|
|
177
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
166
178
|
if TYPE_CHECKING:
|
|
167
179
|
# Stub to indicate that arbitrary properties are accepted.
|
|
168
180
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -179,6 +191,7 @@ class UsageCompletionTokensDetails(BaseModel):
|
|
|
179
191
|
|
|
180
192
|
rejected_prediction_tokens: Optional[int] = None
|
|
181
193
|
|
|
194
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
182
195
|
if TYPE_CHECKING:
|
|
183
196
|
# Stub to indicate that arbitrary properties are accepted.
|
|
184
197
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -191,6 +204,7 @@ class UsagePromptTokensDetails(BaseModel):
|
|
|
191
204
|
|
|
192
205
|
cached_tokens: Optional[int] = None
|
|
193
206
|
|
|
207
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
194
208
|
if TYPE_CHECKING:
|
|
195
209
|
# Stub to indicate that arbitrary properties are accepted.
|
|
196
210
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -209,6 +223,7 @@ class Usage(BaseModel):
|
|
|
209
223
|
|
|
210
224
|
prompt_tokens_details: Optional[UsagePromptTokensDetails] = None
|
|
211
225
|
|
|
226
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
212
227
|
if TYPE_CHECKING:
|
|
213
228
|
# Stub to indicate that arbitrary properties are accepted.
|
|
214
229
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -233,6 +248,7 @@ class ChatCompletionChunk(BaseModel):
|
|
|
233
248
|
|
|
234
249
|
usage: Optional[Usage] = None
|
|
235
250
|
|
|
251
|
+
__pydantic_extra__: Dict[str, builtins.object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
236
252
|
if TYPE_CHECKING:
|
|
237
253
|
# Stub to indicate that arbitrary properties are accepted.
|
|
238
254
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
+
from typing import Optional
|
|
3
4
|
from typing_extensions import Literal
|
|
4
5
|
|
|
5
6
|
from pydantic import Field as FieldInfo
|
|
@@ -31,3 +32,8 @@ class ModelDefinition(BaseModel):
|
|
|
31
32
|
"fireworks_ai",
|
|
32
33
|
] = FieldInfo(alias="model_vendor")
|
|
33
34
|
"""model vendor, for example `openai`"""
|
|
35
|
+
|
|
36
|
+
availability: Optional[Literal["unknown", "available", "unavailable"]] = FieldInfo(
|
|
37
|
+
alias="model_availability", default=None
|
|
38
|
+
)
|
|
39
|
+
"""model availability indicating availability status, for example `available`"""
|
|
@@ -4,6 +4,8 @@ import builtins
|
|
|
4
4
|
from typing import TYPE_CHECKING, Dict, List, Optional
|
|
5
5
|
from typing_extensions import Literal
|
|
6
6
|
|
|
7
|
+
from pydantic import Field as FieldInfo
|
|
8
|
+
|
|
7
9
|
from .._models import BaseModel
|
|
8
10
|
|
|
9
11
|
__all__ = [
|
|
@@ -25,6 +27,7 @@ class ChoiceLogprobs(BaseModel):
|
|
|
25
27
|
|
|
26
28
|
top_logprobs: Optional[List[Dict[str, float]]] = None
|
|
27
29
|
|
|
30
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
28
31
|
if TYPE_CHECKING:
|
|
29
32
|
# Stub to indicate that arbitrary properties are accepted.
|
|
30
33
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -41,6 +44,7 @@ class Choice(BaseModel):
|
|
|
41
44
|
|
|
42
45
|
logprobs: Optional[ChoiceLogprobs] = None
|
|
43
46
|
|
|
47
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
44
48
|
if TYPE_CHECKING:
|
|
45
49
|
# Stub to indicate that arbitrary properties are accepted.
|
|
46
50
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -57,6 +61,7 @@ class UsageCompletionTokensDetails(BaseModel):
|
|
|
57
61
|
|
|
58
62
|
rejected_prediction_tokens: Optional[int] = None
|
|
59
63
|
|
|
64
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
60
65
|
if TYPE_CHECKING:
|
|
61
66
|
# Stub to indicate that arbitrary properties are accepted.
|
|
62
67
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -69,6 +74,7 @@ class UsagePromptTokensDetails(BaseModel):
|
|
|
69
74
|
|
|
70
75
|
cached_tokens: Optional[int] = None
|
|
71
76
|
|
|
77
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
72
78
|
if TYPE_CHECKING:
|
|
73
79
|
# Stub to indicate that arbitrary properties are accepted.
|
|
74
80
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -87,6 +93,7 @@ class Usage(BaseModel):
|
|
|
87
93
|
|
|
88
94
|
prompt_tokens_details: Optional[UsagePromptTokensDetails] = None
|
|
89
95
|
|
|
96
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
90
97
|
if TYPE_CHECKING:
|
|
91
98
|
# Stub to indicate that arbitrary properties are accepted.
|
|
92
99
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -109,6 +116,7 @@ class Completion(BaseModel):
|
|
|
109
116
|
|
|
110
117
|
usage: Optional[Usage] = None
|
|
111
118
|
|
|
119
|
+
__pydantic_extra__: Dict[str, builtins.object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
112
120
|
if TYPE_CHECKING:
|
|
113
121
|
# Stub to indicate that arbitrary properties are accepted.
|
|
114
122
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
scale_gp_beta/types/container.py
CHANGED
scale_gp_beta/types/dataset.py
CHANGED
|
@@ -5,6 +5,7 @@ from datetime import datetime
|
|
|
5
5
|
from typing_extensions import Literal
|
|
6
6
|
|
|
7
7
|
from .._models import BaseModel
|
|
8
|
+
from .shared.identity import Identity
|
|
8
9
|
|
|
9
10
|
__all__ = ["Dataset"]
|
|
10
11
|
|
|
@@ -14,7 +15,8 @@ class Dataset(BaseModel):
|
|
|
14
15
|
|
|
15
16
|
created_at: datetime
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
created_by: Identity
|
|
19
|
+
"""The identity that created the entity."""
|
|
18
20
|
|
|
19
21
|
current_version_num: int
|
|
20
22
|
|
|
@@ -5,6 +5,7 @@ from datetime import datetime
|
|
|
5
5
|
from typing_extensions import Literal
|
|
6
6
|
|
|
7
7
|
from .._models import BaseModel
|
|
8
|
+
from .shared.identity import Identity
|
|
8
9
|
|
|
9
10
|
__all__ = ["DatasetItem"]
|
|
10
11
|
|
|
@@ -16,7 +17,8 @@ class DatasetItem(BaseModel):
|
|
|
16
17
|
|
|
17
18
|
created_at: datetime
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
created_by: Identity
|
|
21
|
+
"""The identity that created the entity."""
|
|
20
22
|
|
|
21
23
|
data: object
|
|
22
24
|
|
|
@@ -7,8 +7,8 @@ from datetime import datetime
|
|
|
7
7
|
from typing_extensions import Literal
|
|
8
8
|
|
|
9
9
|
from .dataset import Dataset
|
|
10
|
-
from .._compat import PYDANTIC_V2
|
|
11
10
|
from .._models import BaseModel
|
|
11
|
+
from .shared.identity import Identity
|
|
12
12
|
|
|
13
13
|
__all__ = ["Evaluation"]
|
|
14
14
|
|
|
@@ -18,7 +18,8 @@ class Evaluation(BaseModel):
|
|
|
18
18
|
|
|
19
19
|
created_at: datetime
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
created_by: Identity
|
|
22
|
+
"""The identity that created the entity."""
|
|
22
23
|
|
|
23
24
|
datasets: List[Dataset]
|
|
24
25
|
|
|
@@ -40,8 +41,3 @@ class Evaluation(BaseModel):
|
|
|
40
41
|
|
|
41
42
|
|
|
42
43
|
from .evaluation_task import EvaluationTask
|
|
43
|
-
|
|
44
|
-
if PYDANTIC_V2:
|
|
45
|
-
Evaluation.model_rebuild()
|
|
46
|
-
else:
|
|
47
|
-
Evaluation.update_forward_refs() # type: ignore
|