github langgenius/dify 1.4.0
v1.4.0

latest releases: 2.0.0-beta.1, 1.8.1, 1.8.0...
3 months ago

๐ŸŒŸ What's New in v1.4.0? ๐ŸŒŸ

๐ŸŽ‚ Dify turns 2! New look, new brand, same mission.

Imagine if every idea could become an AI agent. With Dify, โ€˜ifโ€™ you can ask it, you can build it.

Check out the new Dify.AI and start building your if today.

๐Ÿš€ New Features & Enhancements

features

๐ŸŒ™ Dark Mode

Weโ€™ve rolled out a theme switcher that allows you to easily toggle between light and dark modes, perfect for those late-night coding sessions. Click your avatar to experience it! This feature helps reduce eye strain and allows you to customize your user interface to match your preference. Thanks to @JzoNgKVO in PR #18093 for making this possible.

๐Ÿ–ผ๏ธ Multi-Modal LLM Output

Our platform now supports multimodal outputs, allowing LLMs to handle both text and images within the LLMNode. This feature enhances the richness of data interaction and boosts your model's capabilities, courtesy of @QuantumGhost's efforts in PR #17372. You can now try these new features using the Gemini 2.0 Flash Exp model! This integration ensures that your AI can process and respond with both text and visual data seamlessly.

โœ๏ธ Editable Questions

Weโ€™ve added greater control over your questions, allowing them to be edited before they go live. This update ensures that you can tweak questions for clarity and relevance, as implemented by @HyaCiovo in PR #19117.

๐Ÿ”ง Bug Fixes and Improvements

  • Enhanced Redis Management: Support Redis client-side caching for optimized data handling (though itโ€™s disabled out-of-the-box), improving overall system performance. Credits to @bowenliang123 in PRs #19493 and #19524.

  • Robust Workflow Management: Addressed numerous inconsistencies and bugs in workflows, ensuring smoother, more reliable operations across the board. Our workflows can now handle node failures more gracefully, thanks to contributions from @Kevin9703 in PR #18994.

These features and improvements reflect the feedback from our amazing community and aim to elevate both usability and functionality. We hope these updates significantly enhance your user experience!

Big thanks to all contributors for steering this version forward. Happy experimenting! ๐Ÿ™Œ


Upgrade Guide

Docker Compose Deployments

  1. Back up your customized docker-compose YAML file (optional)

    cd docker
    cp docker-compose.yaml docker-compose.yaml.$(date +%s).bak
  2. Get the latest code from the main branch

    git checkout main
    git pull origin main
  3. Stop the service. Please execute in the docker directory

    docker compose down
  4. Back up data

    tar -cvf volumes-$(date +%s).tgz volumes
  5. Upgrade services

    docker compose up -d

Source Code Deployments

  1. Stop the API server, Worker, and Web frontend Server.

  2. Get the latest code from the release branch:

    git checkout 1.4.0
  3. Update Python dependencies:

    cd api
    uv sync
  4. Then, let's run the migration script:

    uv run flask db upgrade
  5. Finally, run the API server, Worker, and Web frontend Server again.


