agi-med-common 1.5.0__tar.gz → 2.0.0__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-1.5.0 → agi_med_common-2.0.0}/PKG-INFO +2 -2
  2. {agi_med_common-1.5.0 → agi_med_common-2.0.0}/src/agi_med_common/__init__.py +1 -1
  3. agi_med_common-2.0.0/src/agi_med_common/models/chat_item/replica_item.py +31 -0
  4. {agi_med_common-1.5.0 → agi_med_common-2.0.0}/src/agi_med_common/models/enums/states_enum.py +13 -5
  5. {agi_med_common-1.5.0 → agi_med_common-2.0.0}/src/agi_med_common.egg-info/PKG-INFO +2 -2
  6. agi_med_common-1.5.0/src/agi_med_common/models/chat_item/replica_item.py +0 -10
  7. {agi_med_common-1.5.0 → agi_med_common-2.0.0}/README.md +0 -0
  8. {agi_med_common-1.5.0 → agi_med_common-2.0.0}/pyproject.toml +0 -0
  9. {agi_med_common-1.5.0 → agi_med_common-2.0.0}/requirements.txt +0 -0
  10. {agi_med_common-1.5.0 → agi_med_common-2.0.0}/setup.cfg +0 -0
  11. {agi_med_common-1.5.0 → agi_med_common-2.0.0}/src/agi_med_common/logger/__init__.py +0 -0
  12. {agi_med_common-1.5.0 → agi_med_common-2.0.0}/src/agi_med_common/logger/log_level_enum.py +0 -0
  13. {agi_med_common-1.5.0 → agi_med_common-2.0.0}/src/agi_med_common/logger/logger.py +0 -0
  14. {agi_med_common-1.5.0 → agi_med_common-2.0.0}/src/agi_med_common/models/__init__.py +0 -0
  15. {agi_med_common-1.5.0 → agi_med_common-2.0.0}/src/agi_med_common/models/_base.py +0 -0
  16. {agi_med_common-1.5.0 → agi_med_common-2.0.0}/src/agi_med_common/models/base_config_models/__init__.py +0 -0
  17. {agi_med_common-1.5.0 → agi_med_common-2.0.0}/src/agi_med_common/models/base_config_models/gigachat_config.py +0 -0
  18. {agi_med_common-1.5.0 → agi_med_common-2.0.0}/src/agi_med_common/models/chat_item/__init__.py +0 -0
  19. {agi_med_common-1.5.0 → agi_med_common-2.0.0}/src/agi_med_common/models/chat_item/chat_item.py +0 -0
  20. {agi_med_common-1.5.0 → agi_med_common-2.0.0}/src/agi_med_common/models/chat_item/inner_context_item.py +0 -0
  21. {agi_med_common-1.5.0 → agi_med_common-2.0.0}/src/agi_med_common/models/chat_item/outer_context_item.py +0 -0
  22. {agi_med_common-1.5.0 → agi_med_common-2.0.0}/src/agi_med_common/models/chat_item_with_state/__init__.py +0 -0
  23. {agi_med_common-1.5.0 → agi_med_common-2.0.0}/src/agi_med_common/models/chat_item_with_state/chat_with_state.py +0 -0
  24. {agi_med_common-1.5.0 → agi_med_common-2.0.0}/src/agi_med_common/models/chat_item_with_state/inner_context_with_state.py +0 -0
  25. {agi_med_common-1.5.0 → agi_med_common-2.0.0}/src/agi_med_common/models/chat_item_with_state/replica_with_state.py +0 -0
  26. {agi_med_common-1.5.0 → agi_med_common-2.0.0}/src/agi_med_common/models/enums/__init__.py +0 -0
  27. {agi_med_common-1.5.0 → agi_med_common-2.0.0}/src/agi_med_common/models/enums/track_id_enum.py +0 -0
  28. {agi_med_common-1.5.0 → agi_med_common-2.0.0}/src/agi_med_common/utils.py +0 -0
  29. {agi_med_common-1.5.0 → agi_med_common-2.0.0}/src/agi_med_common/validators.py +0 -0
  30. {agi_med_common-1.5.0 → agi_med_common-2.0.0}/src/agi_med_common.egg-info/SOURCES.txt +0 -0
  31. {agi_med_common-1.5.0 → agi_med_common-2.0.0}/src/agi_med_common.egg-info/dependency_links.txt +0 -0
  32. {agi_med_common-1.5.0 → agi_med_common-2.0.0}/src/agi_med_common.egg-info/requires.txt +0 -0
  33. {agi_med_common-1.5.0 → agi_med_common-2.0.0}/src/agi_med_common.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: agi_med_common
