c63a5cfe-b235-4fbe-8bbb-82a9e02a482a-python 0.1.0a6__py3-none-any.whl → 0.1.0a8__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.
- {c63a5cfe_b235_4fbe_8bbb_82a9e02a482a_python-0.1.0a6.dist-info → c63a5cfe_b235_4fbe_8bbb_82a9e02a482a_python-0.1.0a8.dist-info}/METADATA +5 -5
- {c63a5cfe_b235_4fbe_8bbb_82a9e02a482a_python-0.1.0a6.dist-info → c63a5cfe_b235_4fbe_8bbb_82a9e02a482a_python-0.1.0a8.dist-info}/RECORD +25 -17
- gradientai/_client.py +16 -0
- gradientai/_streaming.py +40 -3
- gradientai/_version.py +1 -1
- gradientai/resources/agents/__init__.py +14 -0
- gradientai/resources/agents/agents.py +32 -0
- gradientai/resources/agents/chat/__init__.py +33 -0
- gradientai/resources/agents/chat/chat.py +102 -0
- gradientai/resources/agents/chat/completions.py +910 -0
- gradientai/resources/models.py +105 -77
- gradientai/types/__init__.py +3 -2
- gradientai/types/agents/chat/__init__.py +7 -0
- gradientai/types/agents/chat/chat_completion_chunk.py +93 -0
- gradientai/types/agents/chat/completion_create_params.py +200 -0
- gradientai/types/agents/chat/completion_create_response.py +81 -0
- gradientai/types/api_model.py +32 -0
- gradientai/types/chat/__init__.py +0 -1
- gradientai/types/chat/completion_create_response.py +1 -1
- gradientai/types/model_list_params.py +42 -0
- gradientai/types/model_list_response.py +8 -5
- gradientai/types/shared/__init__.py +1 -0
- gradientai/types/model.py +0 -21
- {c63a5cfe_b235_4fbe_8bbb_82a9e02a482a_python-0.1.0a6.dist-info → c63a5cfe_b235_4fbe_8bbb_82a9e02a482a_python-0.1.0a8.dist-info}/WHEEL +0 -0
- {c63a5cfe_b235_4fbe_8bbb_82a9e02a482a_python-0.1.0a6.dist-info → c63a5cfe_b235_4fbe_8bbb_82a9e02a482a_python-0.1.0a8.dist-info}/licenses/LICENSE +0 -0
- /gradientai/types/{chat → shared}/chat_completion_token_logprob.py +0 -0
@@ -0,0 +1,32 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from typing import Optional
|
4
|
+
from datetime import datetime
|
5
|
+
|
6
|
+
from .._models import BaseModel
|
7
|
+
from .api_agreement import APIAgreement
|
8
|
+
from .api_model_version import APIModelVersion
|
9
|
+
|
10
|
+
__all__ = ["APIModel"]
|
11
|
+
|
12
|
+
|
13
|
+
class APIModel(BaseModel):
|
14
|
+
agreement: Optional[APIAgreement] = None
|
15
|
+
|
16
|
+
created_at: Optional[datetime] = None
|
17
|
+
|
18
|
+
is_foundational: Optional[bool] = None
|
19
|
+
|
20
|
+
name: Optional[str] = None
|
21
|
+
|
22
|
+
parent_uuid: Optional[str] = None
|
23
|
+
|
24
|
+
updated_at: Optional[datetime] = None
|
25
|
+
|
26
|
+
upload_complete: Optional[bool] = None
|
27
|
+
|
28
|
+
url: Optional[str] = None
|
29
|
+
|
30
|
+
uuid: Optional[str] = None
|
31
|
+
|
32
|
+
version: Optional[APIModelVersion] = None
|
@@ -4,4 +4,3 @@ from __future__ import annotations
|
|
4
4
|
|
5
5
|
from .completion_create_params import CompletionCreateParams as CompletionCreateParams
|
6
6
|
from .completion_create_response import CompletionCreateResponse as CompletionCreateResponse
|
7
|
-
from .chat_completion_token_logprob import ChatCompletionTokenLogprob as ChatCompletionTokenLogprob
|
@@ -4,7 +4,7 @@ from typing import List, Optional
|
|
4
4
|
from typing_extensions import Literal
|
5
5
|
|
6
6
|
from ..._models import BaseModel
|
7
|
-
from .chat_completion_token_logprob import ChatCompletionTokenLogprob
|
7
|
+
from ..shared.chat_completion_token_logprob import ChatCompletionTokenLogprob
|
8
8
|
|
9
9
|
__all__ = ["CompletionCreateResponse", "Choice", "ChoiceLogprobs", "ChoiceMessage", "Usage"]
|
10
10
|
|
@@ -0,0 +1,42 @@
|
|
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 List
|
6
|
+
from typing_extensions import Literal, TypedDict
|
7
|
+
|
8
|
+
__all__ = ["ModelListParams"]
|
9
|
+
|
10
|
+
|
11
|
+
class ModelListParams(TypedDict, total=False):
|
12
|
+
page: int
|
13
|
+
"""page number."""
|
14
|
+
|
15
|
+
per_page: int
|
16
|
+
"""items per page."""
|
17
|
+
|
18
|
+
public_only: bool
|
19
|
+
"""only include models that are publicly available."""
|
20
|
+
|
21
|
+
usecases: List[
|
22
|
+
Literal[
|
23
|
+
"MODEL_USECASE_UNKNOWN",
|
24
|
+
"MODEL_USECASE_AGENT",
|
25
|
+
"MODEL_USECASE_FINETUNED",
|
26
|
+
"MODEL_USECASE_KNOWLEDGEBASE",
|
27
|
+
"MODEL_USECASE_GUARDRAIL",
|
28
|
+
"MODEL_USECASE_REASONING",
|
29
|
+
"MODEL_USECASE_SERVERLESS",
|
30
|
+
]
|
31
|
+
]
|
32
|
+
"""include only models defined for the listed usecases.
|
33
|
+
|
34
|
+
- MODEL_USECASE_UNKNOWN: The use case of the model is unknown
|
35
|
+
- MODEL_USECASE_AGENT: The model maybe used in an agent
|
36
|
+
- MODEL_USECASE_FINETUNED: The model maybe used for fine tuning
|
37
|
+
- MODEL_USECASE_KNOWLEDGEBASE: The model maybe used for knowledge bases
|
38
|
+
(embedding models)
|
39
|
+
- MODEL_USECASE_GUARDRAIL: The model maybe used for guardrails
|
40
|
+
- MODEL_USECASE_REASONING: The model usecase for reasoning
|
41
|
+
- MODEL_USECASE_SERVERLESS: The model usecase for serverless inference
|
42
|
+
"""
|
@@ -1,15 +1,18 @@
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
2
|
|
3
|
-
from typing import List
|
4
|
-
from typing_extensions import Literal
|
3
|
+
from typing import List, Optional
|
5
4
|
|
6
|
-
from .model import Model
|
7
5
|
from .._models import BaseModel
|
6
|
+
from .api_model import APIModel
|
7
|
+
from .shared.api_meta import APIMeta
|
8
|
+
from .shared.api_links import APILinks
|
8
9
|
|
9
10
|
__all__ = ["ModelListResponse"]
|
10
11
|
|
11
12
|
|
12
13
|
class ModelListResponse(BaseModel):
|
13
|
-
|
14
|
+
links: Optional[APILinks] = None
|
14
15
|
|
15
|
-
|
16
|
+
meta: Optional[APIMeta] = None
|
17
|
+
|
18
|
+
models: Optional[List[APIModel]] = None
|
gradientai/types/model.py
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
-
|
3
|
-
from typing_extensions import Literal
|
4
|
-
|
5
|
-
from .._models import BaseModel
|
6
|
-
|
7
|
-
__all__ = ["Model"]
|
8
|
-
|
9
|
-
|
10
|
-
class Model(BaseModel):
|
11
|
-
id: str
|
12
|
-
"""The model identifier, which can be referenced in the API endpoints."""
|
13
|
-
|
14
|
-
created: int
|
15
|
-
"""The Unix timestamp (in seconds) when the model was created."""
|
16
|
-
|
17
|
-
object: Literal["model"]
|
18
|
-
"""The object type, which is always "model"."""
|
19
|
-
|
20
|
-
owned_by: str
|
21
|
-
"""The organization that owns the model."""
|
File without changes
|
File without changes
|
File without changes
|