🌟 What's New in v1.3.0 🌟
Hey tech fam, welcome to version 1.3.0! We've been grinding to bring in some slick enhancements, bug fixes, and new capabilities. Let’s dig into what’s freshly brewed:
🚀 New Features
-
Structured Output in LLM Node: We've introduced structured output support for the LLM Node. This means your language models can now return neatly organized and easily processable data. Backend implementation by @Nov1c444 in #17877 and frontend magic by @iamjoel in #17994 ensure this feature is seamless and powerful for developers.
Check out our intro video for more details: Dify's Structured Output: Make AI Agent chat with API easier -
Never Miss a Plugin Update: Our new feature ensures you're always in the loop. When a new version of a plugin drops, you'll see a clear indicator right in the UI. This keeps your environment up-to-date and running smoothly, thanks to @Yeuoly in #17695.
-
Token Counting Made Easy: We've tweaked the default token counting rules. Now, if your provider doesn't return token usage, we'll default to using 0. However, if you'd like to estimate using the tokenizer, you can set
PLUGIN_BASED_TOKEN_COUNTING_ENABLED=true
. Heads up, this might impact performance, detailed by @laipz8200 in #17706. -
Workflow Export Delight: Ever wanted to share your workflow effortlessly? You can now export it as an image with the slick new feature from @ACAne0320 in #17904.
-
Mermaid Analysis Gets Smarter: Optimization magic was done on Mermaid by @charli117 in #18089 for all you diagram enthusiasts out there.
🛠️ Enhancements
-
Python Package Manager Upgrade: We made a significant switch from poetry to uv as our Python package manager. This speeds up operations, minimizes merge conflicts, and streamlines our development process. Huge thanks to @bowenliang123 for leading this transition in #16317.
-
Slick Shortcuts & Indicators: Consistent keyboard shortcut support and handy visual indicators have been rolled into all app creation dialogs thanks to @ACAne0320 in #17138. Speed and efficiency now go hand in hand.
-
Observability on Steroids: Integrated OpenTelemetry for better observability in workflows by @TedaLIEz in #17627 and beefed it up with HTTP metrics in HTTP response handling.
-
Type Safety Surge: Massive improvements on type safety in components like
PluginList
by @samuel871211 in #17498. Our internals are as tight as ever!
🐛 Bug Fixes
-
Style & Layout Wrinkles Ironed: Various layout and style improvements across components to improve readability and consistency, mostly spearheaded by @ZeroZ-lab and pals.
-
Fixing the Fixables: Squashed bugs such as the pesky workflow run panel resizing issue and a couple of others like clickjacking prevention thanks to @hjlarry and @iamjoel.
-
Error-Free Conversations: Fixed the conversation log issue that could throw a 500 error. Clean data for sweet conversation flow is the norm again.
🌐 Language & Locale Updates
-
Japanese Touch-Ups: Some timely translation updates and locale param support by @t-daisuke for plugins. Quick ‘Yoro-shiku’ to our Japanese community!
-
German Date Format Tweak: Corrected an unsupported date format issue, courtesy of @haocheng6 ensuring German precision.
🔧 Chores & Docs Love
- Git Workflow Optimization: Speedier git checkouts by shaving off unnecessary layers — kudos to @bowenliang123 in #18103 for the efficiency boost.
That’s a wrap, people! Enjoy exploring v1.3.0's new dimensions and as always, stay curious and keep building. Cheers! 🚀✨
Upgrade Guide
Docker Compose Deployments
-
Back up your customized docker-compose YAML file (optional)
cd docker cp docker-compose.yaml docker-compose.yaml.$(date +%s).bak
-
Get the latest code from the main branch
git checkout main git pull origin main
-
Stop the service. Please execute in the docker directory
docker compose down
-
Back up data
tar -cvf volumes-$(date +%s).tgz volumes
-
Upgrade services
docker compose up -d
Source Code Deployments
-
Stop the API server, Worker, and Web frontend Server.
-
Get the latest code from the release branch:
git checkout 1.3.0
-
Update Python dependencies:
cd api uv sync
-
Then, let's run the migration script:
uv run flask db upgrade
-
Finally, run the API server, Worker, and Web frontend Server again.
What's Changed
- refactor: add API endpoint to list latest plugin versions and query it in asynchronous way by @Yeuoly in #17695
- chore: hide eslint complexity warning by @iamjoel in #17698
- fix segment query index not effect by @JohnJyong in #17704
- fix: Check collection exists before drop it. by @wlleiiwang in #17692
- fix : PLUGIN_S3_USE_AWS_MANAGED_IAM AND PLUGIN_S3_USE_PATH_STYLE … by @quicksandznzn in #17702
- revert batch query by @JohnJyong in #17707
- feat(large_language_model): Adds plugin-based token counting configuration option by @laipz8200 in #17706
- fix: docker compose plugin s3 config default value by @quicksandznzn in #17722
- Fix create blank app by @ZeroZ-lab in #17724
- Chore/slice workflow utils by @zxhlyh in #17730
- fix: 17712-get-messages-api-encountered-internal-server-error by @crazywoola in #17716
- fix: Enhance error handling and retry logic in Apps component by @ZeroZ-lab in #17733
- enhance guessing mimetype of tool file by @QunBB in #17640
- feat: add search params to url by @WTW0313 in #17684
- Add and modify jp translation by @HanqingZ in #17748
- fix: fix inputs lost by @ModyQyW in #17747
- feat: add consistent keyboard shortcut support and visual indicators across all app creation dialogs by @ACAne0320 in #17138
- fix: adjust spacing in ViewHistory and Panel components by @WTW0313 in #17766
- chore: skip document segments fetching with non-existed dataset of DatasetDocument in add_document_to_index_task task by @bowenliang123 in #17784
- Feat: workflow dark mode by @JzoNgKVO in #17785
- hotfix: Workflow page element warning problem #17787 by @Jimmiaxie in #17789
- fix: parallel id caused append to wrong branch by @iamjoel in #17794
- create db if not exists by @wlleiiwang in #17796
- fix: return null url when upload local file by @izon-masuara in #17752
- robust for json parser by @zxfishhack in #17687
- fix: make prompt consistent with few-show examples by @xu-song in #11538
- chore: remove non-existed extra msg for unstructured package by @bowenliang123 in #17670
- chore: Modify watercrawl translation in en-US and zh-Hans by @chairc in #17828
- fix: text.split by @crazywoola in #17842
- fix: run button disappeared when where is no inputs in form by @douxc in #17854
- feat: add optional search parameters to dataset query templates i by @ZeroZ-lab in #17857
- fix: do not submit value when file input is optional by @JzoNgKVO in #17861
- enhance(plugin): replace json.loads with Pydantic model_validate_json by @Yeuoly in #17867
- fix: in variable settings, use Textarea to replace Input. by @LeeeeeeM in #17864
- fix: autocorrect everything in api by @yihong0618 in #17859
- fix: fix file number limit error by @LeeeeeeM in #17848
- Fix external knowledge Issues: (#17685) by @briqt in #17843
- fix: add annotation ctrl button for annotation add by @JzoNgKVO in #17873
- Update the model modal:position the scrollbar further inside the modal by @maoguy in #17672
- fix: adjust margin in DatasetCard component for better layout by @ZeroZ-lab in #17879
- fix: refactor SVG icon handling logic and optimize event listener management in embed.js to support mobile browsers #16719 by @zwq357smile in #16717
- [Observability] Integrate OpenTelemetry by @TedaLIEz in #17627
- feat: re-add prompt messages to result and chunks in llm by @laipz8200 in #17883
- refactor(api): Enhance error handling in BasePluginManager by @QuantumGhost in #17887
- Chore/add unit test for utils by @WTW0313 in #17858
- fix: published workflow(tool) can be deleted. by @laipz8200 in #17900
- Remove dead code by @hyongtao-db in #17899
- fix: start the plugin daemon after the database has become healthy by @kurokobo in #17928
- fix: fix wrong layer adding customized tools by @CorrectRoadH in #17937
- refactor & perf: improve type safety of component
PluginList
by @samuel871211 in #17498 - refactor & perf of files
datesets/Doc.tsx
andtemplate.xx.mdx
by @samuel871211 in #17951 - fix: TypeError: a.variable_selector.join is not a function by @crazywoola in #17950
- fix(api): Some params were ignored when creating empty Datasets through API by @jasonfish568 in #17932
- style(retry-on-node): add margin-bottom to the container by @ZeroZ-lab in #17972
- feat: added export workflow as img by @ACAne0320 in #17904
- Chore/cleanup warnings by @crazywoola in #17974
- chore: eslint add sonar by @iamjoel in #17989
- fix(langfuse): qusetion classify node can't see cost in langfuse by @Nov1c444 in #17982
- Feat: dataset dark mode by @JzoNgKVO in #17993
- fix chat message type error by @kenwoodjw in #17997
- refactor: type improvements that doesn't modify functionality by @samuel871211 in #17970
- fix(docs): update API documentation to replace 'Params' with 'Path' by @ZeroZ-lab in #18004
- fix(typo): workflow ops triggered from by @Nov1c444 in #18019
- feat: plugin tool selector add tool default description by @junjiem in #18018
- feat: add minimum dify version requirement to plugins by @Yeuoly in #18022
- fix: Prevents duplicate logs from SQLAlchemy engine by @laipz8200 in #18024
- fix basic auth encoding by @kenwoodjw in #18047
- [Observability] Instrument with celery by @TedaLIEz in #18029
- fix: plugin parameter type TOOLS_SELECTOR parameter not validation required by @junjiem in #18060
- fix: cot agent chinese json bug by @huangzhuo1949 in #18073
- feat: edit question in Chat by @xuzuodong in #17961
- fix: plugin parameter aws_secret_key parameter not found by @mousemin in #18075
- ignore errors when creating duplicate indexes by @spyyang in #18069
- Feat: api page dark mode by @JzoNgKVO in #18078
- build: introduce uv as Python package manager by @bowenliang123 in #16317
- feat: add base path to resources by @diuwu in #17655
- feat: implement blob chunk handling in plugin manager by @Yeuoly in #18101
- chore: speed up git checkout by removing fetch-depth 0 to avoid pulling all tags and branches by @bowenliang123 in #18103
- chore: merge lint dependency group into dev group of python packages by @bowenliang123 in #18088
- fix: start api and worker after the database has become healthy by @kurokobo in #18109
- fix: cannot regenerate with image(#15060) by @Jimmy0769 in #16611
- chore: remove unused poetry.toml by @bowenliang123 in #18112
- [Unit Test] Generate coverage number for UT by @TedaLIEz in #18106
- Feat/change split length method by @JohnJyong in #18097
- feat: add red corner mark to Badge component for marketplace plugins by @Yeuoly in #18162
- feat: add PATCH method support in Heading component by @ZeroZ-lab in #18160
- fix dataset api retrieval model null handling by @kenwoodjw in #18151
- feat: add switches for jina firecrawl watercrawl by @crazywoola in #18153
- Http requests node add ssl verify by @ZombieBlue in #18125
- chore: Reorganizes test file structure by @laipz8200 in #18155
- fix:the extraction function of the list operation node received 0 that should not be received by @leslie2046 in #18170
- fix: agent strategy string type parameter default value invalid by @junjiem in #18185
- feat: agent strategy parameter add help information by @junjiem in #18192
- Fix:style of opening questions by @JzoNgKVO in #18194
- fix: page/limit param not effective by @ACAne0320 in #18196
- fix: ruff check isoparse by @jiangbo721 in #18033
- fix: implement robust file type checks to align with existing logic by @lrhan321 in #17557
- fix: create child chunk by @devxing in #18209
- feat: fetch app info in plugins by @Yeuoly in #18202
- feat: improve embedding sys.user_id and conversion id info usage by @ModyQyW in #18035
- fix(fail-branch): prevent streaming output in exception branches by @Nov1c444 in #17153
- Add the parameter appid to apiserver by @AAirLin in #18224
- fix: change the method of update_dataset api in document by @chen622 in #18197
- Add analyzer_params config for milvus vectordb by @rainsoft in #18180
- fix(follow_ups): handle empty LLM responses in context by @Nov1c444 in #18237
- fix: Could not load the logo of workflow as Tool in Agent Node by @iamjoel in #18243
- style: add left padding to editor component and remove unused CSS by @ZeroZ-lab in #18247
- feat: add a abstract layer for WorkflowNodeExcetion by @laipz8200 in #18026
- Fix ORDER BY (score, id) error in api/core/rag/datasource/vdb/analyticdb/analyticdb_vector_sql.py line 249 by @rainsoft in #18252
- fix: Access the text-generation app's API doc error by @crazywoola in #18278
- If the DSL version is less than 0.1.5, it causes errors in an intranet environment. by @gaoyue1989 in #18273
- fix: perferred model provider not match with provider. by @laipz8200 in #18282
- fix: update retrieval_model documentation by @ZeroZ-lab in #18289
- fix: invalid new tool call creation logic during response handling in OAI-Compat model by @ExenVitor in #17781
- fix(typing): validate OAuth code before processing access token by @Yeuoly in #18288
- datasets api create-by-file add reranking_mode properties by @wisty in #18300
- fix retrival resource miss in chatflow by @JohnJyong in #18307
- make repository type be private by @ZombieBlue in #18304
- fix: curl request address by @devxing in #18320
- fix: Correctly render multiple think blocks in Markdown by @xuzijie1995 in #18310
- Diable expire_on_commit in the implemention of the WorkflowNodeExecut… by @ZombieBlue in #18321
- fix: missing headers in some cases by @hbprotoss in #18283
- fix: can not input R when debug by @crazywoola in #18323
- Fix: ValueError: Formatting field not found in record: 'req_id' by @realethanhsu in #18327
- Chore/slice workflow by @zxhlyh in #18351
- feat/TanStack-Form by @WTW0313 in #18346
- fix: Adjust span height and alignment in WorkplaceSelector component by @ZeroZ-lab in #18361
- Switching from CONSOLE_API_URL to FILES_URL in word_extractor.py by @rainsoft in #18249
- feat: structured output by @Nov1c444 in #17877
- feat: llm support struct output by @iamjoel in #17994
- fix: reset_password security issue by @GareArc in #18363
- fix: update reset password token when email code verify success by @douxc in #18364
- Add docker environment variable PIP_MIRROR_URL for sandbox by @xiaoyesoso in #18371
- refactor: Refactors workflow node execution handling by @laipz8200 in #18382
- fix: correct icons for gpt-4 series from non-openai providers by @kurokobo in #18387
- Feat/music annotation by @crazywoola in #18391
- fix: styles and missing imports by @crazywoola in #18396
- Fix: agent app debug re-rendering issue by @fdb02983rhy in #18389
- fix: bump the minimal node requirement to fix eslint fail by @CorrectRoadH in #17938
- feat: update privacy policy URL and add validation for privacy policy link by @realethanhsu in #18422
- fix: correct unsupported German date format on document list page by @haocheng6 in #18426
- "fix: Changed the translated text from '障害者' (#18427)" by @t-daisuke in #18438
- fix: update Japanese translation for 'from' in plugin.ts to improve c… by @t-daisuke in #18449
- fix: translate 'back' to '戻る' in Japanese plugin localization by @t-daisuke in #18444
- fix: update Japanese translation for document link in plugin.ts, translation for "endpointsDocLink" label by @t-daisuke in #18446
- fix: handle array item type error in struct output by @iamjoel in #18452
- fix weird syntax error by @IthacaDream in #18454
- fix(promptMessage): correct field_serializer implementation for content serialization by @Nov1c444 in #18458
- fix: update Japanese translation for 'switchVersion' in plugin.ts to … by @t-daisuke in #18469
- Update Oracle db connection library and change connection pool to single connection by @tmuife in #18466
- Fix: json update in conversation variable by @JzoNgKVO in #18483
- fix: cannot delete workflow version if other version is published as a tool by @laipz8200 in #18486
- fix: update document link based on client locale by @ZeroZ-lab in #18493
- fix(markdown): correctly render links with inline code by @theresasogunle in #18500
- fix: fix workflow as a tool confirm dialog layout issue by @WTW0313 in #18494
- fix: filter empty marketplace collection by @zxhlyh in #18511
- fix: adjust padding and background for sticky header by @ZeroZ-lab in #18515
- feat(embedded-chatbot): support overriding locale via URL params by @marcelodiaz558 in #18509
- fix: update search model placeholder and add translations f by @ZeroZ-lab in #18518
- feat: add search input field by @441126098 in #18409
- fix: external knowledge setting in knowledge selector by @zxhlyh in #18519
- fix draft run node exception by @hjlarry in #18520
- feat: support huawei cloud vector database by @ElvisLiu1994 in #16141
- feat[plugin]:The plugin upload file change to be stored as a toolfile… by @Gevtolev in #18277
- Mermaid analysis optimization by @charli117 in #18089
- support load .env config from nacos by @shiyiyue1102 in #18186
- [Observability] feat: add metrics of http response by @TedaLIEz in #18499
- refactor: improve layout and structure of ProviderDetail component by @ZeroZ-lab in #18523
- chore: remove useless frontend code file by @junjiem in #18532
- docs: replace outdated Enterprise inquiry link with a new one by @ielseu in #18528
- fix: Validates session factory type in repository by @laipz8200 in #18497
- fix: Patch OpenTelemetry to handle None tokens by @laipz8200 in #18498
- docs: update enterprise inquiry links across all README language variants by @ielseu in #18541
- fix can't resize workflow run panel by @hjlarry in #18538
- fix conversation log raise 500 by @hjlarry in #18534
- fix: Update prompt message content types to use Literal and add union type for content by @zalcit in #17136
- fix: clickjacking by @iamjoel in #18516
- check metadata_filtering_conditions could be None in auto mode by @JohnJyong in #18548
- fix: select struct output root object show the wrong type by @iamjoel in #18582
- fix: handle PluginPermissionDeniedError in EndpointCreateApi by @Yeuoly in #18597
- fix: add composer configuration and delete DifyClient->file_client by @jayeeliu in #18574
- fix#18595: update workflow duplicate env variable name by @onlysyz in #18596
- chore: Updates version numbers for upcoming release by @laipz8200 in #18550
New Contributors
- @zxfishhack made their first contribution in #17687
- @chairc made their first contribution in #17828
- @briqt made their first contribution in #17843
- @zwq357smile made their first contribution in #16717
- @CorrectRoadH made their first contribution in #17937
- @mousemin made their first contribution in #18075
- @spyyang made their first contribution in #18069
- @diuwu made their first contribution in #17655
- @Jimmy0769 made their first contribution in #16611
- @ZombieBlue made their first contribution in #18125
- @devxing made their first contribution in #18209
- @AAirLin made their first contribution in #18224
- @chen622 made their first contribution in #18197
- @rainsoft made their first contribution in #18180
- @gaoyue1989 made their first contribution in #18273
- @ExenVitor made their first contribution in #17781
- @wisty made their first contribution in #18300
- @xuzijie1995 made their first contribution in #18310
- @hbprotoss made their first contribution in #18283
- @xiaoyesoso made their first contribution in #18371
- @t-daisuke made their first contribution in #18438
- @theresasogunle made their first contribution in #18500
- @441126098 made their first contribution in #18409
- @ElvisLiu1994 made their first contribution in #16141
- @shiyiyue1102 made their first contribution in #18186
- @ielseu made their first contribution in #18528
- @zalcit made their first contribution in #17136
- @jayeeliu made their first contribution in #18574
- @onlysyz made their first contribution in #18596
Full Changelog: 1.2.0...1.3.0