agi-med-common 3.3.4__tar.gz → 3.5.1__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.
- {agi_med_common-3.3.4 → agi_med_common-3.5.1}/PKG-INFO +1 -1
- {agi_med_common-3.3.4 → agi_med_common-3.5.1}/src/agi_med_common/__init__.py +4 -1
- {agi_med_common-3.3.4 → agi_med_common-3.5.1}/src/agi_med_common/models/__init__.py +3 -0
- {agi_med_common-3.3.4 → agi_med_common-3.5.1}/src/agi_med_common/models/enums/__init__.py +4 -0
- agi_med_common-3.5.1/src/agi_med_common/models/enums/diagnostics_xml_tag_enum.py +11 -0
- agi_med_common-3.5.1/src/agi_med_common/models/enums/doctor_choice_xml_tag_enum.py +11 -0
- agi_med_common-3.5.1/src/agi_med_common/models/enums/mtrs_xml_tag_enum.py +11 -0
- {agi_med_common-3.3.4 → agi_med_common-3.5.1}/src/agi_med_common/xml_parser.py +3 -2
- {agi_med_common-3.3.4 → agi_med_common-3.5.1}/src/agi_med_common.egg-info/PKG-INFO +1 -1
- {agi_med_common-3.3.4 → agi_med_common-3.5.1}/src/agi_med_common.egg-info/SOURCES.txt +3 -0
- {agi_med_common-3.3.4 → agi_med_common-3.5.1}/README.md +0 -0
- {agi_med_common-3.3.4 → agi_med_common-3.5.1}/pyproject.toml +0 -0
- {agi_med_common-3.3.4 → agi_med_common-3.5.1}/requirements.txt +0 -0
- {agi_med_common-3.3.4 → agi_med_common-3.5.1}/setup.cfg +0 -0
- {agi_med_common-3.3.4 → agi_med_common-3.5.1}/src/agi_med_common/logger/__init__.py +0 -0
- {agi_med_common-3.3.4 → agi_med_common-3.5.1}/src/agi_med_common/logger/log_level_enum.py +0 -0
- {agi_med_common-3.3.4 → agi_med_common-3.5.1}/src/agi_med_common/logger/logger.py +0 -0
- {agi_med_common-3.3.4 → agi_med_common-3.5.1}/src/agi_med_common/models/_base.py +0 -0
- {agi_med_common-3.3.4 → agi_med_common-3.5.1}/src/agi_med_common/models/base_config_models/__init__.py +0 -0
- {agi_med_common-3.3.4 → agi_med_common-3.5.1}/src/agi_med_common/models/base_config_models/gigachat_config.py +0 -0
- {agi_med_common-3.3.4 → agi_med_common-3.5.1}/src/agi_med_common/models/chat_item/__init__.py +0 -0
- {agi_med_common-3.3.4 → agi_med_common-3.5.1}/src/agi_med_common/models/chat_item/chat_item.py +0 -0
- {agi_med_common-3.3.4 → agi_med_common-3.5.1}/src/agi_med_common/models/chat_item/inner_context_item.py +0 -0
- {agi_med_common-3.3.4 → agi_med_common-3.5.1}/src/agi_med_common/models/chat_item/outer_context_item.py +0 -0
- {agi_med_common-3.3.4 → agi_med_common-3.5.1}/src/agi_med_common/models/chat_item/replica_item.py +0 -0
- {agi_med_common-3.3.4 → agi_med_common-3.5.1}/src/agi_med_common/models/enums/action_enum.py +0 -0
- {agi_med_common-3.3.4 → agi_med_common-3.5.1}/src/agi_med_common/models/enums/moderation_label_enum.py +0 -0
- {agi_med_common-3.3.4 → agi_med_common-3.5.1}/src/agi_med_common/models/enums/mtrs_label_enum.py +0 -0
- {agi_med_common-3.3.4 → agi_med_common-3.5.1}/src/agi_med_common/models/enums/state_enum.py +0 -0
- {agi_med_common-3.3.4 → agi_med_common-3.5.1}/src/agi_med_common/models/enums/track_id_enum.py +0 -0
- {agi_med_common-3.3.4 → agi_med_common-3.5.1}/src/agi_med_common/utils.py +0 -0
- {agi_med_common-3.3.4 → agi_med_common-3.5.1}/src/agi_med_common/validators.py +0 -0
- {agi_med_common-3.3.4 → agi_med_common-3.5.1}/src/agi_med_common.egg-info/dependency_links.txt +0 -0
- {agi_med_common-3.3.4 → agi_med_common-3.5.1}/src/agi_med_common.egg-info/requires.txt +0 -0
- {agi_med_common-3.3.4 → agi_med_common-3.5.1}/src/agi_med_common.egg-info/top_level.txt +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
__version__ = "3.
|
1
|
+
__version__ = "3.5.1"
|
2
2
|
|
3
3
|
from .logger import LogLevelEnum, logger_init
|
4
4
|
from .models import (
|
@@ -13,6 +13,9 @@ from .models import (
|
|
13
13
|
ReplicaItem,
|
14
14
|
ReplicaItemPair,
|
15
15
|
)
|
16
|
+
|
17
|
+
from .models import DiagnosticsXMLTagEnum, MTRSXMLTagEnum, DoctorChoiceXMLTagEnum
|
18
|
+
|
16
19
|
from .utils import make_session_id, read_json, replace_n
|
17
20
|
from .validators import is_file_exist, validate_prompt
|
18
21
|
from .xml_parser import XMLParser
|
@@ -1,4 +1,7 @@
|
|
1
1
|
from ._base import _Base
|
2
|
+
|
2
3
|
from .enums import TrackIdEnum, StateEnum, MTRSLabelEnum, ActionEnum, ModerationLabelEnum
|
4
|
+
from .enums import DiagnosticsXMLTagEnum, MTRSXMLTagEnum, DoctorChoiceXMLTagEnum
|
5
|
+
|
3
6
|
from .chat_item import ChatItem, OuterContextItem, InnerContextItem, ReplicaItem, ReplicaItemPair
|
4
7
|
from .base_config_models import GigaChatConfig
|
@@ -3,3 +3,7 @@ from .state_enum import StateEnum
|
|
3
3
|
from .mtrs_label_enum import MTRSLabelEnum
|
4
4
|
from .action_enum import ActionEnum
|
5
5
|
from .moderation_label_enum import ModerationLabelEnum
|
6
|
+
|
7
|
+
from .diagnostics_xml_tag_enum import DiagnosticsXMLTagEnum
|
8
|
+
from .mtrs_xml_tag_enum import MTRSXMLTagEnum
|
9
|
+
from .doctor_choice_xml_tag_enum import DoctorChoiceXMLTagEnum
|
@@ -0,0 +1,11 @@
|
|
1
|
+
from enum import StrEnum, auto
|
2
|
+
|
3
|
+
|
4
|
+
class DiagnosticsXMLTagEnum(StrEnum):
|
5
|
+
@staticmethod
|
6
|
+
def _generate_next_value_(name: str, start: int, count: int, last_values: list[str]) -> str:
|
7
|
+
return f"diag_{name.lower()}"
|
8
|
+
|
9
|
+
DIAG = auto()
|
10
|
+
DOC = auto()
|
11
|
+
DESC = auto()
|
@@ -0,0 +1,11 @@
|
|
1
|
+
from enum import StrEnum, auto
|
2
|
+
|
3
|
+
|
4
|
+
class DoctorChoiceXMLTagEnum(StrEnum):
|
5
|
+
@staticmethod
|
6
|
+
def _generate_next_value_(name: str, start: int, count: int, last_values: list[str]) -> str:
|
7
|
+
return f"{name.lower()}"
|
8
|
+
|
9
|
+
DIAGNOSTICS = auto()
|
10
|
+
SUMMARIZATION = auto()
|
11
|
+
MTRS = auto()
|
@@ -0,0 +1,11 @@
|
|
1
|
+
from enum import StrEnum, auto
|
2
|
+
|
3
|
+
|
4
|
+
class MTRSXMLTagEnum(StrEnum):
|
5
|
+
@staticmethod
|
6
|
+
def _generate_next_value_(name: str, start: int, count: int, last_values: list[str]) -> str:
|
7
|
+
return f"mtrs_{name.lower()}"
|
8
|
+
|
9
|
+
NAME = auto()
|
10
|
+
LABEL = auto()
|
11
|
+
DESC = auto()
|
@@ -1,9 +1,10 @@
|
|
1
1
|
import re
|
2
|
+
from enum import StrEnum
|
2
3
|
|
3
4
|
|
4
5
|
class XMLParser:
|
5
6
|
@staticmethod
|
6
|
-
def make_xml(body: str, tag: str) -> str:
|
7
|
+
def make_xml(body: str, tag: str | StrEnum) -> str:
|
7
8
|
return f"<{tag}>{body}</{tag}>"
|
8
9
|
|
9
10
|
@staticmethod
|
@@ -12,6 +13,6 @@ class XMLParser:
|
|
12
13
|
return re.sub(re_xml, "", text).replace(" ", " ").strip()
|
13
14
|
|
14
15
|
@staticmethod
|
15
|
-
def get_tag_list(response: str, tag: str) -> list[str]:
|
16
|
+
def get_tag_list(response: str, tag: str | StrEnum) -> list[str]:
|
16
17
|
tag_content = re.findall(f"<{tag}>(.*?)</{tag}>", response, re.DOTALL)
|
17
18
|
return [content.lower().strip() for content in tag_content]
|
@@ -24,7 +24,10 @@ src/agi_med_common/models/chat_item/outer_context_item.py
|
|
24
24
|
src/agi_med_common/models/chat_item/replica_item.py
|
25
25
|
src/agi_med_common/models/enums/__init__.py
|
26
26
|
src/agi_med_common/models/enums/action_enum.py
|
27
|
+
src/agi_med_common/models/enums/diagnostics_xml_tag_enum.py
|
28
|
+
src/agi_med_common/models/enums/doctor_choice_xml_tag_enum.py
|
27
29
|
src/agi_med_common/models/enums/moderation_label_enum.py
|
28
30
|
src/agi_med_common/models/enums/mtrs_label_enum.py
|
31
|
+
src/agi_med_common/models/enums/mtrs_xml_tag_enum.py
|
29
32
|
src/agi_med_common/models/enums/state_enum.py
|
30
33
|
src/agi_med_common/models/enums/track_id_enum.py
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{agi_med_common-3.3.4 → agi_med_common-3.5.1}/src/agi_med_common/models/chat_item/__init__.py
RENAMED
File without changes
|
{agi_med_common-3.3.4 → agi_med_common-3.5.1}/src/agi_med_common/models/chat_item/chat_item.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{agi_med_common-3.3.4 → agi_med_common-3.5.1}/src/agi_med_common/models/chat_item/replica_item.py
RENAMED
File without changes
|
{agi_med_common-3.3.4 → agi_med_common-3.5.1}/src/agi_med_common/models/enums/action_enum.py
RENAMED
File without changes
|
File without changes
|
{agi_med_common-3.3.4 → agi_med_common-3.5.1}/src/agi_med_common/models/enums/mtrs_label_enum.py
RENAMED
File without changes
|
File without changes
|
{agi_med_common-3.3.4 → agi_med_common-3.5.1}/src/agi_med_common/models/enums/track_id_enum.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{agi_med_common-3.3.4 → agi_med_common-3.5.1}/src/agi_med_common.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|