dify/api/core/agent
-LAN- 559ab46ee1
fix: Removes redundant token calculations and updates dependencies
Eliminates unnecessary pre-calculation of token limits and recalculation of max tokens
across multiple app runners, simplifying the logic for prompt handling.

Updates tiktoken library from version 0.8.0 to 0.9.0 for improved tokenization performance.

Increases default token limit in TokenBufferMemory to accommodate larger prompt messages.

These changes streamline the token management process and leverage the latest
improvements in the tiktoken library.

Fixes potential token overflow issues and prepares the system for handling larger
inputs more efficiently.

Relates to internal optimization tasks.

Signed-off-by: -LAN- <laipz8200@outlook.com>
2025-04-28 15:39:12 +08:00
..
output_parser feat: mypy for all type check (#10921) 2024-12-24 18:38:51 +08:00
prompt chore: apply ruff E501 line-too-long linter rule (#8275) 2024-09-12 14:00:36 +08:00
__init__.py FEAT: NEW WORKFLOW ENGINE (#3160) 2024-04-08 18:51:46 +08:00
base_agent_runner.py fix: #12125 (#12184) 2024-12-29 11:52:12 +08:00
cot_agent_runner.py fix: Removes redundant token calculations and updates dependencies 2025-04-28 15:39:12 +08:00
cot_chat_agent_runner.py feat: mypy for all type check (#10921) 2024-12-24 18:38:51 +08:00
cot_completion_agent_runner.py feat: mypy for all type check (#10921) 2024-12-24 18:38:51 +08:00
entities.py feat: mypy for all type check (#10921) 2024-12-24 18:38:51 +08:00
fc_agent_runner.py fix: Removes redundant token calculations and updates dependencies 2025-04-28 15:39:12 +08:00