agi-med-common 5.0.19__tar.gz → 5.0.21__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 (33) hide show
  1. {agi_med_common-5.0.19 → agi_med_common-5.0.21}/PKG-INFO +1 -1
  2. {agi_med_common-5.0.19 → agi_med_common-5.0.21}/src/agi_med_common/__init__.py +1 -8
  3. agi_med_common-5.0.21/src/agi_med_common/api.py +68 -0
  4. {agi_med_common-5.0.19 → agi_med_common-5.0.21}/src/agi_med_common.egg-info/PKG-INFO +1 -1
  5. {agi_med_common-5.0.19 → agi_med_common-5.0.21}/src/agi_med_common.egg-info/SOURCES.txt +1 -7
  6. agi_med_common-5.0.19/src/agi_med_common/api/chat_manager_api.py +0 -14
  7. agi_med_common-5.0.19/src/agi_med_common/api/classifier_api.py +0 -14
  8. agi_med_common-5.0.19/src/agi_med_common/api/content_interpreter_api.py +0 -19
  9. agi_med_common-5.0.19/src/agi_med_common/api/content_interpreter_remote_api.py +0 -20
  10. agi_med_common-5.0.19/src/agi_med_common/api/critic_api.py +0 -6
  11. agi_med_common-5.0.19/src/agi_med_common/api/text_generator_api.py +0 -6
  12. agi_med_common-5.0.19/src/agi_med_common/api/text_processor_api.py +0 -6
  13. {agi_med_common-5.0.19 → agi_med_common-5.0.21}/README.md +0 -0
  14. {agi_med_common-5.0.19 → agi_med_common-5.0.21}/pyproject.toml +0 -0
  15. {agi_med_common-5.0.19 → agi_med_common-5.0.21}/setup.cfg +0 -0
  16. {agi_med_common-5.0.19 → agi_med_common-5.0.21}/src/agi_med_common/file_storage.py +0 -0
  17. {agi_med_common-5.0.19 → agi_med_common-5.0.21}/src/agi_med_common/models/__init__.py +0 -0
  18. {agi_med_common-5.0.19 → agi_med_common-5.0.21}/src/agi_med_common/models/_base.py +0 -0
  19. {agi_med_common-5.0.19 → agi_med_common-5.0.21}/src/agi_med_common/models/base_config_models/__init__.py +0 -0
  20. {agi_med_common-5.0.19 → agi_med_common-5.0.21}/src/agi_med_common/models/base_config_models/gigachat_config.py +0 -0
  21. {agi_med_common-5.0.19 → agi_med_common-5.0.21}/src/agi_med_common/models/chat.py +0 -0
  22. {agi_med_common-5.0.19 → agi_med_common-5.0.21}/src/agi_med_common/models/chat_item.py +0 -0
  23. {agi_med_common-5.0.19 → agi_med_common-5.0.21}/src/agi_med_common/models/enums.py +0 -0
  24. {agi_med_common-5.0.19 → agi_med_common-5.0.21}/src/agi_med_common/models/tracks.py +0 -0
  25. {agi_med_common-5.0.19 → agi_med_common-5.0.21}/src/agi_med_common/models/widget.py +0 -0
  26. {agi_med_common-5.0.19 → agi_med_common-5.0.21}/src/agi_med_common/parallel_map.py +0 -0
  27. {agi_med_common-5.0.19 → agi_med_common-5.0.21}/src/agi_med_common/type_union.py +0 -0
  28. {agi_med_common-5.0.19 → agi_med_common-5.0.21}/src/agi_med_common/utils.py +0 -0
  29. {agi_med_common-5.0.19 → agi_med_common-5.0.21}/src/agi_med_common/validators.py +0 -0
  30. {agi_med_common-5.0.19 → agi_med_common-5.0.21}/src/agi_med_common/xml_parser.py +0 -0
  31. {agi_med_common-5.0.19 → agi_med_common-5.0.21}/src/agi_med_common.egg-info/dependency_links.txt +0 -0
  32. {agi_med_common-5.0.19 → agi_med_common-5.0.21}/src/agi_med_common.egg-info/requires.txt +0 -0
  33. {agi_med_common-5.0.19 → agi_med_common-5.0.21}/src/agi_med_common.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agi_med_common
