inferencesh 0.4.2__tar.gz → 0.4.3__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.4.2/src/inferencesh.egg-info → inferencesh-0.4.3}/PKG-INFO +1 -1
- {inferencesh-0.4.2 → inferencesh-0.4.3}/pyproject.toml +1 -1
- {inferencesh-0.4.2 → inferencesh-0.4.3}/src/inferencesh/models/base.py +69 -2
- {inferencesh-0.4.2 → inferencesh-0.4.3/src/inferencesh.egg-info}/PKG-INFO +1 -1
- {inferencesh-0.4.2 → inferencesh-0.4.3}/LICENSE +0 -0
- {inferencesh-0.4.2 → inferencesh-0.4.3}/README.md +0 -0
- {inferencesh-0.4.2 → inferencesh-0.4.3}/setup.cfg +0 -0
- {inferencesh-0.4.2 → inferencesh-0.4.3}/src/inferencesh/__init__.py +0 -0
- {inferencesh-0.4.2 → inferencesh-0.4.3}/src/inferencesh/client.py +0 -0
- {inferencesh-0.4.2 → inferencesh-0.4.3}/src/inferencesh/models/__init__.py +0 -0
- {inferencesh-0.4.2 → inferencesh-0.4.3}/src/inferencesh/models/file.py +0 -0
- {inferencesh-0.4.2 → inferencesh-0.4.3}/src/inferencesh/models/llm.py +0 -0
- {inferencesh-0.4.2 → inferencesh-0.4.3}/src/inferencesh/utils/__init__.py +0 -0
- {inferencesh-0.4.2 → inferencesh-0.4.3}/src/inferencesh/utils/download.py +0 -0
- {inferencesh-0.4.2 → inferencesh-0.4.3}/src/inferencesh/utils/storage.py +0 -0
- {inferencesh-0.4.2 → inferencesh-0.4.3}/src/inferencesh.egg-info/SOURCES.txt +0 -0
- {inferencesh-0.4.2 → inferencesh-0.4.3}/src/inferencesh.egg-info/dependency_links.txt +0 -0
- {inferencesh-0.4.2 → inferencesh-0.4.3}/src/inferencesh.egg-info/entry_points.txt +0 -0
- {inferencesh-0.4.2 → inferencesh-0.4.3}/src/inferencesh.egg-info/requires.txt +0 -0
- {inferencesh-0.4.2 → inferencesh-0.4.3}/src/inferencesh.egg-info/top_level.txt +0 -0
- {inferencesh-0.4.2 → inferencesh-0.4.3}/tests/test_client.py +0 -0
- {inferencesh-0.4.2 → inferencesh-0.4.3}/tests/test_sdk.py +0 -0
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
from typing import Any, Dict, List
|
|
1
|
+
from typing import Any, Dict, List, Optional
|
|
2
2
|
from pydantic import BaseModel, ConfigDict
|
|
3
3
|
import inspect
|
|
4
4
|
import ast
|
|
5
5
|
import textwrap
|
|
6
6
|
from collections import OrderedDict
|
|
7
|
+
from inferencesh.models.file import File
|
|
8
|
+
from pydantic import Field
|
|
7
9
|
|
|
8
10
|
|
|
9
11
|
class OrderedSchemaModel(BaseModel):
|
|
@@ -91,4 +93,69 @@ class BaseApp(BaseModel):
|
|
|
91
93
|
raise NotImplementedError("run method must be implemented")
|
|
92
94
|
|
|
93
95
|
async def unload(self):
|
|
94
|
-
pass
|
|
96
|
+
pass
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
# Mixins
|
|
100
|
+
|
|
101
|
+
class OptionalImageFieldMixin(BaseModel):
|
|
102
|
+
image: Optional[File] = Field(
|
|
103
|
+
description="the image to use for the model",
|
|
104
|
+
default=None,
|
|
105
|
+
contentMediaType="image/*",
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
class RequiredImageFieldMixin(BaseModel):
|
|
109
|
+
image: File = Field(
|
|
110
|
+
description="the image to use for the model",
|
|
111
|
+
contentMediaType="image/*",
|
|
112
|
+
)
|
|
113
|
+
|
|
114
|
+
class OptionalVideoFieldMixin(BaseModel):
|
|
115
|
+
video: Optional[File] = Field(
|
|
116
|
+
description="the video to use for the model",
|
|
117
|
+
default=None,
|
|
118
|
+
contentMediaType="video/*",
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
class RequiredVideoFieldMixin(BaseModel):
|
|
122
|
+
video: File = Field(
|
|
123
|
+
description="the video to use for the model",
|
|
124
|
+
contentMediaType="video/*",
|
|
125
|
+
)
|
|
126
|
+
|
|
127
|
+
class OptionalAudioFieldMixin(BaseModel):
|
|
128
|
+
audio: Optional[File] = Field(
|
|
129
|
+
description="the audio to use for the model",
|
|
130
|
+
default=None,
|
|
131
|
+
contentMediaType="audio/*",
|
|
132
|
+
)
|
|
133
|
+
|
|
134
|
+
class RequiredAudioFieldMixin(BaseModel):
|
|
135
|
+
audio: File = Field(
|
|
136
|
+
description="the audio to use for the model",
|
|
137
|
+
contentMediaType="audio/*",
|
|
138
|
+
)
|
|
139
|
+
|
|
140
|
+
class OptionalTextFieldMixin(BaseModel):
|
|
141
|
+
text: Optional[str] = Field(
|
|
142
|
+
description="the text to use for the model",
|
|
143
|
+
default=None,
|
|
144
|
+
)
|
|
145
|
+
|
|
146
|
+
class RequiredTextFieldMixin(BaseModel):
|
|
147
|
+
text: str = Field(
|
|
148
|
+
description="the text to use for the model",
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
class OptionalFileFieldMixin(BaseModel):
|
|
152
|
+
file: Optional[File] = Field(
|
|
153
|
+
description="the file to use for the model",
|
|
154
|
+
default=None,
|
|
155
|
+
)
|
|
156
|
+
|
|
157
|
+
class RequiredFileFieldMixin(BaseModel):
|
|
158
|
+
file: Optional[File] = Field(
|
|
159
|
+
description="the file to use for the model",
|
|
160
|
+
default=None,
|
|
161
|
+
)
|
|
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
|