vectorvein 0.1.49__py3-none-any.whl → 0.1.50__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 +5 -1
- {vectorvein-0.1.49.dist-info → vectorvein-0.1.50.dist-info}/METADATA +1 -1
- {vectorvein-0.1.49.dist-info → vectorvein-0.1.50.dist-info}/RECORD +5 -5
- {vectorvein-0.1.49.dist-info → vectorvein-0.1.50.dist-info}/WHEEL +0 -0
- {vectorvein-0.1.49.dist-info → vectorvein-0.1.50.dist-info}/entry_points.txt +0 -0
vectorvein/chat_clients/utils.py
CHANGED
@@ -226,7 +226,11 @@ def get_token_counts(text: str | dict, model: str = "", use_token_server_first:
|
|
226
226
|
result = response.json()
|
227
227
|
return result["totalTokens"]
|
228
228
|
elif model.startswith("claude"):
|
229
|
-
return
|
229
|
+
return (
|
230
|
+
Anthropic()
|
231
|
+
.beta.messages.count_tokens(messages=[{"role": "user", "content": text}], model=model)
|
232
|
+
.input_tokens
|
233
|
+
)
|
230
234
|
elif model.startswith("deepseek"):
|
231
235
|
from deepseek_tokenizer import deepseek_tokenizer
|
232
236
|
|
@@ -1,6 +1,6 @@
|
|
1
|
-
vectorvein-0.1.
|
2
|
-
vectorvein-0.1.
|
3
|
-
vectorvein-0.1.
|
1
|
+
vectorvein-0.1.50.dist-info/METADATA,sha256=pYWzduRY5TFzHsTwCq5AJ0QKWoyFkzs1VYgSqWEzCx0,644
|
2
|
+
vectorvein-0.1.50.dist-info/WHEEL,sha256=thaaA2w1JzcGC48WYufAs8nrYZjJm8LqNfnXFOFyCC4,90
|
3
|
+
vectorvein-0.1.50.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
|
4
4
|
vectorvein/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
5
5
|
vectorvein/chat_clients/__init__.py,sha256=dW169oK1n3v8Z0uD8itghzlCP72rxiaS-XYn6fvI2xM,16788
|
6
6
|
vectorvein/chat_clients/anthropic_client.py,sha256=i1fMYSkUovd-Lc9B64bWMgzSTUFw4S3fj3AJ_pDokT4,34029
|
@@ -18,7 +18,7 @@ vectorvein/chat_clients/openai_compatible_client.py,sha256=D2VmhpDVct4w2y58s87An
|
|
18
18
|
vectorvein/chat_clients/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
19
19
|
vectorvein/chat_clients/qwen_client.py,sha256=-ryh-m9PgsO0fc4ulcCmPTy1155J8YUy15uPoJQOHA0,513
|
20
20
|
vectorvein/chat_clients/stepfun_client.py,sha256=zsD2W5ahmR4DD9cqQTXmJr3txrGuvxbRWhFlRdwNijI,519
|
21
|
-
vectorvein/chat_clients/utils.py,sha256=
|
21
|
+
vectorvein/chat_clients/utils.py,sha256=pLkIrTz4tQszgQIeegc_RTFh1oeNKR4DW-G3hKKEv6w,25605
|
22
22
|
vectorvein/chat_clients/yi_client.py,sha256=RNf4CRuPJfixrwLZ3-DEc3t25QDe1mvZeb9sku2f8Bc,484
|
23
23
|
vectorvein/chat_clients/zhipuai_client.py,sha256=Ys5DSeLCuedaDXr3PfG1EW2zKXopt-awO2IylWSwY0s,519
|
24
24
|
vectorvein/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -32,4 +32,4 @@ vectorvein/types/llm_parameters.py,sha256=5o-C_yXxxQWZy_e8OWowB2107GTS-Eawx4Mvb1
|
|
32
32
|
vectorvein/types/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
33
33
|
vectorvein/utilities/media_processing.py,sha256=cnzLrU1OaJvSv87IOnc36FrDXtmGMDStPbxtIJ33YN4,5880
|
34
34
|
vectorvein/utilities/retry.py,sha256=6KFS9R2HdhqM3_9jkjD4F36ZSpEx2YNFGOVlpOsUetM,2208
|
35
|
-
vectorvein-0.1.
|
35
|
+
vectorvein-0.1.50.dist-info/RECORD,,
|
File without changes
|
File without changes
|