vectorvein 0.3.18__py3-none-any.whl → 0.3.20__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.
- vectorvein/chat_clients/utils.py +67 -5
- vectorvein/types/defaults.py +8 -0
- {vectorvein-0.3.18.dist-info → vectorvein-0.3.20.dist-info}/METADATA +1 -1
- {vectorvein-0.3.18.dist-info → vectorvein-0.3.20.dist-info}/RECORD +6 -6
- {vectorvein-0.3.18.dist-info → vectorvein-0.3.20.dist-info}/WHEEL +0 -0
- {vectorvein-0.3.18.dist-info → vectorvein-0.3.20.dist-info}/entry_points.txt +0 -0
vectorvein/chat_clients/utils.py
CHANGED
@@ -158,7 +158,19 @@ def get_token_counts(text: str | dict, model: str = "", use_token_server_first:
|
|
158
158
|
],
|
159
159
|
}
|
160
160
|
|
161
|
-
_, response =
|
161
|
+
_, response = (
|
162
|
+
Retry(httpx.post)
|
163
|
+
.args(
|
164
|
+
url=tokenize_url,
|
165
|
+
headers=headers,
|
166
|
+
json=request_body,
|
167
|
+
timeout=None,
|
168
|
+
proxy=endpoint.proxy,
|
169
|
+
)
|
170
|
+
.retry_times(5)
|
171
|
+
.sleep_time(10)
|
172
|
+
.run()
|
173
|
+
)
|
162
174
|
if response is None:
|
163
175
|
return 1000
|
164
176
|
result = response.json()
|
@@ -178,7 +190,19 @@ def get_token_counts(text: str | dict, model: str = "", use_token_server_first:
|
|
178
190
|
{"role": "user", "content": text},
|
179
191
|
],
|
180
192
|
}
|
181
|
-
_, response =
|
193
|
+
_, response = (
|
194
|
+
Retry(httpx.post)
|
195
|
+
.args(
|
196
|
+
url=tokenize_url,
|
197
|
+
headers=headers,
|
198
|
+
json=request_body,
|
199
|
+
timeout=None,
|
200
|
+
proxy=endpoint.proxy,
|
201
|
+
)
|
202
|
+
.retry_times(5)
|
203
|
+
.sleep_time(10)
|
204
|
+
.run()
|
205
|
+
)
|
182
206
|
if response is None:
|
183
207
|
return 1000
|
184
208
|
result = response.json()
|
@@ -202,7 +226,19 @@ def get_token_counts(text: str | dict, model: str = "", use_token_server_first:
|
|
202
226
|
],
|
203
227
|
},
|
204
228
|
}
|
205
|
-
_, response =
|
229
|
+
_, response = (
|
230
|
+
Retry(httpx.post)
|
231
|
+
.args(
|
232
|
+
base_url,
|
233
|
+
json=request_body,
|
234
|
+
params=params,
|
235
|
+
timeout=None,
|
236
|
+
proxy=endpoint.proxy,
|
237
|
+
)
|
238
|
+
.retry_times(5)
|
239
|
+
.sleep_time(10)
|
240
|
+
.run()
|
241
|
+
)
|
206
242
|
if response is None:
|
207
243
|
return 1000
|
208
244
|
result = response.json()
|
@@ -226,10 +262,12 @@ def get_token_counts(text: str | dict, model: str = "", use_token_server_first:
|
|
226
262
|
if endpoint.is_vertex or endpoint.is_bedrock or endpoint.endpoint_type == "anthropic_vertex" or endpoint.endpoint_type == "anthropic_bedrock":
|
227
263
|
continue
|
228
264
|
elif endpoint.endpoint_type in ("default", "anthropic"):
|
265
|
+
http_client = httpx.Client(proxy=endpoint.proxy)
|
229
266
|
return (
|
230
267
|
Anthropic(
|
231
268
|
api_key=endpoint.api_key,
|
232
269
|
base_url=endpoint.api_base,
|
270
|
+
http_client=http_client,
|
233
271
|
)
|
234
272
|
.beta.messages.count_tokens(messages=[{"role": "user", "content": text}], model=model)
|
235
273
|
.input_tokens
|
@@ -264,7 +302,19 @@ def get_token_counts(text: str | dict, model: str = "", use_token_server_first:
|
|
264
302
|
{"role": "user", "content": text},
|
265
303
|
],
|
266
304
|
}
|
267
|
-
_, response =
|
305
|
+
_, response = (
|
306
|
+
Retry(httpx.post)
|
307
|
+
.args(
|
308
|
+
url=tokenize_url,
|
309
|
+
headers=headers,
|
310
|
+
json=request_body,
|
311
|
+
timeout=None,
|
312
|
+
proxy=endpoint.proxy,
|
313
|
+
)
|
314
|
+
.retry_times(5)
|
315
|
+
.sleep_time(10)
|
316
|
+
.run()
|
317
|
+
)
|
268
318
|
if response is None:
|
269
319
|
return 1000
|
270
320
|
result = response.json()
|
@@ -286,7 +336,19 @@ def get_token_counts(text: str | dict, model: str = "", use_token_server_first:
|
|
286
336
|
{"role": "user", "content": text},
|
287
337
|
],
|
288
338
|
}
|
289
|
-
_, response =
|
339
|
+
_, response = (
|
340
|
+
Retry(httpx.post)
|
341
|
+
.args(
|
342
|
+
url=tokenize_url,
|
343
|
+
headers=headers,
|
344
|
+
json=request_body,
|
345
|
+
timeout=None,
|
346
|
+
proxy=endpoint.proxy,
|
347
|
+
)
|
348
|
+
.retry_times(5)
|
349
|
+
.sleep_time(10)
|
350
|
+
.run()
|
351
|
+
)
|
290
352
|
if response is None:
|
291
353
|
return 1000
|
292
354
|
result = response.json()
|
vectorvein/types/defaults.py
CHANGED
@@ -658,6 +658,14 @@ ZHIPUAI_MODELS: Final[dict[str, ModelSettingDict]] = {
|
|
658
658
|
"max_output_tokens": 96000,
|
659
659
|
"native_multimodal": False,
|
660
660
|
},
|
661
|
+
"glm-4.5v": {
|
662
|
+
"id": "glm-4.5v",
|
663
|
+
"context_length": 64000,
|
664
|
+
"function_call_available": True,
|
665
|
+
"response_format_available": True,
|
666
|
+
"max_output_tokens": 16384,
|
667
|
+
"native_multimodal": True,
|
668
|
+
},
|
661
669
|
}
|
662
670
|
|
663
671
|
# Mistral models
|
@@ -1,6 +1,6 @@
|
|
1
|
-
vectorvein-0.3.
|
2
|
-
vectorvein-0.3.
|
3
|
-
vectorvein-0.3.
|
1
|
+
vectorvein-0.3.20.dist-info/METADATA,sha256=PyjmJYRw1P5SVLp1k9NaELFHPo57ypOLshhhYVs0tsQ,19864
|
2
|
+
vectorvein-0.3.20.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
|
3
|
+
vectorvein-0.3.20.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
|
4
4
|
vectorvein/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
5
5
|
vectorvein/api/__init__.py,sha256=jdqzewnoL6PfnSHkWFLAtLFwyl-MeiB1gXdhYLy5bPA,808
|
6
6
|
vectorvein/api/client.py,sha256=rhlxDjUZfjXNDxeYr5gfxMVSVjc-PEkqbV_nJ4T1ySI,37719
|
@@ -23,7 +23,7 @@ vectorvein/chat_clients/openai_compatible_client.py,sha256=38a_bmAd1Tq7cGHyP8imf
|
|
23
23
|
vectorvein/chat_clients/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
24
24
|
vectorvein/chat_clients/qwen_client.py,sha256=-ryh-m9PgsO0fc4ulcCmPTy1155J8YUy15uPoJQOHA0,513
|
25
25
|
vectorvein/chat_clients/stepfun_client.py,sha256=zsD2W5ahmR4DD9cqQTXmJr3txrGuvxbRWhFlRdwNijI,519
|
26
|
-
vectorvein/chat_clients/utils.py,sha256=
|
26
|
+
vectorvein/chat_clients/utils.py,sha256=tWktwk7gevD2JzijRSuMgr3id1iEiTeb6b-Hh7UoEoc,33072
|
27
27
|
vectorvein/chat_clients/xai_client.py,sha256=eLFJJrNRJ-ni3DpshODcr3S1EJQLbhVwxyO1E54LaqM,491
|
28
28
|
vectorvein/chat_clients/yi_client.py,sha256=RNf4CRuPJfixrwLZ3-DEc3t25QDe1mvZeb9sku2f8Bc,484
|
29
29
|
vectorvein/chat_clients/zhipuai_client.py,sha256=Ys5DSeLCuedaDXr3PfG1EW2zKXopt-awO2IylWSwY0s,519
|
@@ -32,7 +32,7 @@ vectorvein/server/token_server.py,sha256=_ThjCpU8OFBek2Hai1FkPZwZENZWEhmbHYriXzZ
|
|
32
32
|
vectorvein/settings/__init__.py,sha256=MM1QB2nWKXO1MOZWfiH8TQwLgilL5YlNRTMPrFPMTFc,11416
|
33
33
|
vectorvein/settings/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
34
34
|
vectorvein/types/__init__.py,sha256=0XNY7FGPklSk0eKPR0ZgwG2kNqyZ0z3Z3G7oLP0ep8Y,3838
|
35
|
-
vectorvein/types/defaults.py,sha256=
|
35
|
+
vectorvein/types/defaults.py,sha256=ZvWba6Aa-ER0zQ0XPWogMOy8VP8ghcH7SQShTQItoSs,44435
|
36
36
|
vectorvein/types/enums.py,sha256=LplSVkXLBK-t8TWtJKj_f7ktWTd6CSHWRLb67XKMm54,1716
|
37
37
|
vectorvein/types/exception.py,sha256=KtnqZ-1DstHm95SZAyZdHhkGq1bJ4A9Aw3Zfdu-VIFo,130
|
38
38
|
vectorvein/types/llm_parameters.py,sha256=80HEEpagwBbilXA5fQ6kd-lpbkqxOqm0jV-F20xtA1A,9680
|
@@ -65,4 +65,4 @@ vectorvein/workflow/utils/analyse.py,sha256=8kL3tAo6vOYkeg1zbMHyuuy16zuSRklFK_wA
|
|
65
65
|
vectorvein/workflow/utils/check.py,sha256=w-wmGeBO_zpQ5-7t3m_OZeVfSM6g_lsk1pZPAfdO_r4,11247
|
66
66
|
vectorvein/workflow/utils/json_to_code.py,sha256=HgCyc1h4hqZnT1HR0XqdLUzOIMtDw8Y0nTXXU5r2ZYw,7099
|
67
67
|
vectorvein/workflow/utils/layout.py,sha256=m8Jui-htCB6RwkkDwtj0elOdtkFsx7rSjdxwpRnYPFY,4500
|
68
|
-
vectorvein-0.3.
|
68
|
+
vectorvein-0.3.20.dist-info/RECORD,,
|
File without changes
|
File without changes
|