3
- Version: 1.5.0
3
+ Version: 2.0.0
4
4
  Summary: Сommon for agi-med team
5
5
  Author: AGI-MED-TEAM
6
6
  Requires-Python: >=3.13
@@ -1,4 +1,4 @@
1
- __version__ = "1.5.0"
1
+ __version__ = "2.0.0"
2
2
 
3
3
  from .logger import LogLevelEnum, logger_init
4
4
  from .models import (
@@ -0,0 +1,31 @@
1
+ from datetime import datetime
2
+
3
+ from pydantic import Field, field_validator, field_serializer
4
+
5
+ from .. import _Base
6
+
7
+ _TIME_FORMAT: str = "%Y-%m-%d-%H-%M-%S"
8
+ _EXAMPLE_DATETIME: datetime = datetime(1970, 1, 1, 0, 0, 0)
9
+
10
+
11
+ class ReplicaItem(_Base):
12
+ body: str = Field("", alias="Body", examples=["Привет"])
13
+ role: bool = Field(False, alias="Role", description="True = ai, False = client", examples=[False])
14
+ date_time: datetime = Field(
15
+ _EXAMPLE_DATETIME,
16
+ alias="DateTime",
17
+ examples=[_EXAMPLE_DATETIME.strftime(_TIME_FORMAT)],
18
+ description=f"Format: {_TIME_FORMAT}",
19
+ )
20
+ previous_score: float | None = Field(None, alias="PreviousScore", exclude=True, deprecated=True)
21
+
22
+ @field_validator("date_time", mode="before")
23
+ @classmethod
24
+ def convert_date_time(cls, timestamp: str | datetime) -> datetime:
25
+ if isinstance(timestamp, datetime):
26
+ return timestamp
27
+ return datetime.strptime(timestamp, _TIME_FORMAT)
28
+
29
+ @field_serializer("date_time")
30
+ def serialize_date_time(self, timestamp: datetime) -> str:
31
+ return timestamp.strftime(_TIME_FORMAT)
@@ -8,14 +8,22 @@ class StatesEnum(StrEnum):
8
8
 
9
9
  BEGIN = auto()
10
10
  START = auto()
11
- NOT_MEDICAL = auto()
11
+
12
12
  IS_CHILD = auto()
13
13
  IS_ABSURD = auto()
14
14
  CRITICAL = auto()
15
15
  WHAT_COMPLAINTS = auto()
16
- ANALYSIS_CONSULTATION = auto()
17
- COMMON_CONSULTATION = auto()
16
+ NOT_MEDICAL = auto()
17
+
18
+ ERROR_STATE = auto()
19
+
20
+ CONSULTATION_TRANSIT = auto()
21
+ NOT_MEDICAL_DOC = auto()
22
+ CONSULTATION = auto()
23
+
18
24
  INFO_COLLECTION = auto()
19
25
  MAKE_DIAGNOSIS = auto()
20
- COMMENT_DIAGNOSIS = auto()
21
- EXIT_INNER_CYCLE = auto()
26
+
27
+ SUMMARIZATION = auto()
28
+
29
+ ANALYSIS_CONSULTATION = auto()
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: agi_med_common
3
- Version: 1.5.0
3
+ Version: 2.0.0
4
4
  Summary: Сommon for agi-med team
5
5
  Author: AGI-MED-TEAM
6
6
  Requires-Python: >=3.13
@@ -1,10 +0,0 @@
1
- from pydantic import Field
2
-
3
- from .. import _Base
4
-
5
-
6
- class ReplicaItem(_Base):
7
- body: str = Field("", alias="Body", examples=["Привет"])
8
- role: bool = Field(False, alias="Role", description="True = ai, False = client", examples=[False])
9
- date_time: str = Field("1970-01-01-00-00-00", alias="DateTime", examples=["2024-12-10-18-03-46"])
10
- previous_score: float | None = Field(None, alias="PreviousScore", exclude=True, deprecated=True)
File without changes
File without changes