langchain-deepseek-extension
Introduction
This project supports the calculation of token counts.
ref: https://api-docs.deepseek.com/zh-cn/quick_start/token_usage
Examples
from langchain_deepseek_extension.extension import ChatDeepSeekPlus
model = ChatDeepSeekPlus(model="deepseek-chat")
messages = [
SystemMessage(content="you're a good assistant"),
HumanMessage(content="hi! I'm bob"),
AIMessage(content="hi!")
]
num = model.get_num_tokens_from_messages(messages)
Metadata
Release files for langchain-deepseek-extension 0.0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| langchain_deepseek_extension-0.0.8.tar.gz | 2.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| langchain_deepseek_extension-0.0.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.0 kB
Release files / langchain_deepseek_extension-0.0.8.tar.gz
| Download URL | langchain_deepseek_extension-0.0.8.tar.gz |
|---|---|
| Size | 2.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
573e67314a20609cca2af6f22c1aba74e317009f1001ce4b6d2bd93153da4bcc
|
|
BLAKE2b-256 checksum How to use checksums |
52cfec1b7f24e6cc3c8e387a4f39ac8db7a5ef8e86356b2f21bc426f808dbfc1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Release files / langchain_deepseek_extension-0.0.8-py3-none-any.whl
| Download URL | langchain_deepseek_extension-0.0.8-py3-none-any.whl |
|---|---|
| Size | 3.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d9da6f33be28394a6eaeec98c435e52f4f789440b8ab744dbb414400b093a8f2
|
|
BLAKE2b-256 checksum How to use checksums |
907f8528285f44783512c9f5d3b10b58336cf5b189666fd559e6a3162ee415da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|