Commit Graph

3525 Commits

Author SHA1 Message Date
Bowen Liang 0ac889ee63 feat: enable Redis client-side caching (#19493) 2025-05-12 09:34:25 +08:00
LeanDeR e482628adf refactor(workflow): revamp logging module for loop & iteration nodes (#19484) 2025-05-12 09:32:41 +08:00
湛露先生 a3070a643e Revert "sort extensions for review," (#19496) 2025-05-11 16:57:13 +08:00
湛露先生 0c630f485f sort extensions for review, (#19470)
Signed-off-by: zhanluxianshen <zhanluxianshen@163.com>
2025-05-10 20:01:31 +08:00
crazywoola 0f420f2ede fix: db.session.query(TenantAccountJoin) (#19482) 2025-05-10 04:43:56 -07:00
湛露先生 9932f338e8 clean rag word_extractor. (#19397)
Signed-off-by: zhanluxianshen <zhanluxianshen@163.com>
2025-05-09 16:39:16 +08:00
-LAN- e98f7d88b7 test(vdb/huaweicloudvectordb): Fix the wrong import path (#19413)
Signed-off-by: -LAN- <laipz8200@outlook.com>
2025-05-09 16:37:59 +08:00
Yuichiro Utsumi 478c0ae8f1 fix: fix pypdfium2 version to 4.30.0 (#19443)
Signed-off-by: Yuichiro Utsumi <utsumi.yuichiro@fujitsu.com>
2025-05-09 16:23:20 +08:00
非法操作 6ca9bebe48 fix: TenantAccountJoin has no attribute 'query' (#19445) 2025-05-09 16:20:32 +08:00
-LAN- 8b04d4e3f2 refactor(models): Use the SQLAlchemy base model. (#19435)
Signed-off-by: -LAN- <laipz8200@outlook.com>
2025-05-09 13:52:05 +08:00
-LAN- f822747f97 Revert "perf: optimizing db WorkflowAppLog index" (#19432) 2025-05-09 13:51:57 +08:00
-LAN- 9effb3fea0 test(test_dify_config): Update test to use example environment file (#19427)
Signed-off-by: -LAN- <laipz8200@outlook.com>
2025-05-09 11:42:51 +08:00
Bowen Liang d4b89bdde2 chore: bump pydantic to 2.11 and pydantic-settings to 2.9 (#15049) 2025-05-08 17:39:51 +08:00
Will 562ef031d0 fix: inconsistent metadata definitions (#19343) 2025-05-08 16:33:28 +08:00
Yeuoly 4f6d9df81b Feat/add repo to plugin manifest (#19337) 2025-05-07 17:28:38 +08:00
Will 586983272d fix: llm_usage.total_tokens stat (#19177) 2025-05-07 16:42:49 +08:00
Will c1d8ad7b5d fix: metadata filtering condition variable unassigned; fix External K… (#19208) 2025-05-07 14:52:09 +08:00
AichiB7A cff574d683 [Observability] Update counter to include http method and target (#19297)
Co-authored-by: QuantumGhost <obelisk.reg+git@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-07 09:17:26 +08:00
-LAN- e85ddde41c refactor: Remove RepositoryFactory (#19176)
Signed-off-by: -LAN- <laipz8200@outlook.com>
2025-05-06 21:14:51 +08:00
QuantumGhost a1f9fd723c fix(api): fix alembic offline mode (#19285)
Alembic's offline mode generates SQL from SQLAlchemy migration operations,
providing developers with a clear view of database schema changes without
requiring an active database connection.

However, some migration versions (specifically bbadea11becb and d7999dfa4aae)
were performing database schema introspection, which fails in offline mode
since it requires an actual database connection.

This commit:
- Adds offline mode support by detecting context.is_offline_mode()
- Skips introspection steps when in offline mode
- Adds warning messages in SQL output to inform users that assumptions were made
- Prompts users to review the generated SQL for accuracy

These changes ensure migrations work consistently in both online and offline modes.

Close #19284.
2025-05-06 18:05:19 +08:00
Good Wood 8552fcbb2a feat: add mode for /info api (#19264) 2025-05-06 13:24:53 +08:00
Novice 1641439319 fix(structured-output): reasoning model's json format parsing (#19261) 2025-05-06 13:16:08 +08:00
Bowen Liang 5a3baa271f chore: avoid repeated type ignore noqa by adding flask_restful and flask_login in mypy import exclusions (#19224) 2025-05-06 11:58:49 +08:00
Yeuoly 1a05f3bf53 fix(api): add missing INNER_API_KEY to InnerAPIConfig (#19166) 2025-05-06 10:02:14 +08:00
kenwoodjw a1d3026ac5 fix basic auth if not base64 encode (#19242)
Signed-off-by: kenwoodjw <blackxin55+@gmail.com>
2025-05-06 09:18:37 +08:00
Bowen Liang 1e39a3dce3 fix: support non-ascii charactors in filename of the tool files (#19228) 2025-05-06 09:18:11 +08:00
Bowen Liang e7bf16ab27 chore: required pip and performance improvment in mypy checks (#19225) 2025-05-06 09:16:43 +08:00
Hao Cheng 6a1434db92 fix: use only supported operators in metadata filter system prompts (#19195) 2025-05-03 20:08:08 +08:00
Will 59fe233202 fix: time type metadata filtering error (#19192) 2025-05-03 20:07:37 +08:00
Bowen Liang bbd9fd3a17 chore: bump celery from 5.4 to 5.5 (#19190) 2025-05-03 20:07:04 +08:00
Hao Cheng eeb4bf1eea fix: fix API tool integration test (#19187) 2025-05-01 14:49:43 +08:00
非法操作 9df51ddf21 fix: file name incorrect when download file (#19183) 2025-04-30 22:47:59 +08:00
QuantumGhost a1ffe78fc7 feat(api): Add image multimodal support for LLMNode (#17372)
Enhance `LLMNode` with multimodal capability, introducing support for
image outputs.

This implementation extracts base64-encoded images from LLM responses,
saves them to the storage service, and records the file metadata in the
`ToolFile` table. In conversations, these images are rendered as
markdown-based inline images.
Additionally, the images are included in the LLMNode's output as
file variables, enabling subsequent nodes in the workflow to utilize them.

To integrate file outputs into workflows, adjustments to the frontend code
are necessary.

For multimodal output functionality, updates to related model configurations
are required. Currently, this capability has been applied exclusively to
Google's Gemini models.

Close #15814.

Signed-off-by: -LAN- <laipz8200@outlook.com>
Co-authored-by: -LAN- <laipz8200@outlook.com>
2025-04-30 17:28:02 +08:00
Bowen Liang af7a907960 immediately return initialed tiktokenizer instance and remove dead code in usage of tiktokenizer (#17957) 2025-04-30 16:07:20 +08:00
-LAN- a482b6d088 feat: support remove first and remove last in variable assigner (#19144)
Signed-off-by: -LAN- <laipz8200@outlook.com>
2025-04-30 15:50:00 +08:00
Will 0abc9c2889 fix: inconsistent case expression in _process_metadata_filter_func (#19146) 2025-04-30 15:14:01 +08:00
kingpc 19e1688daa fix: metadata filter not work (#19020)
Co-authored-by: 金鹏程 <jinpengcheng01@corp.netease.com>
Co-authored-by: crazywoola <427733928@qq.com>
2025-04-30 11:06:03 +08:00
sondin 4270ffeb39 add Accept-Ranges header for audio/video files (#19119) 2025-04-30 10:51:27 +08:00
kenwoodjw 7212404f4c fix(api): resolve external knowledge API error due to excessive URL validation (#19003)
The `validators.url` method from the `validators==0.21.0` library enforces a
URL length limit of less than 90 characters, which led to failures in external
knowledge API requests for long URLs.

This PR addresses the issue by replacing `validators.url` with 
`urllib.parse.urlparse`, effectively removing the restrictive URL length check.

Additionally, the unused `validators` dependency has been removed.

Fixes #18981.

Signed-off-by: kenwoodjw <blackxin55+@gmail.com>
2025-04-29 22:32:38 +08:00
QuantumGhost 487b107e6f Enhance Code Consistency Across Repository with .editorconfig (#19023) 2025-04-29 18:04:33 +08:00
feiyang_deepnova e25e049371 Fix: the issue of getting empty environment variables. (#19085) 2025-04-29 18:01:11 +08:00
xiaotian 13511b567b fix: image preview triggers binary download (#19070) 2025-04-29 15:38:33 +08:00
Ahmad Zidan 62f98143c6 feat: add AWS Managed IAM auth for OpenSearch vector DB (#18963) 2025-04-29 15:10:08 +08:00
Ethan cb10db5f45 feat: support access milvus with token (#19034) 2025-04-29 14:52:13 +08:00
Panpan 97a92f2fc7 fix: fix rerank model runner usage (#19008) 2025-04-29 14:51:21 +08:00
Ganondorf c0935d77b5 feat(api): use json_repair to fix invalid json while generating structured output (#18977)
When generating JSON schema using an LLM in the structured output feature,
models may occasionally return invalid JSON, which prevents clients from correctly 
parsing the response and can lead to UI breakage.

This commit addresses the issue by introducing `json_repair` to automatically 
fix invalid JSON strings returned by the LLM, ensuring smoother functionality 
and better client-side handling of structured outputs.


Co-authored-by: lizb <lizb@sugon.com>
2025-04-29 12:39:13 +08:00
Kevin9703 c0bf6d03e0 fix(workflow_cycle_manage): failed nodes were not updated in workflow_node_executions (#18994) 2025-04-29 10:31:08 +08:00
Novice 1e038f6480 test(graph-engine-test): modify the assert condition (#19041) 2025-04-29 09:51:42 +08:00
kurokobo 8b1ee452fd feat: clean up message_files table first before proceeding to find orphaned files (#19035) 2025-04-29 08:57:42 +08:00
-LAN- bf95e73604 refactor: switch to dynamic versioning in package configuration (#19019)
Signed-off-by: -LAN- <laipz8200@outlook.com>
2025-04-28 19:51:50 +08:00