What's Changed

  • add MAX_TASK_PRE_CHILD for celery by @JohnJyong in #18985
  • remove unstructured api key check by @JohnJyong in #18989
  • refactor: switch to dynamic versioning in package configuration by @laipz8200 in #19019
  • feat: clean up message_files table first before proceeding to find orphaned files by @kurokobo in #19035
  • fixes: fix entrypoint script with missing environment variables by @fdb02983rhy in #19039
  • fix: fix embedded chatbot styles on a relatively wide screen by @ModyQyW in #19030
  • chore: Improve FILES_URL Configuration Comments by @fdb02983rhy in #19040
  • test(graph-engine-test): modify the assert condition by @Nov1c444 in #19041
  • fix(workflow_cycle_manage): failed nodes were not updated in workflow_node_executions by @Kevin9703 in #18994
  • chore: improve diagram picture of docker compose by @hjlarry in #19054
  • feat(api): use json_repair to fix invalid json while generate structured output by @ZombieBlue in #18977
  • fix(web): fix the wrong components usage(#18995) by @HyaCiovo in #19065
  • fix: fix rerank model runner usage by @ModyQyW in #19008
  • feat: support access milvus with token by @realethanhsu in #19034
  • feat: add AWS Managed IAM auth for OpenSearch vector DB by @lan666as in #18963
  • fix: remove redundant Mermaid graph direction enforcement by @haocheng6 in #19024
  • fix: image preview triggers binary download by @dimsky in #19070
  • fix: change provider should change the content by @crazywoola in #19075
  • Fix: the issue of getting empty environment variables. by @linfey90 in #19085
  • Enhance Code Consistency Across Repository with .editorconfig by @QuantumGhost in #19023
  • fix: Chinese input deletes extra character in Safari within Workspaces (#18193) by @kingsword09 in #19088
  • fix(api): resolve external knowledge API error due to excessive URL validation by @kenwoodjw in #19003
  • add Accept-Ranges header for audio/video files by @sondin in #19119
  • feat(logAndAnn): add control option for question editing feature by @HyaCiovo in #19117
  • fix: fix import LexicalErrorBoundary error by @LeeeeeeM in #19124
  • fix: metadata filter not work by @kingsant in #19020
  • fix: fix render undefined when text children is empty by @LeeeeeeM in #19135
  • fix(i18n): add functions to retrieve document and pricing page languages by @WTW0313 in #19142
  • fix: inconsistent case expression in _process_metadata_filter_func by @IthacaDream in #19146
  • feat: support remove first and remove last in variable assigner by @laipz8200 in #19144
  • immediately return initialed tiktokenizer instance and remove dead code in usage of tiktokenizer by @bowenliang123 in #17957
  • ci: add diff to lint ci by @yihong0618 in #17874
  • fix: mouse scrolling zooming can not function anymore by @junjiem in #19160
  • feat(api): Add image multimodal support for LLMNode by @QuantumGhost in #17372
  • fix: file name incorrect when download file by @hjlarry in #19183
  • fix: fix API tool integration test by @haocheng6 in #19187
  • feat: Plugin page related document supports multiple languages by @ACAne0320 in #19197
  • chore: bump celery from 5.4 to 5.5 by @bowenliang123 in #19190
  • fix: time type metadata filtering error by @IthacaDream in #19192
  • fix: use only supported operators in metadata filter system prompts by @haocheng6 in #19195
  • Fix appURL construction when basePath is empty by @osaimi in #19234
  • chore: required pip and performance improvment in mypy checks by @bowenliang123 in #19225
  • fix: support non-ascii charactors in filename of the tool files by @bowenliang123 in #19228
  • fix basic auth if not base64 encode by @kenwoodjw in #19242
  • Optimize the event handling and rendering logic of the component picker by @441126098 in #19232
  • fix(api): add missing INNER_API_KEY to InnerAPIConfig by @Yeuoly in #19166
  • fix: s.filter is not a function by @crazywoola in #19250
  • feat: sort variables in the selector by x axis for most recent order by @GeorgeCaoJ in #19243
  • Fix: optional input in batch run by @JzoNgKVO in #19257
  • chore: avoid repeated type ignore noqa by adding flask_restful and flask_login in mypy import exclusions by @bowenliang123 in #19224
  • Fix: hide view chat setting button when no inputs form by @JzoNgKVO in #19263
  • fix(structured-output): reasoning model's json format parsing by @Nov1c444 in #19261
  • feat: add mode for /info api by @LeeeeeeM in #19264
  • fix(web): add workspace selector overflow auto by @Bonfireee in #19265
  • Fix doc bug workflow by @bulang in #19269
  • Fix: update docs link by @AllenWriter in #19278
  • chore: enhance dev script robustness by determining the script directory by @iamrajhans in #19209
  • fix(api): fix alembic offline mode by @QuantumGhost in #19285
  • chore: slice workflow refresh draft hook by @zxhlyh in #19292
  • refactor: Remove RepositoryFactory by @laipz8200 in #19176
  • [Observability] Update counter to include http method and target by @TedaLIEz in #19297
  • clean docker compose env. by @zhanluxianshen in #19301
  • feat: store mcp_config when switch agent strategy by @LeeeeeeM in #19291
  • fix: metadata filtering condition variable unassigned; fix External Kโ€ฆ by @IthacaDream in #19208
  • fix: reopen switch to 'workflow orchestrate' menu in app detail page by @douxc in #19274
  • fix: llm_usage.total_tokens stat by @IthacaDream in #19177
  • feat: add optional hidden property to endpoint items and filter hidden endpoints in endpoint card by @Yeuoly in #19163
  • Feat/add repo to plugin manifest by @Yeuoly in #19337
  • Bug fix: Invalid edge connection data causes the page to crash. by @hzhufa in #19369
  • fix(web): Add unique instanceId & key for AgentStrategy component (#18053) by @HyaCiovo in #19386
  • fix: inconsistent metadata definitions by @IthacaDream in #19343
  • chore: bump pydantic to 2.11 and pydantic-settings to 2.9 by @bowenliang123 in #15049
  • fix(workflow): Fix the expand/collapse animation effect by @auxpd in #19398
  • fix: support text wrapping in buttons for long content by @DDDDD12138 in #19390
  • fix: chatbot reopen behabior on iOS by @GKTOKWR in #19406
  • test(test_dify_config): Update test to use example environment file by @laipz8200 in #19427
  • fix: support echart function option by @LeeeeeeM in #19424
  • Revert "perf: optimizing db WorkflowAppLog index" by @laipz8200 in #19432
  • refactor(models): Use the SQLAlchemy base model. by @laipz8200 in #19435
  • fix: TenantAccountJoin has no attribute 'query' by @hjlarry in #19445
  • fix: fix pypdfium2 version to 4.30.0 by @utsumi-fj in #19443
  • refactor(workflow): Improve layout structure in VersionHistoryPanel by @ZeroZ-lab in #19450
  • test(vdb/huaweicloudvectordb): Fix the wrong import path by @laipz8200 in #19413
  • clean rag word_extractor. by @zhanluxianshen in #19397
  • fix delete api response by @kenwoodjw in #19480
  • fix_invitation-link.tsx_url_more_basepath_bug by @gq957534377 in #19453
  • fix: db.session.query(TenantAccountJoin) by @crazywoola in #19482
  • chore: update edu version text by @zxhlyh in #19485
  • sort extensions for review, by @zhanluxianshen in #19470
  • Revert "sort extensions for review," by @zhanluxianshen in #19496
  • fix: agent log modal fails to open and the timer is not cleared (#18900) by @yangzheli in #19471
  • refactor(workflow): revamp logging module for loop & iteration nodes by @auxpd in #19484
  • feat: enable Redis client-side caching by @bowenliang123 in #19493
  • chore: remove image csp by @iamjoel in #19511
  • fix: use NextJS basePath and WEB_PREFIX to support custom prefix by @johnny0120 in #19497
  • fix: replace all dataset.Model.query to db.session.query(Model) by @hjlarry in #19509
  • chore: all model.query replace to db.session.query by @hjlarry in #19521
  • fix(web): able to enter Chinese characters in the view-form-dropdown by @fadeaway1680 in #19555
  • correct key to 'embedding_model_provider' in docs by @osaimi in #19541
  • chore: disable redis client-side caching by default by @bowenliang123 in #19524
  • chore(pyproject.toml): Upgrade transformers and resend by @laipz8200 in #19562
  • chore: model.query change to db.session.query by @hjlarry in #19551
  • chore: speed up api service startup time by defering the imports for trace services by @bowenliang123 in #19504
  • Fix btns by @ZeroZ-lab in #19564
  • fix(config): Allow DB_EXTRAS to set search_path via options by @laipz8200 in #19560
  • add endpoint of get feedbacks by @ZombieBlue in #18697
  • fix(vector_service): Fixes type hinting and removes unnecessary ignores by @laipz8200 in #19574
  • Fix: typo ja translation by @KazuSh1geru in #19583
  • fix(web): fix the issue where the detail drawer content does not te after editing custom tools by @HyaCiovo in #19460
  • fix: common prerequisite node workflow remove reachable node that failed to streaming llmโ€ฆ by @SSebo in #19552
  • fix: invitations get suspended when an existing member appears by @GareArc in #19584
  • fix: image use not config host caused page crash by @iamjoel in #19590
  • chore: upgrade package version to fix security issue by @iamjoel in #19594
  • fix(web): Fix metadata modal component ๏ผˆ#19573๏ผ‰ by @HyaCiovo in #19592
  • chore: Update dependencies in pyproject.toml by @laipz8200 in #19598
  • fix: remove error message $ symbol by @jiangbo721 in #19587
  • fix: not set web prefix use default by @iamjoel in #19604
  • fix: premium badge styling by @nite-knite in #19609
  • fix: fix can't config Nth item in list Node by @LeeeeeeM in #19618
  • fix(web): optimize action buttons style in the question component by @yangzheli in #19626
  • Feat: add theme switcher by @JzoNgKVO in #18093
  • chore: add dev scripts to start api and worker service with uv run by @bowenliang123 in #19633
  • fix:#18447:When variables in the workflow are deleted or modified, it is impossible to visually identify subsequent node errors by @tinet-dongfb in #18554
  • Add /site API by @lexmin0412 in #19631
  • fix:fix log formatting field not found in record: 'req_id' by @rouxiaomin in #19575
  • Feat: add search params with theme in links of marketplace by @JzoNgKVO in #19648
  • feat: add index for workflow_conversation_variables.conversation_id by @laipz8200 in #19657
  • fix: close browser would reset to browser default language by @iamjoel in #19665
  • fix: Referencing Metadata in the response of the External Knowledge Aโ€ฆ (#19637) by @satohk in #19644
  • fix: auto translate failed when there is a new file in english by @iamjoel in #19671
  • fix: use different local may not load image by @iamjoel in #19693
  • refactor: simplify success response in dataset API endpoints by returning status code 204 directly by @ZeroZ-lab in #19685
  • Support for copying nodes between workflows (This feature is unrelated to remove functions. When using the copy function, the browser will permanently retain the last copied node)." by @FyhSky in #19687
  • feat(extension): support otel grpc exporter by @minimAluminiumalism in #19686
  • fix: The init_azure_openai() method in the core/hosting_configuration.py file doesn't work (#19704) by @zhaobingshuang in #19705
  • Revert "Support for copying nodes between workflows (This feature is unrelated to remove functions. When using the copy function, the browser will permanently retain the last copied node)."" by @crazywoola in #19708
  • fix: item data type wrong in iteration by @iamjoel in #19709
  • Fix: Ensure unique index names for pgvector knowledge tables by @k-kayashima in #19672
  • feat: update branding by @nite-knite in #19719
  • fix: handle EndpointSetupFailedError in BasePluginClient by @Yeuoly in #19613
  • chore: image allow "data:" in csp by @iamjoel in #19728
  • fix: broken behavior of rendering by @crazywoola in #19732
  • feat: update email templates by @nite-knite in #19739
  • fix: update background gradient and line positioning in Empty component by @WTW0313 in #19745
  • add: new brand image by @crazywoola in #19676
  • chore: Updates version numbers to 1.4.0 and related services by @laipz8200 in #19731
  • Fix: style of check list in dark mode by @JzoNgKVO in #19744
  • chore: upload describe image. by @laipz8200 in #19756
  • update readme by @crazywoola in #19757
  • Fix: style of dataset item in chatbot configure with theme dark by @JzoNgKVO in #19761
  • Fix TiDB vector configuration comment to correctly use 'tidb_vector' by @aryanraj2713 in #19767
  • revert: #18554 by @crazywoola in #19787

New Contributors

Full Changelog: 1.3.1...1.4.0

Don't miss a new dify release

NewReleases is sending notifications on new releases.