uncertainty-engine-types 0.0.8__tar.gz → 0.0.10__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.
- {uncertainty_engine_types-0.0.8 → uncertainty_engine_types-0.0.10}/PKG-INFO +1 -1
- {uncertainty_engine_types-0.0.8 → uncertainty_engine_types-0.0.10}/pyproject.toml +1 -1
- {uncertainty_engine_types-0.0.8 → uncertainty_engine_types-0.0.10}/uncertainty_engine_types/__init__.py +8 -4
- uncertainty_engine_types-0.0.8/uncertainty_engine_types/conversation.py → uncertainty_engine_types-0.0.10/uncertainty_engine_types/chat_history.py +1 -1
- uncertainty_engine_types-0.0.10/uncertainty_engine_types/dataset.py +5 -0
- uncertainty_engine_types-0.0.10/uncertainty_engine_types/embeddings.py +32 -0
- uncertainty_engine_types-0.0.10/uncertainty_engine_types/llm.py +31 -0
- uncertainty_engine_types-0.0.10/uncertainty_engine_types/message.py +10 -0
- uncertainty_engine_types-0.0.10/uncertainty_engine_types/version.py +1 -0
- uncertainty_engine_types-0.0.8/uncertainty_engine_types/llm.py +0 -21
- uncertainty_engine_types-0.0.8/uncertainty_engine_types/message.py +0 -30
- uncertainty_engine_types-0.0.8/uncertainty_engine_types/version.py +0 -1
- {uncertainty_engine_types-0.0.8 → uncertainty_engine_types-0.0.10}/README.md +0 -0
- {uncertainty_engine_types-0.0.8 → uncertainty_engine_types-0.0.10}/uncertainty_engine_types/context.py +0 -0
- {uncertainty_engine_types-0.0.8 → uncertainty_engine_types-0.0.10}/uncertainty_engine_types/execution_error.py +0 -0
- {uncertainty_engine_types-0.0.8 → uncertainty_engine_types-0.0.10}/uncertainty_engine_types/file.py +0 -0
- {uncertainty_engine_types-0.0.8 → uncertainty_engine_types-0.0.10}/uncertainty_engine_types/graph.py +0 -0
- {uncertainty_engine_types-0.0.8 → uncertainty_engine_types-0.0.10}/uncertainty_engine_types/handle.py +0 -0
- {uncertainty_engine_types-0.0.8 → uncertainty_engine_types-0.0.10}/uncertainty_engine_types/job.py +0 -0
- {uncertainty_engine_types-0.0.8 → uncertainty_engine_types-0.0.10}/uncertainty_engine_types/model.py +0 -0
- {uncertainty_engine_types-0.0.8 → uncertainty_engine_types-0.0.10}/uncertainty_engine_types/node_info.py +0 -0
- {uncertainty_engine_types-0.0.8 → uncertainty_engine_types-0.0.10}/uncertainty_engine_types/sensor_designer.py +0 -0
- {uncertainty_engine_types-0.0.8 → uncertainty_engine_types-0.0.10}/uncertainty_engine_types/sql.py +0 -0
- {uncertainty_engine_types-0.0.8 → uncertainty_engine_types-0.0.10}/uncertainty_engine_types/token.py +0 -0
- {uncertainty_engine_types-0.0.8 → uncertainty_engine_types-0.0.10}/uncertainty_engine_types/utils.py +0 -0
- {uncertainty_engine_types-0.0.8 → uncertainty_engine_types-0.0.10}/uncertainty_engine_types/vector_store.py +0 -0
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
from . import utils
|
|
2
|
+
from .chat_history import ChatHistory
|
|
2
3
|
from .context import Context
|
|
3
|
-
from .
|
|
4
|
+
from .dataset import CSVDataset
|
|
5
|
+
from .embeddings import TextEmbeddingsConfig, TextEmbeddingsProvider
|
|
4
6
|
from .execution_error import ExecutionError
|
|
5
7
|
from .file import (
|
|
8
|
+
PDF,
|
|
6
9
|
Document,
|
|
7
10
|
File,
|
|
8
11
|
FileLocation,
|
|
9
12
|
Image,
|
|
10
13
|
LocalStorage,
|
|
11
14
|
Mesh,
|
|
12
|
-
PDF,
|
|
13
15
|
S3Storage,
|
|
14
16
|
SQLTable,
|
|
15
17
|
TabularData,
|
|
@@ -28,11 +30,11 @@ from .token import Token
|
|
|
28
30
|
from .vector_store import VectorStoreConfig, VectorStoreProvider
|
|
29
31
|
from .version import __version__
|
|
30
32
|
|
|
31
|
-
|
|
32
33
|
__all__ = [
|
|
33
34
|
"__version__",
|
|
35
|
+
"ChatHistory",
|
|
34
36
|
"Context",
|
|
35
|
-
"
|
|
37
|
+
"CSVDataset",
|
|
36
38
|
"Document",
|
|
37
39
|
"ExecutionError",
|
|
38
40
|
"File",
|
|
@@ -62,6 +64,8 @@ __all__ = [
|
|
|
62
64
|
"SQLTable",
|
|
63
65
|
"TabularData",
|
|
64
66
|
"TargetHandle",
|
|
67
|
+
"TextEmbeddingsConfig",
|
|
68
|
+
"TextEmbeddingsProvider",
|
|
65
69
|
"Token",
|
|
66
70
|
"utils",
|
|
67
71
|
"VectorStoreConfig",
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
from enum import StrEnum
|
|
2
|
+
from typing import Optional
|
|
3
|
+
|
|
4
|
+
from pydantic import BaseModel, model_validator
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class TextEmbeddingsProvider(StrEnum):
|
|
8
|
+
OPENAI = "openai"
|
|
9
|
+
OLLAMA = "ollama"
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class TextEmbeddingsConfig(BaseModel):
|
|
13
|
+
"""
|
|
14
|
+
Connection configuration for text embedding models.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
provider: str
|
|
18
|
+
model: Optional[str] = None
|
|
19
|
+
ollama_url: Optional[str] = None
|
|
20
|
+
openai_api_key: Optional[str] = None
|
|
21
|
+
|
|
22
|
+
@model_validator(mode="before")
|
|
23
|
+
@classmethod
|
|
24
|
+
def check_provider(cls, values):
|
|
25
|
+
provider = values.get("provider")
|
|
26
|
+
if provider == TextEmbeddingsProvider.OLLAMA and not values.get("ollama_url"):
|
|
27
|
+
raise ValueError("ollama_url must be provided for 'ollama' provider.")
|
|
28
|
+
if provider == TextEmbeddingsProvider.OPENAI and not values.get(
|
|
29
|
+
"openai_api_key"
|
|
30
|
+
):
|
|
31
|
+
raise ValueError("openai_api_key must be provided for 'openai' provider.")
|
|
32
|
+
return values
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
from enum import StrEnum
|
|
2
|
+
from typing import Optional
|
|
3
|
+
|
|
4
|
+
from pydantic import BaseModel, model_validator
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class LLMProvider(StrEnum):
|
|
8
|
+
OPENAI = "openai"
|
|
9
|
+
OLLAMA = "ollama"
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class LLMConfig(BaseModel):
|
|
13
|
+
"""
|
|
14
|
+
Connection configuration for Language Learning Models (LLMs).
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
provider: str
|
|
18
|
+
model: str
|
|
19
|
+
temperature: float = 0.0
|
|
20
|
+
ollama_url: Optional[str] = None
|
|
21
|
+
openai_api_key: Optional[str] = None
|
|
22
|
+
|
|
23
|
+
@model_validator(mode="before")
|
|
24
|
+
@classmethod
|
|
25
|
+
def check_provider(cls, values):
|
|
26
|
+
provider = values.get("provider")
|
|
27
|
+
if provider == LLMProvider.OLLAMA and not values.get("ollama_url"):
|
|
28
|
+
raise ValueError("ollama_url must be provided for 'ollama' provider.")
|
|
29
|
+
if provider == LLMProvider.OPENAI and not values.get("openai_api_key"):
|
|
30
|
+
raise ValueError("openai_api_key must be provided for 'openai' provider.")
|
|
31
|
+
return values
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.0.10"
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
from enum import Enum
|
|
2
|
-
from typing import Optional
|
|
3
|
-
|
|
4
|
-
from pydantic import BaseModel
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
class LLMProvider(Enum):
|
|
8
|
-
OPENAI = "openai"
|
|
9
|
-
OLLAMA = "ollama"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
class LLMConfig(BaseModel):
|
|
13
|
-
"""
|
|
14
|
-
Connection configuration for Language Learning Models (LLMs).
|
|
15
|
-
"""
|
|
16
|
-
|
|
17
|
-
provider: str
|
|
18
|
-
model: str
|
|
19
|
-
temperature: float = 0.0
|
|
20
|
-
ollama_url: Optional[str] = None
|
|
21
|
-
openai_api_key: Optional[str] = None
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
from datetime import datetime
|
|
2
|
-
from typing import Dict, Literal, Sequence, Union
|
|
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]]]
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
class Message(BaseModel):
|
|
12
|
-
role: Literal["instruction", "user", "engine"]
|
|
13
|
-
content: Union[str, StructuredOutput]
|
|
14
|
-
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 +0,0 @@
|
|
|
1
|
-
__version__ = "0.0.8"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{uncertainty_engine_types-0.0.8 → uncertainty_engine_types-0.0.10}/uncertainty_engine_types/file.py
RENAMED
|
File without changes
|
{uncertainty_engine_types-0.0.8 → uncertainty_engine_types-0.0.10}/uncertainty_engine_types/graph.py
RENAMED
|
File without changes
|
|
File without changes
|
{uncertainty_engine_types-0.0.8 → uncertainty_engine_types-0.0.10}/uncertainty_engine_types/job.py
RENAMED
|
File without changes
|
{uncertainty_engine_types-0.0.8 → uncertainty_engine_types-0.0.10}/uncertainty_engine_types/model.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{uncertainty_engine_types-0.0.8 → uncertainty_engine_types-0.0.10}/uncertainty_engine_types/sql.py
RENAMED
|
File without changes
|
{uncertainty_engine_types-0.0.8 → uncertainty_engine_types-0.0.10}/uncertainty_engine_types/token.py
RENAMED
|
File without changes
|
{uncertainty_engine_types-0.0.8 → uncertainty_engine_types-0.0.10}/uncertainty_engine_types/utils.py
RENAMED
|
File without changes
|
|
File without changes
|