inferencesh 0.2.34__tar.gz → 0.2.36__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.
Potentially problematic release.
This version of inferencesh might be problematic. Click here for more details.
- {inferencesh-0.2.34/src/inferencesh.egg-info → inferencesh-0.2.36}/PKG-INFO +1 -1
- {inferencesh-0.2.34 → inferencesh-0.2.36}/pyproject.toml +1 -1
- {inferencesh-0.2.34 → inferencesh-0.2.36}/src/inferencesh/models/llm.py +18 -24
- {inferencesh-0.2.34 → inferencesh-0.2.36/src/inferencesh.egg-info}/PKG-INFO +1 -1
- {inferencesh-0.2.34 → inferencesh-0.2.36}/LICENSE +0 -0
- {inferencesh-0.2.34 → inferencesh-0.2.36}/README.md +0 -0
- {inferencesh-0.2.34 → inferencesh-0.2.36}/setup.cfg +0 -0
- {inferencesh-0.2.34 → inferencesh-0.2.36}/setup.py +0 -0
- {inferencesh-0.2.34 → inferencesh-0.2.36}/src/inferencesh/__init__.py +0 -0
- {inferencesh-0.2.34 → inferencesh-0.2.36}/src/inferencesh/models/__init__.py +0 -0
- {inferencesh-0.2.34 → inferencesh-0.2.36}/src/inferencesh/models/base.py +0 -0
- {inferencesh-0.2.34 → inferencesh-0.2.36}/src/inferencesh/models/file.py +0 -0
- {inferencesh-0.2.34 → inferencesh-0.2.36}/src/inferencesh/utils/__init__.py +0 -0
- {inferencesh-0.2.34 → inferencesh-0.2.36}/src/inferencesh/utils/download.py +0 -0
- {inferencesh-0.2.34 → inferencesh-0.2.36}/src/inferencesh/utils/storage.py +0 -0
- {inferencesh-0.2.34 → inferencesh-0.2.36}/src/inferencesh.egg-info/SOURCES.txt +0 -0
- {inferencesh-0.2.34 → inferencesh-0.2.36}/src/inferencesh.egg-info/dependency_links.txt +0 -0
- {inferencesh-0.2.34 → inferencesh-0.2.36}/src/inferencesh.egg-info/entry_points.txt +0 -0
- {inferencesh-0.2.34 → inferencesh-0.2.36}/src/inferencesh.egg-info/requires.txt +0 -0
- {inferencesh-0.2.34 → inferencesh-0.2.36}/src/inferencesh.egg-info/top_level.txt +0 -0
- {inferencesh-0.2.34 → inferencesh-0.2.36}/tests/test_sdk.py +0 -0
|
@@ -23,31 +23,27 @@ class Message(BaseAppInput):
|
|
|
23
23
|
|
|
24
24
|
class ContextMessage(BaseAppInput):
|
|
25
25
|
role: ContextMessageRole = Field(
|
|
26
|
-
description="
|
|
26
|
+
description="the role of the message. user, assistant, or system",
|
|
27
27
|
)
|
|
28
28
|
text: str = Field(
|
|
29
|
-
description="
|
|
29
|
+
description="the text content of the message"
|
|
30
30
|
)
|
|
31
31
|
image: Optional[File] = Field(
|
|
32
|
-
description="
|
|
32
|
+
description="the image file of the message",
|
|
33
33
|
default=None
|
|
34
34
|
)
|
|
35
35
|
|
|
36
36
|
class BaseLLMInput(BaseAppInput):
|
|
37
37
|
"""Base class with common LLM fields."""
|
|
38
38
|
system_prompt: str = Field(
|
|
39
|
-
description="
|
|
40
|
-
default="
|
|
39
|
+
description="the system prompt to use for the model",
|
|
40
|
+
default="you are a helpful assistant that can answer questions and help with tasks.",
|
|
41
41
|
examples=[
|
|
42
|
-
"
|
|
43
|
-
"You are a certified medical professional who can provide accurate health information.",
|
|
44
|
-
"You are a certified financial advisor who can give sound investment guidance.",
|
|
45
|
-
"You are a certified cybersecurity expert who can explain security best practices.",
|
|
46
|
-
"You are a certified environmental scientist who can discuss climate and sustainability.",
|
|
42
|
+
"you are a helpful assistant that can answer questions and help with tasks.",
|
|
47
43
|
]
|
|
48
44
|
)
|
|
49
45
|
context: List[ContextMessage] = Field(
|
|
50
|
-
description="
|
|
46
|
+
description="the context to use for the model",
|
|
51
47
|
default=[],
|
|
52
48
|
examples=[
|
|
53
49
|
[
|
|
@@ -57,12 +53,9 @@ class BaseLLMInput(BaseAppInput):
|
|
|
57
53
|
]
|
|
58
54
|
)
|
|
59
55
|
text: str = Field(
|
|
60
|
-
description="
|
|
56
|
+
description="the user prompt to use for the model",
|
|
61
57
|
examples=[
|
|
62
|
-
"
|
|
63
|
-
"What is the weather like today?",
|
|
64
|
-
"Can you help me write a poem about spring?",
|
|
65
|
-
"Explain quantum computing in simple terms"
|
|
58
|
+
"write a haiku about artificial general intelligence"
|
|
66
59
|
]
|
|
67
60
|
)
|
|
68
61
|
temperature: float = Field(default=0.7, ge=0.0, le=1.0)
|
|
@@ -72,21 +65,22 @@ class BaseLLMInput(BaseAppInput):
|
|
|
72
65
|
class ImageCapabilityMixin(BaseModel):
|
|
73
66
|
"""Mixin for models that support image inputs."""
|
|
74
67
|
image: Optional[File] = Field(
|
|
75
|
-
description="
|
|
76
|
-
default=None
|
|
68
|
+
description="the image to use for the model",
|
|
69
|
+
default=None,
|
|
70
|
+
content_media_type=["image/*"],
|
|
77
71
|
)
|
|
78
72
|
|
|
79
73
|
class ReasoningCapabilityMixin(BaseModel):
|
|
80
74
|
"""Mixin for models that support reasoning."""
|
|
81
75
|
reasoning: bool = Field(
|
|
82
|
-
description="
|
|
76
|
+
description="enable step-by-step reasoning",
|
|
83
77
|
default=False
|
|
84
78
|
)
|
|
85
79
|
|
|
86
80
|
class ToolsCapabilityMixin(BaseModel):
|
|
87
81
|
"""Mixin for models that support tool/function calling."""
|
|
88
82
|
tools: Optional[List[Dict[str, Any]]] = Field(
|
|
89
|
-
description="
|
|
83
|
+
description="tool definitions for function calling",
|
|
90
84
|
default=None
|
|
91
85
|
)
|
|
92
86
|
|
|
@@ -111,26 +105,26 @@ class LLMUsage(BaseAppOutput):
|
|
|
111
105
|
|
|
112
106
|
class BaseLLMOutput(BaseAppOutput):
|
|
113
107
|
"""Base class for LLM outputs with common fields."""
|
|
114
|
-
response: str = Field(description="
|
|
108
|
+
response: str = Field(description="the generated text response")
|
|
115
109
|
|
|
116
110
|
class LLMUsageMixin(BaseModel):
|
|
117
111
|
"""Mixin for models that provide token usage statistics."""
|
|
118
112
|
usage: Optional[LLMUsage] = Field(
|
|
119
|
-
description="
|
|
113
|
+
description="token usage statistics",
|
|
120
114
|
default=None
|
|
121
115
|
)
|
|
122
116
|
|
|
123
117
|
class ReasoningMixin(BaseModel):
|
|
124
118
|
"""Mixin for models that support reasoning."""
|
|
125
119
|
reasoning: Optional[str] = Field(
|
|
126
|
-
description="
|
|
120
|
+
description="the reasoning output of the model",
|
|
127
121
|
default=None
|
|
128
122
|
)
|
|
129
123
|
|
|
130
124
|
class ToolCallsMixin(BaseModel):
|
|
131
125
|
"""Mixin for models that support tool calls."""
|
|
132
126
|
tool_calls: Optional[List[Dict[str, Any]]] = Field(
|
|
133
|
-
description="
|
|
127
|
+
description="tool calls for function calling",
|
|
134
128
|
default=None
|
|
135
129
|
)
|
|
136
130
|
|
|
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
|