mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
Update: compress/hard constrained token usage (#136)
* setup truncation & folder structure * fix: xml in prompt; qwen code in stats page * fix: clear & continue logic * preflight * add maxSessionLimit in README
This commit is contained in:
11
README.md
11
README.md
@@ -45,6 +45,17 @@ npm install
|
||||
npm install -g .
|
||||
```
|
||||
|
||||
We now support max session token limit, you can set it in your `.qwen/settings.json` file to save the token usage.
|
||||
For example, if you want to set the max session token limit to 32000, you can set it like this:
|
||||
|
||||
```json
|
||||
{
|
||||
"maxSessionToken": 32000
|
||||
}
|
||||
```
|
||||
|
||||
The max session means the maximum number of tokens that can be used in one chat (not the total usage during multiple tool call shoots); if you reach the limit, you can use the `/compress` command to compress the history and go on, or use `/clear` command to clear the history.
|
||||
|
||||
### API Configuration
|
||||
|
||||
Set your Qwen API key (In Qwen Code project, you can also set your API key in `.env` file). the `.env` file should be placed in the root directory of your current project.
|
||||
|
||||
Reference in New Issue
Block a user