agi-med-common 5.1.3__tar.gz → 5.1.4__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-5.1.3 → agi_med_common-5.1.4}/PKG-INFO +1 -1
- {agi_med_common-5.1.3 → agi_med_common-5.1.4}/src/agi_med_common/__init__.py +1 -1
- {agi_med_common-5.1.3 → agi_med_common-5.1.4}/src/agi_med_common/models/__init__.py +1 -1
- {agi_med_common-5.1.3 → agi_med_common-5.1.4}/src/agi_med_common/models/chat.py +4 -4
- {agi_med_common-5.1.3 → agi_med_common-5.1.4}/src/agi_med_common/models/chat_item.py +5 -5
- {agi_med_common-5.1.3 → agi_med_common-5.1.4}/src/agi_med_common/models/tracks.py +3 -3
- {agi_med_common-5.1.3 → agi_med_common-5.1.4}/src/agi_med_common.egg-info/PKG-INFO +1 -1
- {agi_med_common-5.1.3 → agi_med_common-5.1.4}/src/agi_med_common.egg-info/SOURCES.txt +0 -1
- agi_med_common-5.1.3/src/agi_med_common/models/_base.py +0 -5
- {agi_med_common-5.1.3 → agi_med_common-5.1.4}/README.md +0 -0
- {agi_med_common-5.1.3 → agi_med_common-5.1.4}/pyproject.toml +0 -0
- {agi_med_common-5.1.3 → agi_med_common-5.1.4}/setup.cfg +0 -0
- {agi_med_common-5.1.3 → agi_med_common-5.1.4}/src/agi_med_common/api.py +0 -0
- {agi_med_common-5.1.3 → agi_med_common-5.1.4}/src/agi_med_common/file_storage.py +0 -0
- {agi_med_common-5.1.3 → agi_med_common-5.1.4}/src/agi_med_common/models/base_config_models/__init__.py +0 -0
- {agi_med_common-5.1.3 → agi_med_common-5.1.4}/src/agi_med_common/models/base_config_models/gigachat_config.py +0 -0
- {agi_med_common-5.1.3 → agi_med_common-5.1.4}/src/agi_med_common/models/enums.py +0 -0
- {agi_med_common-5.1.3 → agi_med_common-5.1.4}/src/agi_med_common/models/widget.py +0 -0
- {agi_med_common-5.1.3 → agi_med_common-5.1.4}/src/agi_med_common/parallel_map.py +0 -0
- {agi_med_common-5.1.3 → agi_med_common-5.1.4}/src/agi_med_common/type_union.py +0 -0
- {agi_med_common-5.1.3 → agi_med_common-5.1.4}/src/agi_med_common/utils.py +0 -0
- {agi_med_common-5.1.3 → agi_med_common-5.1.4}/src/agi_med_common/validators.py +0 -0
- {agi_med_common-5.1.3 → agi_med_common-5.1.4}/src/agi_med_common/xml_parser.py +0 -0
- {agi_med_common-5.1.3 → agi_med_common-5.1.4}/src/agi_med_common.egg-info/dependency_links.txt +0 -0
- {agi_med_common-5.1.3 → agi_med_common-5.1.4}/src/agi_med_common.egg-info/requires.txt +0 -0
- {agi_med_common-5.1.3 → agi_med_common-5.1.4}/src/agi_med_common.egg-info/top_level.txt +0 -0
@@ -9,7 +9,7 @@ from agi_med_common.type_union import TypeUnion
|
|
9
9
|
from agi_med_common.utils import first_nonnull
|
10
10
|
from pydantic import Field, ValidationError
|
11
11
|
|
12
|
-
from .
|
12
|
+
from .base import Base
|
13
13
|
|
14
14
|
|
15
15
|
_DT_FORMAT: str = "%Y-%m-%d-%H-%M-%S"
|
@@ -24,7 +24,7 @@ def now_pretty() -> str:
|
|
24
24
|
return datetime.now().strftime(_DT_FORMAT)
|
25
25
|
|
26
26
|
|
27
|
-
class Context(
|
27
|
+
class Context(Base):
|
28
28
|
client_id: str = Field("", examples=["543216789"])
|
29
29
|
user_id: str = Field("", examples=["123456789"])
|
30
30
|
session_id: str = Field("", examples=["987654321"])
|
@@ -115,7 +115,7 @@ def _get_widget(obj: Content) -> Widget | None:
|
|
115
115
|
# todo fix: generalize functions _get_field
|
116
116
|
|
117
117
|
|
118
|
-
class BaseMessage(
|
118
|
+
class BaseMessage(Base):
|
119
119
|
type: str
|
120
120
|
content: Content = Field("", examples=["Привет"])
|
121
121
|
date_time: str = Field(default_factory=now_pretty, examples=[_EXAMPLE_DT])
|
@@ -182,7 +182,7 @@ class MiscMessage(BaseMessage):
|
|
182
182
|
ChatMessage = TypeUnion[HumanMessage, AIMessage, MiscMessage]
|
183
183
|
|
184
184
|
|
185
|
-
class Chat(
|
185
|
+
class Chat(Base):
|
186
186
|
context: Context
|
187
187
|
messages: List[ChatMessage] = Field(default_factory=list)
|
188
188
|
|
@@ -4,7 +4,7 @@ from typing import Annotated, Any, List, Callable
|
|
4
4
|
from agi_med_common.models.widget import Widget
|
5
5
|
from pydantic import Field, ConfigDict, BeforeValidator, AfterValidator
|
6
6
|
|
7
|
-
from .
|
7
|
+
from .base import Base
|
8
8
|
|
9
9
|
|
10
10
|
_DT_FORMAT: str = "%Y-%m-%d-%H-%M-%S"
|
@@ -16,7 +16,7 @@ def now_pretty() -> str:
|
|
16
16
|
return datetime.now().strftime(ReplicaItem.DATETIME_FORMAT())
|
17
17
|
|
18
18
|
|
19
|
-
class OuterContextItem(
|
19
|
+
class OuterContextItem(Base):
|
20
20
|
# remove annoying warning for protected `model_` namespace
|
21
21
|
model_config = ConfigDict(protected_namespaces=())
|
22
22
|
|
@@ -63,7 +63,7 @@ def nullify_empty(text: str) -> str | None:
|
|
63
63
|
return text or None
|
64
64
|
|
65
65
|
|
66
|
-
class ReplicaItem(
|
66
|
+
class ReplicaItem(Base):
|
67
67
|
body: str = Field("", alias="Body", examples=["Привет"])
|
68
68
|
resource_id: Annotated[str | None, AfterValidator(nullify_empty)] = Field(
|
69
69
|
None, alias="ResourceId", examples=["<link-id>"]
|
@@ -105,7 +105,7 @@ class ReplicaItem(_Base):
|
|
105
105
|
return self.model_copy(update=dict(body=body_upd))
|
106
106
|
|
107
107
|
|
108
|
-
class InnerContextItem(
|
108
|
+
class InnerContextItem(Base):
|
109
109
|
replicas: list[ReplicaItem] = Field(alias="Replicas")
|
110
110
|
attrs: dict[str, str | int] | None = Field(default={}, alias="Attrs")
|
111
111
|
|
@@ -113,7 +113,7 @@ class InnerContextItem(_Base):
|
|
113
113
|
return self.model_dump(by_alias=True)
|
114
114
|
|
115
115
|
|
116
|
-
class ChatItem(
|
116
|
+
class ChatItem(Base):
|
117
117
|
outer_context: OuterContextItem = Field(alias="OuterContext")
|
118
118
|
inner_context: InnerContextItem = Field(alias="InnerContext")
|
119
119
|
|
@@ -1,14 +1,14 @@
|
|
1
1
|
from pydantic import Field
|
2
2
|
|
3
|
-
from .
|
3
|
+
from .base import Base
|
4
4
|
|
5
5
|
|
6
|
-
class TrackInfo(
|
6
|
+
class TrackInfo(Base):
|
7
7
|
track_id: str = Field(alias="TrackId")
|
8
8
|
name: str = Field(alias="Name")
|
9
9
|
domain_id: str = Field(alias="DomainId")
|
10
10
|
|
11
11
|
|
12
|
-
class DomainInfo(
|
12
|
+
class DomainInfo(Base):
|
13
13
|
domain_id: str = Field(alias="DomainId")
|
14
14
|
name: str = Field(alias="Name")
|
@@ -14,7 +14,6 @@ src/agi_med_common.egg-info/dependency_links.txt
|
|
14
14
|
src/agi_med_common.egg-info/requires.txt
|
15
15
|
src/agi_med_common.egg-info/top_level.txt
|
16
16
|
src/agi_med_common/models/__init__.py
|
17
|
-
src/agi_med_common/models/_base.py
|
18
17
|
src/agi_med_common/models/chat.py
|
19
18
|
src/agi_med_common/models/chat_item.py
|
20
19
|
src/agi_med_common/models/enums.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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{agi_med_common-5.1.3 → agi_med_common-5.1.4}/src/agi_med_common.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|