99 Commits

Author SHA1 Message Date
-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
jiandanfeng
edc29780ed
fix: "Model schema not found" error only in agents (#12655) (#12760) 2025-01-27 11:33:13 +08:00
jiandanfeng
9aaee8ee47
fix: Issues related to the deletion of conversation_id (#12488) (#12665) 2025-01-21 10:25:35 +08:00
Bowen Liang
166221d784
chore(lint): fix quotes for f-string formatting by bumping ruff to 0.9.x (#12702) 2025-01-21 10:12:29 +08:00
-LAN-
7ed6485f86
refactor: streamline initialization of application_generate_entity and task_state in task pipeline classes (#12326)
Signed-off-by: -LAN- <laipz8200@outlook.com>
2025-01-03 18:41:44 +08:00
Yingchun Lai
c135967e59
refactor: simplify some exception catch code (#12246) 2025-01-02 14:25:12 +08:00
-LAN-
62f792ea14
fix: ensure workflow_run_id is always set and improve handling in Wor… (#12264)
Signed-off-by: -LAN- <laipz8200@outlook.com>
2024-12-31 17:02:44 +08:00
-LAN-
822af70dce
fix(workflow_service): assign UUID to workflow_node_execution id and update optional fields in WorkflowRun and WorkflowNodeExecution models (#12096)
Signed-off-by: -LAN- <laipz8200@outlook.com>
2024-12-25 21:34:53 +08:00
-LAN-
39ace9bdee
fix(app_generator): improve error handling for closed file I/O operat… (#12073)
Signed-off-by: -LAN- <laipz8200@outlook.com>
2024-12-25 16:34:38 +08:00
-LAN-
83ea931e3c
refactor: optimize database usage (#12071)
Signed-off-by: -LAN- <laipz8200@outlook.com>
2024-12-25 16:24:52 +08:00
yihong
56e15d09a9
feat: mypy for all type check (#10921) 2024-12-24 18:38:51 +08:00
Novice
c1aa55f3ea
fix: remove the unused retry index field (#11903)
Signed-off-by: -LAN- <laipz8200@outlook.com>
Co-authored-by: Novice Lee <novicelee@NoviPro.local>
Co-authored-by: -LAN- <laipz8200@outlook.com>
2024-12-23 14:32:11 +08:00
-LAN-
dd0e81d094
fix: enhance type hints and improve audio message handling in TTS pub… (#11947)
Signed-off-by: -LAN- <laipz8200@outlook.com>
2024-12-22 10:41:06 +08:00
Novice
7abc7fa573
Feat: Retry on node execution errors (#11871)
Co-authored-by: Novice Lee <novicelee@NoviPro.local>
2024-12-20 14:14:06 +08:00
Novice
e0b67536e0
fix: remove the unused QueueWorkflowPartialSuccessEvent handle in workflow (#11669)
Co-authored-by: Novice Lee <novicelee@NoviPro.local>
2024-12-15 21:18:14 +08:00
yihong
efd5575683
fix: _handle_workflow_run_partial_success args is wrong (#11562)
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
2024-12-15 17:22:13 +08:00
Novice
79a710ce98
Feat: continue on error (#11458)
Co-authored-by: Novice Lee <novicelee@NovicedeMacBook-Pro.local>
Co-authored-by: Novice Lee <novicelee@NoviPro.local>
2024-12-11 14:22:42 +08:00
yihong
225fcd5e41
Revert "fix: total tokens is wrong which is zero in inter way, close … (#11536) 2024-12-11 09:54:46 +08:00
-LAN-
fd354d999d
fix(app_generator_service): overload type hints (#11507)
Signed-off-by: -LAN- <laipz8200@outlook.com>
2024-12-10 09:06:34 +08:00
Jyong
a8d32f9964
fix external retrieval without segment id (#11423) 2024-12-06 14:45:15 +08:00
yihong
5669cac16d
fix: some typos using typos (#11374)
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
2024-12-05 13:24:06 +08:00
Yi Xiao
e135ffc2c1
Feat: upgrade variable assigner (#11285)
Signed-off-by: -LAN- <laipz8200@outlook.com>
Co-authored-by: -LAN- <laipz8200@outlook.com>
2024-12-03 13:56:40 +08:00
Hash Brown
c4fad66f2a
fix: dialogue_count incorrect in chatflow when there's... (#11175) 2024-12-02 16:09:26 +08:00
-LAN-
c34bdb74e6
Fix/type-error (#11240)
Signed-off-by: -LAN- <laipz8200@outlook.com>
2024-12-02 10:24:21 +08:00
yihong
fd4be36991
fix: total tokens is wrong which is zero in inter way, close #11221 (#11224)
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
2024-11-30 23:18:24 +08:00
-LAN-
8d5a1be227
fix: Cannot use files in the user inputs. (#11112) 2024-11-26 13:43:38 +08:00
-LAN-
3eb51d85da
fix(workflow_entry): Support receive File and FileList in single step run. (#10947)
Signed-off-by: -LAN- <laipz8200@outlook.com>
Co-authored-by: JzoNg <jzongcode@gmail.com>
2024-11-25 12:46:50 +08:00
Bowen Liang
6c8e208ef3
chore: bump minimum supported Python version to 3.11 (#10386) 2024-11-24 13:28:46 +08:00
KVOJJJin
328965ed7c
Fix: crash of workflow file upload (#10831)
Co-authored-by: -LAN- <laipz8200@outlook.com>
Co-authored-by: StyleZhang <jasonapring2015@outlook.com>
2024-11-19 14:15:18 +08:00
crazywoola
2fed55ae6b
Fix: number maybe empty string (#10743) 2024-11-15 16:31:10 +08:00
Bowen Liang
51db59622c
chore(lint): cleanup repeated cause exception in logging.exception replaced by helpful message (#10425) 2024-11-15 15:41:40 +08:00
Novice
f414d241c1
Feat/iteration single run time (#10512) 2024-11-11 14:47:52 +08:00
-LAN-
25ca0278dd
refactor(core): Remove extra_config from File. (#10203) 2024-11-08 18:13:24 +08:00
Bowen Liang
0ebe198ff1
chore: use DEBUG in dify_config instead of parsing raw system environment variable in place (#10437) 2024-11-08 09:34:11 +08:00
Bowen Liang
574c4a264f
chore(lint): Use logging.exception instead of logging.error (#10415) 2024-11-07 21:13:02 +08:00
Novice
d1505b15c4
feat: Iteration node support parallel mode (#9493) 2024-11-05 10:32:49 +08:00
-LAN-
6b0de08157
fix(validation): allow to use 0 in the inputs form (#10255) 2024-11-04 18:34:55 +08:00
-LAN-
61da0f08dd
refactor(validation): improve input validation logic (#10175) 2024-11-03 11:55:46 +08:00
luckylhb90
400392230b
fixed: variable reference error (#9722)
Co-authored-by: hobo.l <hobo.l@binance.com>
2024-10-23 19:17:06 +08:00
-LAN-
e61752bd3a
feat/enhance the multi-modal support (#8818) 2024-10-21 10:43:49 +08:00
Hash Brown
fa47f0c707
chore: disable chat service API passing parent_message_id (#8984) 2024-10-14 19:13:16 +08:00
takatost
29188e0562
chore: use cache instead of re-querying node record during workflow execution (#9280) 2024-10-12 17:48:59 +08:00
takatost
477beae3bb
fix: missing usage of metadata in the chatflow app (#9167) 2024-10-10 16:34:06 +08:00
Joe
e947103b6d
Feat/add workflow sys params (#9108)
Co-authored-by: Joel <iamjoel007@gmail.com>
2024-10-10 11:15:52 +08:00
chenxu9741
c531b4a911
fix: #8843 event: tts_message_end always return in api streaming resp… (#8846) 2024-09-29 16:13:20 +08:00
cherryhuahua
d0e0111f88
fix:Spark's large language model token calculation error #7911 (#8755) 2024-09-25 14:51:42 +08:00
haike-1213
4c7beb9d7b
fix: Assignment exception (#8663)
Co-authored-by: fum <fum@investoday.com.cn>
2024-09-23 15:23:52 +08:00
Hash Brown
8c51d06222
feat: regenerate in Chat, agent and Chatflow app (#7661) 2024-09-22 03:15:11 +08:00
Bowen Liang
a1104ab97e
chore: refurish python code by applying Pylint linter rules (#8322) 2024-09-13 22:42:08 +08:00
Bowen Liang
6613b8f2e0
chore: fix unnecessary string concatation in single line (#8311) 2024-09-13 14:24:49 +08:00