agi-med-common 5.0.9__py3-none-any.whl → 5.0.11__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.
@@ -1,4 +1,4 @@
1
- __version__ = "5.0.9"
1
+ __version__ = "5.0.11"
2
2
 
3
3
  from .logger import LogLevelEnum, logger_init, log_llm_error
4
4
  from .models import (
@@ -17,5 +17,5 @@ from .xml_parser import XMLParser
17
17
  from .parallel_map import parallel_map
18
18
  from .models.tracks import TrackInfo, DomainInfo
19
19
  from .api.chat_manager_api import ChatManagerAPI
20
- from .api.content_interpreter_api import ContentInterpreterRequest, ContentInterpreterResponse, ContentInterpreterAPI
21
- from .api.content_interpreter_remote_api import ContentInterpreterRemoteRequest, ContentInterpreterRemoteResponse, ContentInterpreterRemoteAPI
20
+ from .api.content_interpreter_api import ContentInterpreterAPI, Interpretation
21
+ from .api.content_interpreter_remote_api import ContentInterpreterRemoteAPI
@@ -1,19 +1,19 @@
1
- from agi_med_common.models import ChatItem
2
- from pydantic import BaseModel
3
-
1
+ from typing import Tuple
4
2
 
5
- class ContentInterpreterRequest(BaseModel):
6
- kind: str
7
- query: str
8
- resource_id: str
9
- chat: ChatItem | None = None
3
+ from agi_med_common.file_storage import ResourceId
4
+ from agi_med_common.models import ChatItem
10
5
 
11
6
 
12
- class ContentInterpreterResponse(BaseModel):
13
- interpretation: str
14
- resource_id: str
7
+ Interpretation = str
15
8
 
16
9
 
17
10
  class ContentInterpreterAPI:
18
- def interpret(self, request: ContentInterpreterRequest) -> ContentInterpreterResponse:
11
+ def interpret(
12
+ self,
13
+ kind: str,
14
+ query: str,
15
+ resource_id: str,
16
+ chat: ChatItem | None = None,
17
+ request_id: str = "",
18
+ ) -> Tuple[Interpretation, ResourceId | None]:
19
19
  raise NotImplementedError
@@ -1,13 +1,5 @@
1
- from agi_med_common.models import ChatItem
2
1
  from pydantic import BaseModel
3
-
4
-
5
- class ContentInterpreterRemoteRequest(BaseModel):
6
- kind: str
7
- query: str
8
- resource_fname: str
9
- resource: bytes
10
- chat: ChatItem | None = None
2
+ from agi_med_common import ChatItem
11
3
 
12
4
 
13
5
  class ContentInterpreterRemoteResponse(BaseModel):
@@ -17,5 +9,12 @@ class ContentInterpreterRemoteResponse(BaseModel):
17
9
 
18
10
 
19
11
  class ContentInterpreterRemoteAPI:
20
- def interpret_remote(self, request: ContentInterpreterRemoteRequest) -> ContentInterpreterRemoteResponse:
12
+ def interpret_remote(
13
+ self,
14
+ kind: str,
15
+ query: str,
16
+ resource: bytes,
17
+ chat: ChatItem | None = None,
18
+ request_id: str = "",
19
+ ) -> ContentInterpreterRemoteResponse:
21
20
  raise NotImplementedError
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agi_med_common
3
- Version: 5.0.9
3
+ Version: 5.0.11
4
4
  Summary: Сommon for agi-med team
5
5
  Author: AGI-MED-TEAM
6
6
  Requires-Python: >=3.11
@@ -1,12 +1,12 @@
1
- agi_med_common/__init__.py,sha256=ew-53A0rQ4hJLrduWvJ9sa9k3Yg2CIIddu7SLWJ0Im8,1020
1
+ agi_med_common/__init__.py,sha256=n6etKi1F3X15okCexAN7BD3-XYsXdULcalg0sSudtzc,915
2
2
  agi_med_common/file_storage.py,sha256=T0Hbs4W-pWO6HdWcmlVqABrQHYdq7lLZH4_Vu-YNVbw,1802
3
3
  agi_med_common/parallel_map.py,sha256=Qx6xe7DqlEUDpSucp5Hm8r9y9Iquwh9JvX7lOqHhnOw,921
4
4
  agi_med_common/utils.py,sha256=rBNAECUrvvyf-UZ650IpTfHvx5I8lYSnsB8QPBKti48,1276
5
5
  agi_med_common/validators.py,sha256=vMoPN42XzC8re-zdjekk5_lNQYHuTiAWD56YLvj2Z2w,2824
6
6
  agi_med_common/xml_parser.py,sha256=VvLIX_XCZao9i0qqpTVx8nx0vbFXSe8pEbdJdXnj97g,568
7
7
  agi_med_common/api/chat_manager_api.py,sha256=e-LJSmnWCFW1Wj5R3uavlKaq9p5VBoErqP_Tif2Qo-4,483
8
- agi_med_common/api/content_interpreter_api.py,sha256=U6J-AO7NiaqSaKPeSwrcPVlRyAWd71yQ6gxFDLpHPjs,451
9
- agi_med_common/api/content_interpreter_remote_api.py,sha256=fl_Z3TLGh_fNtDKdng2pIQtjAkYrI_8TdA7FejKcHlY,534
8
+ agi_med_common/api/content_interpreter_api.py,sha256=-K9mTwe03xd6HD5vQtKmyHTXE5Ia7bRz2QIggLQv1eA,425
9
+ agi_med_common/api/content_interpreter_remote_api.py,sha256=cGaIKZGuosneLXs0jCM8QdqoX9W0kj0EvWLfDGZqjWQ,474
10
10
  agi_med_common/logger/__init__.py,sha256=RW_0VZtbeJ4RsLqUXZUQWl5CtV9g840rU7qRlf5u49E,96
11
11
  agi_med_common/logger/log_level_enum.py,sha256=lWuSMho9I0v_xf1RuwpERx5o8NJXaavjwxSdh8fxMqE,477
12
12
  agi_med_common/logger/logger.py,sha256=-VU69ULbw2-pNpOcxKiMpOeRAPe6H-EsGV9WRTv1SUo,839
@@ -18,7 +18,7 @@ agi_med_common/models/tracks.py,sha256=UP-jeWqDiCK6dyoMDfs7hemgl_xsJKee_DApjBf-X
18
18
  agi_med_common/models/widget.py,sha256=g7Bobyk_gANghGEhjDjvi4i-YRoHo5Bm1Pr4eF-zf0U,661
19
19
  agi_med_common/models/base_config_models/__init__.py,sha256=KjS_bSCka8BOMsigwcIML-e6eNB2ouMU6gxlhRmzeuY,44
20
20
  agi_med_common/models/base_config_models/gigachat_config.py,sha256=WNSCTO8Fjpxc1v2LRUHfKqo9aeMDpXltTHYBFgTD2N0,422
21
- agi_med_common-5.0.9.dist-info/METADATA,sha256=nvBQFXXvqTb026uHrY3mG9upNwEhrfL-v7Lj3BZBHMo,546
22
- agi_med_common-5.0.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
23
- agi_med_common-5.0.9.dist-info/top_level.txt,sha256=26o565jF_7wYQj7-YJfTedtT9yDxDcf8RNikOYuPq78,15
24
- agi_med_common-5.0.9.dist-info/RECORD,,
21
+ agi_med_common-5.0.11.dist-info/METADATA,sha256=isesL30YSmfoc30spdKHCm0aqbuDdJheiMnVP5KiVT8,547
22
+ agi_med_common-5.0.11.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
23
+ agi_med_common-5.0.11.dist-info/top_level.txt,sha256=26o565jF_7wYQj7-YJfTedtT9yDxDcf8RNikOYuPq78,15
24
+ agi_med_common-5.0.11.dist-info/RECORD,,