scale-gp-beta 0.1.0a12__py3-none-any.whl → 0.1.0a13__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/__init__.py +5 -0
- scale_gp_beta/_utils/_proxy.py +4 -1
- scale_gp_beta/_utils/_resources_proxy.py +24 -0
- scale_gp_beta/_version.py +1 -1
- scale_gp_beta/resources/chat/completions.py +136 -2
- scale_gp_beta/resources/dataset_items.py +11 -11
- scale_gp_beta/resources/datasets.py +13 -5
- scale_gp_beta/resources/evaluation_items.py +6 -8
- scale_gp_beta/resources/evaluations.py +138 -21
- scale_gp_beta/resources/files/files.py +5 -5
- scale_gp_beta/resources/models.py +31 -35
- scale_gp_beta/resources/spans.py +42 -22
- scale_gp_beta/types/__init__.py +8 -1
- scale_gp_beta/types/chat/__init__.py +2 -0
- scale_gp_beta/types/chat/completion_models_params.py +29 -0
- scale_gp_beta/types/chat/model_definition.py +32 -0
- scale_gp_beta/types/component.py +18 -0
- scale_gp_beta/types/component_param.py +19 -0
- scale_gp_beta/types/container.py +35 -0
- scale_gp_beta/types/container_param.py +28 -0
- scale_gp_beta/types/dataset_item_list_params.py +4 -5
- scale_gp_beta/types/dataset_item_retrieve_params.py +1 -2
- scale_gp_beta/types/dataset_list_params.py +7 -3
- scale_gp_beta/types/evaluation.py +12 -2
- scale_gp_beta/types/evaluation_create_params.py +5 -5
- scale_gp_beta/types/{evaluation_archive_response.py → evaluation_delete_response.py} +2 -2
- scale_gp_beta/types/evaluation_item_list_params.py +3 -4
- scale_gp_beta/types/evaluation_list_params.py +7 -3
- scale_gp_beta/types/evaluation_task.py +139 -33
- scale_gp_beta/types/evaluation_task_param.py +88 -33
- scale_gp_beta/types/evaluation_update_params.py +17 -0
- scale_gp_beta/types/file_list_params.py +2 -3
- scale_gp_beta/types/inference_model.py +0 -4
- scale_gp_beta/types/item_locator.py +7 -0
- scale_gp_beta/types/item_locator_template.py +7 -0
- scale_gp_beta/types/model_list_params.py +15 -18
- scale_gp_beta/types/span.py +40 -1
- scale_gp_beta/types/span_create_params.py +13 -5
- scale_gp_beta/types/span_list_params.py +4 -5
- scale_gp_beta/types/span_update_params.py +5 -3
- {scale_gp_beta-0.1.0a12.dist-info → scale_gp_beta-0.1.0a13.dist-info}/METADATA +1 -1
- {scale_gp_beta-0.1.0a12.dist-info → scale_gp_beta-0.1.0a13.dist-info}/RECORD +44 -34
- {scale_gp_beta-0.1.0a12.dist-info → scale_gp_beta-0.1.0a13.dist-info}/WHEEL +0 -0
- {scale_gp_beta-0.1.0a12.dist-info → scale_gp_beta-0.1.0a13.dist-info}/licenses/LICENSE +0 -0
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
from .chat_completion import ChatCompletion as ChatCompletion
|
|
6
|
+
from .model_definition import ModelDefinition as ModelDefinition
|
|
6
7
|
from .chat_completion_chunk import ChatCompletionChunk as ChatCompletionChunk
|
|
7
8
|
from .completion_create_params import CompletionCreateParams as CompletionCreateParams
|
|
9
|
+
from .completion_models_params import CompletionModelsParams as CompletionModelsParams
|
|
8
10
|
from .completion_create_response import CompletionCreateResponse as CompletionCreateResponse
|
|
@@ -0,0 +1,29 @@
|
|
|
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 Literal, TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["CompletionModelsParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class CompletionModelsParams(TypedDict, total=False):
|
|
11
|
+
ending_before: str
|
|
12
|
+
|
|
13
|
+
limit: int
|
|
14
|
+
|
|
15
|
+
model_vendor: Literal[
|
|
16
|
+
"openai",
|
|
17
|
+
"cohere",
|
|
18
|
+
"vertex_ai",
|
|
19
|
+
"anthropic",
|
|
20
|
+
"azure",
|
|
21
|
+
"gemini",
|
|
22
|
+
"launch",
|
|
23
|
+
"llmengine",
|
|
24
|
+
"model_zoo",
|
|
25
|
+
"bedrock",
|
|
26
|
+
"xai",
|
|
27
|
+
]
|
|
28
|
+
|
|
29
|
+
starting_after: str
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing_extensions import Literal
|
|
4
|
+
|
|
5
|
+
from pydantic import Field as FieldInfo
|
|
6
|
+
|
|
7
|
+
from ..._models import BaseModel
|
|
8
|
+
|
|
9
|
+
__all__ = ["ModelDefinition"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ModelDefinition(BaseModel):
|
|
13
|
+
api_model_name: str = FieldInfo(alias="model_name")
|
|
14
|
+
"""model name, for example `gpt-4o`"""
|
|
15
|
+
|
|
16
|
+
api_model_type: Literal["generic", "completion", "chat_completion"] = FieldInfo(alias="model_type")
|
|
17
|
+
"""model type, for example `chat_completion`"""
|
|
18
|
+
|
|
19
|
+
api_model_vendor: Literal[
|
|
20
|
+
"openai",
|
|
21
|
+
"cohere",
|
|
22
|
+
"vertex_ai",
|
|
23
|
+
"anthropic",
|
|
24
|
+
"azure",
|
|
25
|
+
"gemini",
|
|
26
|
+
"launch",
|
|
27
|
+
"llmengine",
|
|
28
|
+
"model_zoo",
|
|
29
|
+
"bedrock",
|
|
30
|
+
"xai",
|
|
31
|
+
] = FieldInfo(alias="model_vendor")
|
|
32
|
+
"""model vendor, for example `openai`"""
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
from .._models import BaseModel
|
|
6
|
+
from .item_locator import ItemLocator
|
|
7
|
+
|
|
8
|
+
__all__ = ["Component"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class Component(BaseModel):
|
|
12
|
+
data: ItemLocator
|
|
13
|
+
"""
|
|
14
|
+
A pointer to the data in each evaluation item to be displayed within the
|
|
15
|
+
component
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
label: Optional[str] = None
|
|
@@ -0,0 +1,19 @@
|
|
|
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 Required, TypedDict
|
|
6
|
+
|
|
7
|
+
from .item_locator import ItemLocator
|
|
8
|
+
|
|
9
|
+
__all__ = ["ComponentParam"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ComponentParam(TypedDict, total=False):
|
|
13
|
+
data: Required[ItemLocator]
|
|
14
|
+
"""
|
|
15
|
+
A pointer to the data in each evaluation item to be displayed within the
|
|
16
|
+
component
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
label: str
|
|
@@ -0,0 +1,35 @@
|
|
|
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 TYPE_CHECKING, List, Union, Optional
|
|
6
|
+
from typing_extensions import Literal, TypeAlias, TypeAliasType
|
|
7
|
+
|
|
8
|
+
from .._compat import PYDANTIC_V2
|
|
9
|
+
from .._models import BaseModel
|
|
10
|
+
from .component import Component
|
|
11
|
+
|
|
12
|
+
__all__ = ["Container", "Child"]
|
|
13
|
+
|
|
14
|
+
if TYPE_CHECKING or PYDANTIC_V2:
|
|
15
|
+
Child = TypeAliasType("Child", Union["Container", Component])
|
|
16
|
+
else:
|
|
17
|
+
Child: TypeAlias = Union["Container", Component]
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class Container(BaseModel):
|
|
21
|
+
children: List[Child]
|
|
22
|
+
"""The children to be displayed within the container"""
|
|
23
|
+
|
|
24
|
+
direction: Optional[Literal["row", "column"]] = None
|
|
25
|
+
"""The axis that children are placed in the container.
|
|
26
|
+
|
|
27
|
+
Based on CSS `flex-direction` (see:
|
|
28
|
+
https://developer.mozilla.org/en-US/docs/Web/CSS/flex-direction)
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
if PYDANTIC_V2:
|
|
33
|
+
Container.model_rebuild()
|
|
34
|
+
else:
|
|
35
|
+
Container.update_forward_refs() # type: ignore
|
|
@@ -0,0 +1,28 @@
|
|
|
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 TYPE_CHECKING, Union, Iterable
|
|
6
|
+
from typing_extensions import Literal, Required, TypeAlias, TypedDict, TypeAliasType
|
|
7
|
+
|
|
8
|
+
from .._compat import PYDANTIC_V2
|
|
9
|
+
from .component_param import ComponentParam
|
|
10
|
+
|
|
11
|
+
__all__ = ["ContainerParam", "Child"]
|
|
12
|
+
|
|
13
|
+
if TYPE_CHECKING or PYDANTIC_V2:
|
|
14
|
+
Child = TypeAliasType("Child", Union["ContainerParam", ComponentParam])
|
|
15
|
+
else:
|
|
16
|
+
Child: TypeAlias = Union["ContainerParam", ComponentParam]
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class ContainerParam(TypedDict, total=False):
|
|
20
|
+
children: Required[Iterable[Child]]
|
|
21
|
+
"""The children to be displayed within the container"""
|
|
22
|
+
|
|
23
|
+
direction: Literal["row", "column"]
|
|
24
|
+
"""The axis that children are placed in the container.
|
|
25
|
+
|
|
26
|
+
Based on CSS `flex-direction` (see:
|
|
27
|
+
https://developer.mozilla.org/en-US/docs/Web/CSS/flex-direction)
|
|
28
|
+
"""
|
|
@@ -2,28 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import Optional
|
|
6
5
|
from typing_extensions import TypedDict
|
|
7
6
|
|
|
8
7
|
__all__ = ["DatasetItemListParams"]
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
class DatasetItemListParams(TypedDict, total=False):
|
|
12
|
-
dataset_id:
|
|
11
|
+
dataset_id: str
|
|
13
12
|
"""Optional dataset identifier.
|
|
14
13
|
|
|
15
14
|
Must be provided if a specific version is requested.
|
|
16
15
|
"""
|
|
17
16
|
|
|
18
|
-
ending_before:
|
|
17
|
+
ending_before: str
|
|
19
18
|
|
|
20
19
|
include_archived: bool
|
|
21
20
|
|
|
22
21
|
limit: int
|
|
23
22
|
|
|
24
|
-
starting_after:
|
|
23
|
+
starting_after: str
|
|
25
24
|
|
|
26
|
-
version:
|
|
25
|
+
version: int
|
|
27
26
|
"""Optional dataset version.
|
|
28
27
|
|
|
29
28
|
When unset, returns the latest version. Requires a valid dataset_id when set.
|
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import Optional
|
|
6
5
|
from typing_extensions import TypedDict
|
|
7
6
|
|
|
8
7
|
__all__ = ["DatasetItemRetrieveParams"]
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
class DatasetItemRetrieveParams(TypedDict, total=False):
|
|
12
|
-
version:
|
|
11
|
+
version: int
|
|
13
12
|
"""Optional dataset version. When unset, returns the latest version."""
|
|
@@ -2,17 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import
|
|
5
|
+
from typing import List
|
|
6
6
|
from typing_extensions import TypedDict
|
|
7
7
|
|
|
8
8
|
__all__ = ["DatasetListParams"]
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class DatasetListParams(TypedDict, total=False):
|
|
12
|
-
ending_before:
|
|
12
|
+
ending_before: str
|
|
13
13
|
|
|
14
14
|
include_archived: bool
|
|
15
15
|
|
|
16
16
|
limit: int
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
name: str
|
|
19
|
+
|
|
20
|
+
starting_after: str
|
|
21
|
+
|
|
22
|
+
tags: List[str]
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
3
5
|
from typing import List, Optional
|
|
4
6
|
from datetime import datetime
|
|
5
7
|
from typing_extensions import Literal
|
|
6
8
|
|
|
7
9
|
from .dataset import Dataset
|
|
10
|
+
from .._compat import PYDANTIC_V2
|
|
8
11
|
from .._models import BaseModel
|
|
9
|
-
from .evaluation_task import EvaluationTask
|
|
10
12
|
|
|
11
13
|
__all__ = ["Evaluation"]
|
|
12
14
|
|
|
@@ -33,5 +35,13 @@ class Evaluation(BaseModel):
|
|
|
33
35
|
|
|
34
36
|
object: Optional[Literal["evaluation"]] = None
|
|
35
37
|
|
|
36
|
-
tasks: Optional[List[EvaluationTask]] = None
|
|
38
|
+
tasks: Optional[List["EvaluationTask"]] = None
|
|
37
39
|
"""Tasks executed during evaluation. Populated with optional `task` view."""
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
from .evaluation_task import EvaluationTask
|
|
43
|
+
|
|
44
|
+
if PYDANTIC_V2:
|
|
45
|
+
Evaluation.model_rebuild()
|
|
46
|
+
else:
|
|
47
|
+
Evaluation.update_forward_refs() # type: ignore
|
|
@@ -5,8 +5,6 @@ from __future__ import annotations
|
|
|
5
5
|
from typing import Dict, List, Union, Iterable
|
|
6
6
|
from typing_extensions import Required, TypeAlias, TypedDict
|
|
7
7
|
|
|
8
|
-
from .evaluation_task_param import EvaluationTaskParam
|
|
9
|
-
|
|
10
8
|
__all__ = [
|
|
11
9
|
"EvaluationCreateParams",
|
|
12
10
|
"EvaluationStandaloneCreateRequest",
|
|
@@ -28,7 +26,7 @@ class EvaluationStandaloneCreateRequest(TypedDict, total=False):
|
|
|
28
26
|
tags: List[str]
|
|
29
27
|
"""The tags associated with the entity"""
|
|
30
28
|
|
|
31
|
-
tasks: Iterable[EvaluationTaskParam]
|
|
29
|
+
tasks: Iterable["EvaluationTaskParam"]
|
|
32
30
|
"""Tasks allow you to augment and evaluate your data"""
|
|
33
31
|
|
|
34
32
|
|
|
@@ -46,7 +44,7 @@ class EvaluationFromDatasetCreateRequest(TypedDict, total=False):
|
|
|
46
44
|
tags: List[str]
|
|
47
45
|
"""The tags associated with the entity"""
|
|
48
46
|
|
|
49
|
-
tasks: Iterable[EvaluationTaskParam]
|
|
47
|
+
tasks: Iterable["EvaluationTaskParam"]
|
|
50
48
|
"""Tasks allow you to augment and evaluate your data"""
|
|
51
49
|
|
|
52
50
|
|
|
@@ -73,7 +71,7 @@ class EvaluationWithDatasetCreateRequest(TypedDict, total=False):
|
|
|
73
71
|
tags: List[str]
|
|
74
72
|
"""The tags associated with the entity"""
|
|
75
73
|
|
|
76
|
-
tasks: Iterable[EvaluationTaskParam]
|
|
74
|
+
tasks: Iterable["EvaluationTaskParam"]
|
|
77
75
|
"""Tasks allow you to augment and evaluate your data"""
|
|
78
76
|
|
|
79
77
|
|
|
@@ -95,3 +93,5 @@ class EvaluationWithDatasetCreateRequestDataset(TypedDict, total=False):
|
|
|
95
93
|
EvaluationCreateParams: TypeAlias = Union[
|
|
96
94
|
EvaluationStandaloneCreateRequest, EvaluationFromDatasetCreateRequest, EvaluationWithDatasetCreateRequest
|
|
97
95
|
]
|
|
96
|
+
|
|
97
|
+
from .evaluation_task_param import EvaluationTaskParam
|
|
@@ -5,10 +5,10 @@ from typing_extensions import Literal
|
|
|
5
5
|
|
|
6
6
|
from .._models import BaseModel
|
|
7
7
|
|
|
8
|
-
__all__ = ["
|
|
8
|
+
__all__ = ["EvaluationDeleteResponse"]
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
class
|
|
11
|
+
class EvaluationDeleteResponse(BaseModel):
|
|
12
12
|
id: str
|
|
13
13
|
|
|
14
14
|
deleted: bool
|
|
@@ -2,19 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import Optional
|
|
6
5
|
from typing_extensions import TypedDict
|
|
7
6
|
|
|
8
7
|
__all__ = ["EvaluationItemListParams"]
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
class EvaluationItemListParams(TypedDict, total=False):
|
|
12
|
-
ending_before:
|
|
11
|
+
ending_before: str
|
|
13
12
|
|
|
14
|
-
evaluation_id:
|
|
13
|
+
evaluation_id: str
|
|
15
14
|
|
|
16
15
|
include_archived: bool
|
|
17
16
|
|
|
18
17
|
limit: int
|
|
19
18
|
|
|
20
|
-
starting_after:
|
|
19
|
+
starting_after: str
|
|
@@ -2,19 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import List
|
|
5
|
+
from typing import List
|
|
6
6
|
from typing_extensions import Literal, TypedDict
|
|
7
7
|
|
|
8
8
|
__all__ = ["EvaluationListParams"]
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class EvaluationListParams(TypedDict, total=False):
|
|
12
|
-
ending_before:
|
|
12
|
+
ending_before: str
|
|
13
13
|
|
|
14
14
|
include_archived: bool
|
|
15
15
|
|
|
16
16
|
limit: int
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
name: str
|
|
19
|
+
|
|
20
|
+
starting_after: str
|
|
21
|
+
|
|
22
|
+
tags: List[str]
|
|
19
23
|
|
|
20
24
|
views: List[Literal["tasks"]]
|