3
- Version: 5.0.19
3
+ Version: 5.0.21
4
4
  Summary: Сommon for agi-med team
5
5
  Author: AGI-MED-TEAM
6
6
  Requires-Python: >=3.11
@@ -1,4 +1,4 @@
1
- __version__ = "5.0.19"
1
+ __version__ = "5.0.21"
2
2
 
3
3
  from .models import (
4
4
  MTRSLabelEnum,
@@ -21,10 +21,3 @@ from .validators import ExistingPath, ExistingFile, ExistingDir, StrNotEmpty, Se
21
21
  from .xml_parser import XMLParser
22
22
  from .parallel_map import parallel_map
23
23
  from .models.tracks import TrackInfo, DomainInfo
24
- from .api.chat_manager_api import ChatManagerAPI
25
- from .api.content_interpreter_api import ContentInterpreterAPI, Interpretation
26
- from .api.content_interpreter_remote_api import ContentInterpreterRemoteAPI
27
- from .api.text_generator_api import TextGeneratorAPI
28
- from .api.text_processor_api import TextProcessorAPI
29
- from .api.classifier_api import ClassifierAPI
30
- from .api.critic_api import CriticAPI
@@ -0,0 +1,68 @@
1
+ from typing import List, Tuple
2
+
3
+ from agi_med_common.models import ChatItem, ReplicaItem, DomainInfo, TrackInfo
4
+ from pydantic import BaseModel
5
+
6
+
7
+ Value = str
8
+ Interpretation = str
9
+ ResourceId = str
10
+
11
+
12
+ class ChatManagerAPI:
13
+ def get_domains(self, language_code: str, client_id: str) -> List[DomainInfo]:
14
+ raise NotImplementedError
15
+
16
+ def get_tracks(self, language_code: str, client_id: str) -> List[TrackInfo]:
17
+ raise NotImplementedError
18
+
19
+ def get_response(self, chat: ChatItem, request_id: str = "") -> List[ReplicaItem]:
20
+ raise NotImplementedError
21
+
22
+
23
+ class TextGeneratorAPI:
24
+ def process(self, chat: ChatItem, request_id: str = "") -> str:
25
+ raise NotImplementedError
26
+
27
+
28
+ class ContentInterpreterRemoteResponse(BaseModel):
29
+ interpretation: str
30
+ resource_fname: str
31
+ resource: bytes
32
+
33
+
34
+ class ContentInterpreterRemoteAPI:
35
+ def interpret_remote(
36
+ self,
37
+ kind: str,
38
+ query: str,
39
+ resource: bytes,
40
+ chat: ChatItem | None = None,
41
+ request_id: str = "",
42
+ ) -> ContentInterpreterRemoteResponse:
43
+ raise NotImplementedError
44
+
45
+
46
+ class ClassifierAPI:
47
+ def get_values(self) -> List[Value]:
48
+ raise NotImplementedError
49
+
50
+ def evaluate(self, chat: ChatItem, request_id: str = "") -> Value:
51
+ raise NotImplementedError
52
+
53
+
54
+ class CriticAPI:
55
+ def evaluate(self, text: str, chat: ChatItem | None = None, request_id: str = "") -> float:
56
+ raise NotImplementedError
57
+
58
+
59
+ class ContentInterpreterAPI:
60
+ def interpret(
61
+ self, kind: str, query: str, resource_id: str = "", chat: ChatItem | None = None, request_id: str = ""
62
+ ) -> Tuple[Interpretation, ResourceId | None]:
63
+ raise NotImplementedError
64
+
65
+
66
+ class TextProcessorAPI:
67
+ def process(self, text: str, chat: ChatItem | None = None, request_id: str = "") -> str:
68
+ raise NotImplementedError
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agi_med_common
3
- Version: 5.0.19
3
+ Version: 5.0.21
4
4
  Summary: Сommon for agi-med team
5
5
  Author: AGI-MED-TEAM
6
6
  Requires-Python: >=3.11
@@ -1,6 +1,7 @@
1
1
  README.md
2
2
  pyproject.toml
3
3
  src/agi_med_common/__init__.py
4
+ src/agi_med_common/api.py
4
5
  src/agi_med_common/file_storage.py
5
6
  src/agi_med_common/parallel_map.py
6
7
  src/agi_med_common/type_union.py
@@ -12,13 +13,6 @@ src/agi_med_common.egg-info/SOURCES.txt
12
13
  src/agi_med_common.egg-info/dependency_links.txt
13
14
  src/agi_med_common.egg-info/requires.txt
14
15
  src/agi_med_common.egg-info/top_level.txt
15
- src/agi_med_common/api/chat_manager_api.py
16
- src/agi_med_common/api/classifier_api.py
17
- src/agi_med_common/api/content_interpreter_api.py
18
- src/agi_med_common/api/content_interpreter_remote_api.py
19
- src/agi_med_common/api/critic_api.py
20
- src/agi_med_common/api/text_generator_api.py
21
- src/agi_med_common/api/text_processor_api.py
22
16
  src/agi_med_common/models/__init__.py
23
17
  src/agi_med_common/models/_base.py
24
18
  src/agi_med_common/models/chat.py
@@ -1,14 +0,0 @@
1
- from typing import List
2
-
3
- from agi_med_common.models import ChatItem, ReplicaItem, DomainInfo, TrackInfo
4
-
5
-
6
- class ChatManagerAPI:
7
- def get_domains(self, language_code: str, client_id: str) -> List[DomainInfo]:
8
- raise NotImplementedError
9
-
10
- def get_tracks(self, language_code: str, client_id: str) -> List[TrackInfo]:
11
- raise NotImplementedError
12
-
13
- def get_response(self, chat: ChatItem, request_id: str = "") -> List[ReplicaItem]:
14
- raise NotImplementedError
@@ -1,14 +0,0 @@
1
- from typing import List
2
-
3
- from agi_med_common.models import ChatItem
4
-
5
-
6
- Value = str
7
-
8
-
9
- class ClassifierAPI:
10
- def get_values(self) -> List[Value]:
11
- raise NotImplementedError
12
-
13
- def evaluate(self, chat: ChatItem, request_id: str = "") -> Value:
14
- raise NotImplementedError
@@ -1,19 +0,0 @@
1
- from typing import Tuple
2
-
3
- from agi_med_common.file_storage import ResourceId
4
- from agi_med_common.models import ChatItem
5
-
6
-
7
- Interpretation = str
8
-
9
-
10
- class ContentInterpreterAPI:
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
- raise NotImplementedError
@@ -1,20 +0,0 @@
1
- from pydantic import BaseModel
2
- from agi_med_common import ChatItem
3
-
4
-
5
- class ContentInterpreterRemoteResponse(BaseModel):
6
- interpretation: str
7
- resource_fname: str
8
- resource: bytes
9
-
10
-
11
- class ContentInterpreterRemoteAPI:
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:
20
- raise NotImplementedError
@@ -1,6 +0,0 @@
1
- from agi_med_common.models import ChatItem
2
-
3
-
4
- class CriticAPI:
5
- def evaluate(self, text: str, chat: ChatItem | None = None, request_id: str = "") -> float:
6
- raise NotImplementedError
@@ -1,6 +0,0 @@
1
- from agi_med_common.models import ChatItem
2
-
3
-
4
- class TextGeneratorAPI:
5
- def process(self, chat: ChatItem, request_id: str = "") -> str:
6
- raise NotImplementedError
@@ -1,6 +0,0 @@
1
- from agi_med_common import ChatItem
2
-
3
-
4
- class TextProcessorAPI:
5
- def process(self, text: str, chat: ChatItem | None = None, request_id: str = "") -> str:
6
- raise NotImplementedError