vectorvein 0.2.13__tar.gz → 0.2.14__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.
- {vectorvein-0.2.13 → vectorvein-0.2.14}/PKG-INFO +1 -1
- {vectorvein-0.2.13 → vectorvein-0.2.14}/pyproject.toml +1 -1
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/settings/__init__.py +30 -3
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/types/__init__.py +4 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/types/settings.py +16 -5
- {vectorvein-0.2.13 → vectorvein-0.2.14}/README.md +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/__init__.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/api/__init__.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/api/client.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/api/exceptions.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/api/models.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/chat_clients/__init__.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/chat_clients/anthropic_client.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/chat_clients/baichuan_client.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/chat_clients/base_client.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/chat_clients/deepseek_client.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/chat_clients/gemini_client.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/chat_clients/groq_client.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/chat_clients/local_client.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/chat_clients/minimax_client.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/chat_clients/mistral_client.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/chat_clients/moonshot_client.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/chat_clients/openai_client.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/chat_clients/openai_compatible_client.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/chat_clients/py.typed +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/chat_clients/qwen_client.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/chat_clients/stepfun_client.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/chat_clients/utils.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/chat_clients/xai_client.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/chat_clients/yi_client.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/chat_clients/zhipuai_client.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/py.typed +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/server/token_server.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/settings/py.typed +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/types/defaults.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/types/enums.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/types/exception.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/types/llm_parameters.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/types/py.typed +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/utilities/media_processing.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/utilities/rate_limiter.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/utilities/retry.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/workflow/graph/edge.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/workflow/graph/node.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/workflow/graph/port.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/workflow/graph/workflow.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/workflow/nodes/__init__.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/workflow/nodes/audio_generation.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/workflow/nodes/control_flows.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/workflow/nodes/file_processing.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/workflow/nodes/image_generation.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/workflow/nodes/llms.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/workflow/nodes/media_editing.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/workflow/nodes/media_processing.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/workflow/nodes/output.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/workflow/nodes/relational_db.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/workflow/nodes/text_processing.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/workflow/nodes/tools.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/workflow/nodes/triggers.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/workflow/nodes/vector_db.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/workflow/nodes/video_generation.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/workflow/nodes/web_crawlers.py +0 -0
- {vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/workflow/utils/json_to_code.py +0 -0
@@ -59,7 +59,7 @@ class Backends(BaseModel):
|
|
59
59
|
|
60
60
|
class Settings(BaseModel):
|
61
61
|
VERSION: Optional[str] = Field(
|
62
|
-
default=
|
62
|
+
default="2", description="Configuration version. If provided, will use the corresponding format."
|
63
63
|
)
|
64
64
|
endpoints: List[EndpointSetting] = Field(
|
65
65
|
default_factory=list, description="Available endpoints for the LLM service."
|
@@ -116,6 +116,10 @@ class Settings(BaseModel):
|
|
116
116
|
|
117
117
|
version = data.get("VERSION")
|
118
118
|
|
119
|
+
if len(data) == 0:
|
120
|
+
version = "2"
|
121
|
+
data["backends"] = {}
|
122
|
+
|
119
123
|
# If V2 format, model configs are in the backends dictionary
|
120
124
|
if version == "2":
|
121
125
|
if "backends" not in data:
|
@@ -124,8 +128,7 @@ class Settings(BaseModel):
|
|
124
128
|
backends = data["backends"]
|
125
129
|
else:
|
126
130
|
backends = data
|
127
|
-
|
128
|
-
warnings.warn("You're using vectorvein's deprecated V1 format. Please use V2 format.")
|
131
|
+
warnings.warn("You're using vectorvein's deprecated V1 format. Please use V2 format.")
|
129
132
|
|
130
133
|
for model_type, default_models in model_types.items():
|
131
134
|
if model_type in backends:
|
@@ -165,5 +168,29 @@ class Settings(BaseModel):
|
|
165
168
|
# Compatible with VERSION 1 format
|
166
169
|
return getattr(self, backend_name)
|
167
170
|
|
171
|
+
def export(self):
|
172
|
+
if self.VERSION == "2":
|
173
|
+
return super().model_dump(
|
174
|
+
exclude={
|
175
|
+
"anthropic",
|
176
|
+
"deepseek",
|
177
|
+
"gemini",
|
178
|
+
"groq",
|
179
|
+
"local",
|
180
|
+
"minimax",
|
181
|
+
"mistral",
|
182
|
+
"moonshot",
|
183
|
+
"openai",
|
184
|
+
"qwen",
|
185
|
+
"yi",
|
186
|
+
"zhipuai",
|
187
|
+
"baichuan",
|
188
|
+
"stepfun",
|
189
|
+
"xai",
|
190
|
+
}
|
191
|
+
)
|
192
|
+
else:
|
193
|
+
return super().model_dump(exclude={"backends"})
|
194
|
+
|
168
195
|
|
169
196
|
settings = Settings()
|
@@ -61,6 +61,8 @@ from .settings import (
|
|
61
61
|
BackendSettingsDict,
|
62
62
|
EndpointSettingDict,
|
63
63
|
SettingsDict,
|
64
|
+
SettingsV1Dict,
|
65
|
+
SettingsV2Dict,
|
64
66
|
)
|
65
67
|
|
66
68
|
|
@@ -126,4 +128,6 @@ __all__ = [
|
|
126
128
|
"BackendSettingsDict",
|
127
129
|
"EndpointSettingDict",
|
128
130
|
"SettingsDict",
|
131
|
+
"SettingsV1Dict",
|
132
|
+
"SettingsV2Dict",
|
129
133
|
]
|
@@ -101,17 +101,13 @@ class BackendsDict(TypedDict):
|
|
101
101
|
xai: NotRequired[BackendSettingsDict]
|
102
102
|
|
103
103
|
|
104
|
-
class
|
104
|
+
class SettingsV1Dict(TypedDict):
|
105
105
|
"""TypedDict representing the expected structure of the settings dictionary."""
|
106
106
|
|
107
|
-
VERSION: NotRequired[str]
|
108
107
|
endpoints: List[EndpointSettingDict]
|
109
108
|
token_server: NotRequired[ServerDict]
|
110
109
|
rate_limit: NotRequired[RateLimitConfigDict]
|
111
110
|
|
112
|
-
# V2 format: all model backend configs in a single dictionary
|
113
|
-
backends: NotRequired[BackendsDict]
|
114
|
-
|
115
111
|
# V1 format: each model backend config
|
116
112
|
anthropic: NotRequired[BackendSettingsDict]
|
117
113
|
deepseek: NotRequired[BackendSettingsDict]
|
@@ -128,3 +124,18 @@ class SettingsDict(TypedDict):
|
|
128
124
|
baichuan: NotRequired[BackendSettingsDict]
|
129
125
|
stepfun: NotRequired[BackendSettingsDict]
|
130
126
|
xai: NotRequired[BackendSettingsDict]
|
127
|
+
|
128
|
+
|
129
|
+
class SettingsV2Dict(TypedDict):
|
130
|
+
"""TypedDict representing the expected structure of the settings dictionary."""
|
131
|
+
|
132
|
+
VERSION: NotRequired[str]
|
133
|
+
endpoints: List[EndpointSettingDict]
|
134
|
+
token_server: NotRequired[ServerDict]
|
135
|
+
rate_limit: NotRequired[RateLimitConfigDict]
|
136
|
+
|
137
|
+
# V2 format: all model backend configs in a single dictionary
|
138
|
+
backends: NotRequired[BackendsDict]
|
139
|
+
|
140
|
+
|
141
|
+
SettingsDict = Union[SettingsV1Dict, SettingsV2Dict]
|
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
|
{vectorvein-0.2.13 → vectorvein-0.2.14}/src/vectorvein/chat_clients/openai_compatible_client.py
RENAMED
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
|
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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|