This project supports the calculation of token counts.
Project description
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)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file langchain_deepseek_extension-0.0.8.tar.gz.
File metadata
- Download URL: langchain_deepseek_extension-0.0.8.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
573e67314a20609cca2af6f22c1aba74e317009f1001ce4b6d2bd93153da4bcc
|
|
| MD5 |
4f192c077cc93d127f875d6474ee4b79
|
|
| BLAKE2b-256 |
52cfec1b7f24e6cc3c8e387a4f39ac8db7a5ef8e86356b2f21bc426f808dbfc1
|
File details
Details for the file langchain_deepseek_extension-0.0.8-py3-none-any.whl.
File metadata
- Download URL: langchain_deepseek_extension-0.0.8-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9da6f33be28394a6eaeec98c435e52f4f789440b8ab744dbb414400b093a8f2
|
|
| MD5 |
45a84886101055e6a7cbf2f39c510c8b
|
|
| BLAKE2b-256 |
907f8528285f44783512c9f5d3b10b58336cf5b189666fd559e6a3162ee415da
|