agi-med-common 4.2.15__tar.gz → 4.2.18__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-4.2.15 → agi_med_common-4.2.18}/PKG-INFO +1 -1
- {agi_med_common-4.2.15 → agi_med_common-4.2.18}/src/agi_med_common/__init__.py +1 -1
- {agi_med_common-4.2.15 → agi_med_common-4.2.18}/src/agi_med_common/models/chat_item.py +5 -2
- {agi_med_common-4.2.15 → agi_med_common-4.2.18}/src/agi_med_common/utils.py +7 -1
- {agi_med_common-4.2.15 → agi_med_common-4.2.18}/src/agi_med_common.egg-info/PKG-INFO +1 -1
- {agi_med_common-4.2.15 → agi_med_common-4.2.18}/README.md +0 -0
- {agi_med_common-4.2.15 → agi_med_common-4.2.18}/pyproject.toml +0 -0
- {agi_med_common-4.2.15 → agi_med_common-4.2.18}/requirements.txt +0 -0
- {agi_med_common-4.2.15 → agi_med_common-4.2.18}/setup.cfg +0 -0
- {agi_med_common-4.2.15 → agi_med_common-4.2.18}/src/agi_med_common/file_storage.py +0 -0
- {agi_med_common-4.2.15 → agi_med_common-4.2.18}/src/agi_med_common/logger/__init__.py +0 -0
- {agi_med_common-4.2.15 → agi_med_common-4.2.18}/src/agi_med_common/logger/log_level_enum.py +0 -0
- {agi_med_common-4.2.15 → agi_med_common-4.2.18}/src/agi_med_common/logger/logger.py +0 -0
- {agi_med_common-4.2.15 → agi_med_common-4.2.18}/src/agi_med_common/models/__init__.py +0 -0
- {agi_med_common-4.2.15 → agi_med_common-4.2.18}/src/agi_med_common/models/_base.py +0 -0
- {agi_med_common-4.2.15 → agi_med_common-4.2.18}/src/agi_med_common/models/base_config_models/__init__.py +0 -0
- {agi_med_common-4.2.15 → agi_med_common-4.2.18}/src/agi_med_common/models/base_config_models/gigachat_config.py +0 -0
- {agi_med_common-4.2.15 → agi_med_common-4.2.18}/src/agi_med_common/models/enums.py +0 -0
- {agi_med_common-4.2.15 → agi_med_common-4.2.18}/src/agi_med_common/models/widget.py +0 -0
- {agi_med_common-4.2.15 → agi_med_common-4.2.18}/src/agi_med_common/parallel_map.py +0 -0
- {agi_med_common-4.2.15 → agi_med_common-4.2.18}/src/agi_med_common/validators.py +0 -0
- {agi_med_common-4.2.15 → agi_med_common-4.2.18}/src/agi_med_common/xml_parser.py +0 -0
- {agi_med_common-4.2.15 → agi_med_common-4.2.18}/src/agi_med_common.egg-info/SOURCES.txt +0 -0
- {agi_med_common-4.2.15 → agi_med_common-4.2.18}/src/agi_med_common.egg-info/dependency_links.txt +0 -0
- {agi_med_common-4.2.15 → agi_med_common-4.2.18}/src/agi_med_common.egg-info/requires.txt +0 -0
- {agi_med_common-4.2.15 → agi_med_common-4.2.18}/src/agi_med_common.egg-info/top_level.txt +0 -0
@@ -60,8 +60,8 @@ class ReplicaItem(_Base):
|
|
60
60
|
examples=[_EXAMPLE_DATETIME],
|
61
61
|
description=f"Format: {_DATETIME_FORMAT}",
|
62
62
|
)
|
63
|
-
state: str = Field("
|
64
|
-
action: str = Field("
|
63
|
+
state: str = Field("", alias="State", description="chat manager fsm state", examples=["COLLECTION"])
|
64
|
+
action: str = Field("", alias="Action", description="chat manager fsm action", examples=["DIAGNOSIS"])
|
65
65
|
moderation: ModerationLabelEnum = Field(
|
66
66
|
ModerationLabelEnum.OK,
|
67
67
|
alias="Moderation",
|
@@ -108,6 +108,9 @@ class ChatItem(_Base):
|
|
108
108
|
def to_dict(self) -> dict[str, Any]:
|
109
109
|
return self.model_dump(by_alias=True)
|
110
110
|
|
111
|
+
def add_replica(self, replica: ReplicaItem):
|
112
|
+
self.inner_context.replicas.append(replica)
|
113
|
+
|
111
114
|
def update(self, replica_pair: ReplicaItemPair) -> None:
|
112
115
|
self.inner_context.replicas.append(replica_pair.user_replica)
|
113
116
|
self.inner_context.replicas.append(replica_pair.bot_replica)
|
@@ -33,7 +33,13 @@ def try_parse_json(text: str | None) -> str | None:
|
|
33
33
|
def try_parse_int(text: str) -> int | None:
|
34
34
|
try:
|
35
35
|
return int(text)
|
36
|
-
except ValueError:
|
36
|
+
except (ValueError, TypeError):
|
37
|
+
return None
|
38
|
+
|
39
|
+
def try_parse_float(text: str) -> float | None:
|
40
|
+
try:
|
41
|
+
return float(text)
|
42
|
+
except (ValueError, TypeError):
|
37
43
|
return None
|
38
44
|
|
39
45
|
def pretty_line(text: str, cut_count: int = 100) -> str:
|
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
|
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-4.2.15 → agi_med_common-4.2.18}/src/agi_med_common.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|