tamar-model-client 0.2.5__tar.gz → 0.2.6__tar.gz
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.
- {tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/PKG-INFO +3 -3
- {tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/setup.py +3 -3
- {tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/tamar_model_client/schemas/__init__.py +2 -1
- {tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/tamar_model_client/schemas/inputs.py +8 -4
- {tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/tamar_model_client.egg-info/PKG-INFO +3 -3
- {tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/tamar_model_client.egg-info/requires.txt +2 -2
- {tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/README.md +0 -0
- {tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/setup.cfg +0 -0
- {tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/tamar_model_client/__init__.py +0 -0
- {tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/tamar_model_client/async_client.py +0 -0
- {tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/tamar_model_client/auth.py +0 -0
- {tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/tamar_model_client/circuit_breaker.py +0 -0
- {tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/tamar_model_client/core/__init__.py +0 -0
- {tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/tamar_model_client/core/base_client.py +0 -0
- {tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/tamar_model_client/core/http_fallback.py +0 -0
- {tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/tamar_model_client/core/logging_setup.py +0 -0
- {tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/tamar_model_client/core/request_builder.py +0 -0
- {tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/tamar_model_client/core/request_id_manager.py +0 -0
- {tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/tamar_model_client/core/response_handler.py +0 -0
- {tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/tamar_model_client/core/utils.py +0 -0
- {tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/tamar_model_client/enums/__init__.py +0 -0
- {tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/tamar_model_client/enums/channel.py +0 -0
- {tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/tamar_model_client/enums/invoke.py +0 -0
- {tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/tamar_model_client/enums/providers.py +0 -0
- {tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/tamar_model_client/error_handler.py +0 -0
- {tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/tamar_model_client/exceptions.py +0 -0
- {tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/tamar_model_client/generated/__init__.py +0 -0
- {tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/tamar_model_client/generated/model_service_pb2.py +0 -0
- {tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/tamar_model_client/generated/model_service_pb2_grpc.py +0 -0
- {tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/tamar_model_client/json_formatter.py +0 -0
- {tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/tamar_model_client/logging_icons.py +0 -0
- {tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/tamar_model_client/schemas/outputs.py +0 -0
- {tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/tamar_model_client/sync_client.py +0 -0
- {tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/tamar_model_client/utils.py +0 -0
- {tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/tamar_model_client.egg-info/SOURCES.txt +0 -0
- {tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/tamar_model_client.egg-info/dependency_links.txt +0 -0
- {tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/tamar_model_client.egg-info/top_level.txt +0 -0
- {tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/tests/__init__.py +0 -0
- {tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/tests/test_circuit_breaker.py +0 -0
- {tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/tests/test_google_azure_final.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: tamar-model-client
|
3
|
-
Version: 0.2.
|
3
|
+
Version: 0.2.6
|
4
4
|
Summary: A Python SDK for interacting with the Model Manager gRPC service
|
5
5
|
Home-page: http://gitlab.tamaredge.top/project-tap/AgentOS/model-manager-client
|
6
6
|
Author: Oscar Ou
|
@@ -16,8 +16,8 @@ Requires-Dist: grpcio-tools~=1.67.1
|
|
16
16
|
Requires-Dist: pydantic
|
17
17
|
Requires-Dist: PyJWT
|
18
18
|
Requires-Dist: nest_asyncio
|
19
|
-
Requires-Dist: openai
|
20
|
-
Requires-Dist: google-genai
|
19
|
+
Requires-Dist: openai>=1.99.3
|
20
|
+
Requires-Dist: google-genai>=1.29.0
|
21
21
|
Requires-Dist: requests>=2.25.0
|
22
22
|
Requires-Dist: aiohttp>=3.7.0
|
23
23
|
Dynamic: author
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
2
2
|
|
3
3
|
setup(
|
4
4
|
name="tamar-model-client",
|
5
|
-
version="0.2.
|
5
|
+
version="0.2.6",
|
6
6
|
description="A Python SDK for interacting with the Model Manager gRPC service",
|
7
7
|
author="Oscar Ou",
|
8
8
|
author_email="oscar.ou@tamaredge.ai",
|
@@ -17,8 +17,8 @@ setup(
|
|
17
17
|
"pydantic",
|
18
18
|
"PyJWT",
|
19
19
|
"nest_asyncio",
|
20
|
-
"openai",
|
21
|
-
"google-genai",
|
20
|
+
"openai>=1.99.3",
|
21
|
+
"google-genai>=1.29.0",
|
22
22
|
"requests>=2.25.0", # HTTP降级功能(同步)
|
23
23
|
"aiohttp>=3.7.0", # HTTP降级功能(异步)
|
24
24
|
],
|
{tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/tamar_model_client/schemas/__init__.py
RENAMED
@@ -2,11 +2,12 @@
|
|
2
2
|
Schema definitions for the API
|
3
3
|
"""
|
4
4
|
|
5
|
-
from .inputs import UserContext, ModelRequest, BatchModelRequestItem, BatchModelRequest
|
5
|
+
from .inputs import UserContext, ModelRequest, BatchModelRequestItem, BatchModelRequest, TamarFileIdInput
|
6
6
|
from .outputs import ModelResponse, BatchModelResponse
|
7
7
|
|
8
8
|
__all__ = [
|
9
9
|
# Model Inputs
|
10
|
+
"TamarFileIdInput",
|
10
11
|
"UserContext",
|
11
12
|
"ModelRequest",
|
12
13
|
"BatchModelRequestItem",
|
@@ -26,6 +26,10 @@ class UserContext(BaseModel):
|
|
26
26
|
client_type: str # 客户端类型,这里记录的是哪个服务请求过来的
|
27
27
|
|
28
28
|
|
29
|
+
class TamarFileIdInput(BaseModel):
|
30
|
+
file_id: str
|
31
|
+
|
32
|
+
|
29
33
|
class GoogleGenAiInput(BaseModel):
|
30
34
|
model: str
|
31
35
|
contents: Union[types.ContentListUnion, types.ContentListUnionDict]
|
@@ -179,11 +183,11 @@ class OpenAIImagesInput(BaseModel):
|
|
179
183
|
|
180
184
|
|
181
185
|
class OpenAIImagesEditInput(BaseModel):
|
182
|
-
image: Union[FileTypes, List[FileTypes]]
|
186
|
+
image: Union[FileTypes, List[FileTypes], TamarFileIdInput, List[TamarFileIdInput]]
|
183
187
|
prompt: str
|
184
188
|
background: Optional[Literal["transparent", "opaque", "auto"]] | NotGiven = NOT_GIVEN
|
185
189
|
input_fidelity: Optional[Literal["high", "low"]] | NotGiven = NOT_GIVEN
|
186
|
-
mask: FileTypes | NotGiven = NOT_GIVEN
|
190
|
+
mask: FileTypes | TamarFileIdInput | NotGiven = NOT_GIVEN
|
187
191
|
model: Union[str, ImageModel, None] | NotGiven = NOT_GIVEN
|
188
192
|
n: Optional[int] | NotGiven = NOT_GIVEN
|
189
193
|
output_compression: Optional[int] | NotGiven = NOT_GIVEN
|
@@ -277,7 +281,7 @@ class ModelRequestInput(BaseRequest):
|
|
277
281
|
config: Optional[Union[types.GenerateContentConfigOrDict, types.GenerateImagesConfigOrDict]] = None
|
278
282
|
|
279
283
|
# Images(OpenAI Images / Images Edit / Google Vertex Images 合并)
|
280
|
-
image: Optional[Union[FileTypes, List[FileTypes]]] = None
|
284
|
+
image: Optional[Union[FileTypes, List[FileTypes], TamarFileIdInput, List[TamarFileIdInput]]] = None
|
281
285
|
# background 同名字段合并:Responses 的 bool(后台任务)+ Images 的透明度枚举
|
282
286
|
background: Optional[Union[bool, Literal["transparent", "opaque", "auto"], NotGiven]] = NOT_GIVEN
|
283
287
|
moderation: Optional[Union[Literal["low", "auto"], NotGiven]] = NOT_GIVEN
|
@@ -285,7 +289,7 @@ class ModelRequestInput(BaseRequest):
|
|
285
289
|
output_compression: Optional[Union[int, NotGiven]] = NOT_GIVEN
|
286
290
|
output_format: Optional[Union[Literal["png", "jpeg", "webp"], NotGiven]] = NOT_GIVEN
|
287
291
|
partial_images: Optional[Union[int, NotGiven]] = NOT_GIVEN
|
288
|
-
mask: Union[FileTypes, NotGiven] = NOT_GIVEN
|
292
|
+
mask: Union[FileTypes, TamarFileIdInput, NotGiven] = NOT_GIVEN
|
289
293
|
negative_prompt: Optional[str] = None
|
290
294
|
aspect_ratio: Optional[Literal["1:1", "9:16", "16:9", "4:3", "3:4"]] = None
|
291
295
|
guidance_scale: Optional[float] = None
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: tamar-model-client
|
3
|
-
Version: 0.2.
|
3
|
+
Version: 0.2.6
|
4
4
|
Summary: A Python SDK for interacting with the Model Manager gRPC service
|
5
5
|
Home-page: http://gitlab.tamaredge.top/project-tap/AgentOS/model-manager-client
|
6
6
|
Author: Oscar Ou
|
@@ -16,8 +16,8 @@ Requires-Dist: grpcio-tools~=1.67.1
|
|
16
16
|
Requires-Dist: pydantic
|
17
17
|
Requires-Dist: PyJWT
|
18
18
|
Requires-Dist: nest_asyncio
|
19
|
-
Requires-Dist: openai
|
20
|
-
Requires-Dist: google-genai
|
19
|
+
Requires-Dist: openai>=1.99.3
|
20
|
+
Requires-Dist: google-genai>=1.29.0
|
21
21
|
Requires-Dist: requests>=2.25.0
|
22
22
|
Requires-Dist: aiohttp>=3.7.0
|
23
23
|
Dynamic: author
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/tamar_model_client/core/base_client.py
RENAMED
File without changes
|
{tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/tamar_model_client/core/http_fallback.py
RENAMED
File without changes
|
{tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/tamar_model_client/core/logging_setup.py
RENAMED
File without changes
|
{tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/tamar_model_client/core/request_builder.py
RENAMED
File without changes
|
{tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/tamar_model_client/core/request_id_manager.py
RENAMED
File without changes
|
{tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/tamar_model_client/core/response_handler.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/tamar_model_client/generated/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/tamar_model_client.egg-info/SOURCES.txt
RENAMED
File without changes
|
File without changes
|
{tamar_model_client-0.2.5 → tamar_model_client-0.2.6}/tamar_model_client.egg-info/top_level.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|