tamar-model-client 0.1.6__tar.gz → 0.1.7__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.
Files changed (24) hide show
  1. {tamar_model_client-0.1.6 → tamar_model_client-0.1.7}/PKG-INFO +1 -1
  2. {tamar_model_client-0.1.6 → tamar_model_client-0.1.7}/setup.py +1 -1
  3. {tamar_model_client-0.1.6 → tamar_model_client-0.1.7}/tamar_model_client/async_client.py +4 -2
  4. {tamar_model_client-0.1.6 → tamar_model_client-0.1.7}/tamar_model_client.egg-info/PKG-INFO +1 -1
  5. {tamar_model_client-0.1.6 → tamar_model_client-0.1.7}/README.md +0 -0
  6. {tamar_model_client-0.1.6 → tamar_model_client-0.1.7}/setup.cfg +0 -0
  7. {tamar_model_client-0.1.6 → tamar_model_client-0.1.7}/tamar_model_client/__init__.py +0 -0
  8. {tamar_model_client-0.1.6 → tamar_model_client-0.1.7}/tamar_model_client/auth.py +0 -0
  9. {tamar_model_client-0.1.6 → tamar_model_client-0.1.7}/tamar_model_client/enums/__init__.py +0 -0
  10. {tamar_model_client-0.1.6 → tamar_model_client-0.1.7}/tamar_model_client/enums/channel.py +0 -0
  11. {tamar_model_client-0.1.6 → tamar_model_client-0.1.7}/tamar_model_client/enums/invoke.py +0 -0
  12. {tamar_model_client-0.1.6 → tamar_model_client-0.1.7}/tamar_model_client/enums/providers.py +0 -0
  13. {tamar_model_client-0.1.6 → tamar_model_client-0.1.7}/tamar_model_client/exceptions.py +0 -0
  14. {tamar_model_client-0.1.6 → tamar_model_client-0.1.7}/tamar_model_client/generated/__init__.py +0 -0
  15. {tamar_model_client-0.1.6 → tamar_model_client-0.1.7}/tamar_model_client/generated/model_service_pb2.py +0 -0
  16. {tamar_model_client-0.1.6 → tamar_model_client-0.1.7}/tamar_model_client/generated/model_service_pb2_grpc.py +0 -0
  17. {tamar_model_client-0.1.6 → tamar_model_client-0.1.7}/tamar_model_client/schemas/__init__.py +0 -0
  18. {tamar_model_client-0.1.6 → tamar_model_client-0.1.7}/tamar_model_client/schemas/inputs.py +0 -0
  19. {tamar_model_client-0.1.6 → tamar_model_client-0.1.7}/tamar_model_client/schemas/outputs.py +0 -0
  20. {tamar_model_client-0.1.6 → tamar_model_client-0.1.7}/tamar_model_client/sync_client.py +0 -0
  21. {tamar_model_client-0.1.6 → tamar_model_client-0.1.7}/tamar_model_client.egg-info/SOURCES.txt +0 -0
  22. {tamar_model_client-0.1.6 → tamar_model_client-0.1.7}/tamar_model_client.egg-info/dependency_links.txt +0 -0
  23. {tamar_model_client-0.1.6 → tamar_model_client-0.1.7}/tamar_model_client.egg-info/requires.txt +0 -0
  24. {tamar_model_client-0.1.6 → tamar_model_client-0.1.7}/tamar_model_client.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tamar-model-client
3
- Version: 0.1.6
3
+ Version: 0.1.7
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
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="tamar-model-client",
5
- version="0.1.6",
5
+ version="0.1.7",
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",
@@ -138,7 +138,9 @@ class AsyncTamarModelClient:
138
138
  atexit.register(self._safe_sync_close) # 注册进程退出自动关闭
139
139
 
140
140
  def _build_auth_metadata(self) -> list:
141
- if not self.jwt_token and self.jwt_handler:
141
+ # if not self.jwt_token and self.jwt_handler:
142
+ # 更改为每次请求都生成一次token
143
+ if self.jwt_handler:
142
144
  self.jwt_token = self.jwt_handler.encode_token(self.default_payload, expires_in=self.token_expires_in)
143
145
  return [("authorization", f"Bearer {self.jwt_token}")] if self.jwt_token else []
144
146
 
@@ -265,7 +267,7 @@ class AsyncTamarModelClient:
265
267
  # 清理 serialize后的 grpc_request_kwargs
266
268
  grpc_request_kwargs = remove_none_from_dict(grpc_request_kwargs)
267
269
 
268
- request = model_service_pb2.ModelRequestItem(
270
+ request = model_service_pb2ModelRequestItem(
269
271
  provider=model_request.provider.value,
270
272
  channel=model_request.channel.value,
271
273
  invoke_type=model_request.invoke_type.value,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tamar-model-client
3
- Version: 0.1.6
3
+ Version: 0.1.7
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