tamar-model-client 0.2.5__py3-none-any.whl → 0.2.6__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.
@@ -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.5
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
@@ -23,8 +23,8 @@ tamar_model_client/enums/providers.py,sha256=L_bX75K6KnWURoFizoitZ1Ybza7bmYDqXec
23
23
  tamar_model_client/generated/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
24
  tamar_model_client/generated/model_service_pb2.py,sha256=RI6wNSmgmylzWPedFfPxx938UzS7kcPR58YTzYshcL8,3066
25
25
  tamar_model_client/generated/model_service_pb2_grpc.py,sha256=k4tIbp3XBxdyuOVR18Ung_4SUryONB51UYf_uUEl6V4,5145
26
- tamar_model_client/schemas/__init__.py,sha256=AxuI-TcvA4OMTj2FtK4wAItvz9LrK_293pu3cmMLE7k,394
27
- tamar_model_client/schemas/inputs.py,sha256=5ZjuWhlIY_geFGL6cnqk2v1ZQ7algyRD2jJ6NiShVt4,17324
26
+ tamar_model_client/schemas/__init__.py,sha256=j5XaUGc5Wy669IRNCey56sryCK8QrYbSTl8DSbCqc94,437
27
+ tamar_model_client/schemas/inputs.py,sha256=Hyl3f-oGT3ooUSs4yn7rHWLJHlltXsQwLSwnlNJx1sE,17503
28
28
  tamar_model_client/schemas/outputs.py,sha256=M_fcqUtXPJnfiLabHlyA8BorlC5pYkf5KLjXO1ysKIQ,1031
29
29
  tests/__init__.py,sha256=kbmImddLDwdqlkkmkyKtl4bQy_ipe-R8eskpaBylU9w,38
30
30
  tests/stream_hanging_analysis.py,sha256=W3W48IhQbNAR6-xvMpoWZvnWOnr56CTaH4-aORNBuD4,14807
@@ -32,7 +32,7 @@ tests/test_circuit_breaker.py,sha256=nhEBnyXFjIYjRWlUdu7Z9PnPq48ypbBK6fxN6deHedw
32
32
  tests/test_google_azure_final.py,sha256=YnTl5_e-C_lay2e0_0z35rpIxRkLs1tTsvcQ3Qww_RU,67077
33
33
  tests/test_logging_issue.py,sha256=JTMbotfHpAEPMBj73pOwxPn-Zn4QVQJX6scMz48FRDQ,2427
34
34
  tests/test_simple.py,sha256=Xf0U-J9_xn_LzUsmYu06suK0_7DrPeko8OHoHldsNxE,7169
35
- tamar_model_client-0.2.5.dist-info/METADATA,sha256=d_AzgzHtqfzXlVVHLZU88m3LigTm1oE0Jc_8NIYPggQ,44621
36
- tamar_model_client-0.2.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
37
- tamar_model_client-0.2.5.dist-info/top_level.txt,sha256=f1I-S8iWN-cgv4gB8gxRg9jJOTJMumvm4oGKVPfGg6A,25
38
- tamar_model_client-0.2.5.dist-info/RECORD,,
35
+ tamar_model_client-0.2.6.dist-info/METADATA,sha256=kn5Ehyvj1YG3TDoY5YsJvIDhn3hksTgHUycDdRRJojU,44637
36
+ tamar_model_client-0.2.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
37
+ tamar_model_client-0.2.6.dist-info/top_level.txt,sha256=f1I-S8iWN-cgv4gB8gxRg9jJOTJMumvm4oGKVPfGg6A,25
38
+ tamar_model_client-0.2.6.dist-info/RECORD,,