uncertainty-engine-types 0.0.9__py3-none-any.whl → 0.0.10__py3-none-any.whl

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.
@@ -1,6 +1,6 @@
1
1
  from . import utils
2
+ from .chat_history import ChatHistory
2
3
  from .context import Context
3
- from .conversation import Conversation
4
4
  from .dataset import CSVDataset
5
5
  from .embeddings import TextEmbeddingsConfig, TextEmbeddingsProvider
6
6
  from .execution_error import ExecutionError
@@ -32,8 +32,8 @@ from .version import __version__
32
32
 
33
33
  __all__ = [
34
34
  "__version__",
35
+ "ChatHistory",
35
36
  "Context",
36
- "Conversation",
37
37
  "CSVDataset",
38
38
  "Document",
39
39
  "ExecutionError",
@@ -3,5 +3,5 @@ from pydantic import BaseModel
3
3
  from .message import Message
4
4
 
5
5
 
6
- class Conversation(BaseModel):
6
+ class ChatHistory(BaseModel):
7
7
  messages: list[Message]
@@ -1,30 +1,10 @@
1
1
  from datetime import datetime
2
- from typing import Dict, Literal, Sequence, Union
2
+ from typing import Literal
3
3
 
4
- from pydantic import BaseModel, model_validator
5
-
6
-
7
- Value = Union[str, float, int]
8
- StructuredOutput = Dict[str, Union[Value, Sequence[Value], Dict[str, Value]]]
4
+ from pydantic import BaseModel
9
5
 
10
6
 
11
7
  class Message(BaseModel):
12
8
  role: Literal["instruction", "user", "engine"]
13
- content: Union[str, StructuredOutput]
9
+ content: str
14
10
  timestamp: datetime
15
-
16
- @model_validator(mode="before")
17
- @classmethod
18
- def validate(cls, values: Dict) -> Dict:
19
- role = values.get("role")
20
- content = values.get("content")
21
-
22
- if role in ["instruction", "user"]:
23
- if not isinstance(content, str):
24
- raise ValueError(f"Content must be a string when role is {role}")
25
- elif role == "engine":
26
- if not isinstance(content, StructuredOutput):
27
- raise ValueError(
28
- "Content must be a structured output when role is engine"
29
- )
30
- return values
@@ -1 +1 @@
1
- __version__ = "0.0.9"
1
+ __version__ = "0.0.10"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: uncertainty-engine-types
3
- Version: 0.0.9
3
+ Version: 0.0.10
4
4
  Summary: Common type definitions for the Uncertainty Engine
5
5
  Author: Freddy Wordingham
6
6
  Author-email: freddy@digilab.ai
@@ -1,6 +1,6 @@
1
- uncertainty_engine_types/__init__.py,sha256=G8H0XonAfxXoXlgeQK7FsxuMRgXosOZfm-jp6P5aHu0,1656
1
+ uncertainty_engine_types/__init__.py,sha256=HYCR2VJzvv-F4EJJ_5AoMwJIt5WTK2k3VIandPGYWVI,1654
2
+ uncertainty_engine_types/chat_history.py,sha256=OY1fZXP7_AtPKEmgjxh60PlbEGtQWJWafZMgs2Ec0BU,121
2
3
  uncertainty_engine_types/context.py,sha256=k9rlArn-L2x1P5vWy5khfuqJW5tJOqr3NlhubZCbyG4,209
3
- uncertainty_engine_types/conversation.py,sha256=uDHTr4uPzjkcflhyFAanfiQ1KbEIs4C9jogrwzOEt_s,122
4
4
  uncertainty_engine_types/dataset.py,sha256=sDpQu5X3KxJ1lNkZOwhppJ2SY0Cv19cbcYfGpp_hyUQ,75
5
5
  uncertainty_engine_types/embeddings.py,sha256=PmbaT7A7IuQ1UbGVNIg4usNnDbEgWiXM87gQPOeaff8,954
6
6
  uncertainty_engine_types/execution_error.py,sha256=tvIBuZPM8UhFUERHCEqoW8blAYYuBq1ZqidO0i_BCGs,105
@@ -9,7 +9,7 @@ uncertainty_engine_types/graph.py,sha256=ii2YT2jxoRB7UhcceI2k_ArKmlUXEwBCRBpsEUj
9
9
  uncertainty_engine_types/handle.py,sha256=buX_xEdBwT7vZRs5uCEPB6VCbSWIFbCE-NYIL4fZSjg,942
10
10
  uncertainty_engine_types/job.py,sha256=eYDe-MW4s-kXGL1Ke1VxdwoduW66orJAa0L1XwGdYi0,347
11
11
  uncertainty_engine_types/llm.py,sha256=kuhTlkTIgE8oIYLofr7MOcz6S5qiN0w5FxfNcT05-E4,910
12
- uncertainty_engine_types/message.py,sha256=KncFJQHL_ko8nfOuso_eh7i2gB0y4nXI6gBW9U8lAEY,971
12
+ uncertainty_engine_types/message.py,sha256=5IY-S6Ipt6oYmnVSkRVv3QLSH-lKQvpxp_qF5YGSbok,209
13
13
  uncertainty_engine_types/model.py,sha256=O9E_7DE9AKEc1o2VnhpUyl3Quh4sGdV43gqDJwk-y68,196
14
14
  uncertainty_engine_types/node_info.py,sha256=2p87fCdX_CrdT2ZODtGJ-mR1Mvg46WhaE1GMddaEVak,800
15
15
  uncertainty_engine_types/sensor_designer.py,sha256=hr3ek4_dRjRK0-78uaT6h8-bGUCm7Mfs6mxJSWxE64c,80
@@ -17,7 +17,7 @@ uncertainty_engine_types/sql.py,sha256=SBzmgMEZ-sa-OBRoZbmKiOqddop4zJixgxx-JCus9
17
17
  uncertainty_engine_types/token.py,sha256=4tQQkvl-zsYoVk8ZEx0cB2JiU0VDRJ6uUe76XBXEpBY,178
18
18
  uncertainty_engine_types/utils.py,sha256=72QVig8Kb5uIR-e1nofm-3x9CouebdQJIruDbq-aIn0,271
19
19
  uncertainty_engine_types/vector_store.py,sha256=9fYPJ04jWcy2DruyUSjiKQAgmqq-wgeAi5dBIrAOm30,392
20
- uncertainty_engine_types/version.py,sha256=46Yjk3fz9o8aTN8E95McnzpJcjGzVJmHmQqUZ5mXzfc,22
21
- uncertainty_engine_types-0.0.9.dist-info/METADATA,sha256=nAO5QC9gAFMHlvPhlPUR5jGij0OSIYic8VZ7R5eiITA,2815
22
- uncertainty_engine_types-0.0.9.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
23
- uncertainty_engine_types-0.0.9.dist-info/RECORD,,
20
+ uncertainty_engine_types/version.py,sha256=-nNlMKS9nph3FR78_ZG9RGKrbxseeNp2K6nMr0pVGaU,23
21
+ uncertainty_engine_types-0.0.10.dist-info/METADATA,sha256=YKiP4rjDbXahzA9ulm2B532Tp7XwD5Vl4FyDrYn9vhU,2816
22
+ uncertainty_engine_types-0.0.10.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
23
+ uncertainty_engine_types-0.0.10.dist-info/RECORD,,