[PR #1097] [MERGED] feat: support optional query content #22890

Closed
opened 2026-02-21 20:19:59 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify/pull/1097
Author: @iamjoel
Created: 9/3/2023
Status: Merged
Merged: 9/9/2023
Merged by: @takatost

Base: mainHead: feat/generation-support-optional-query-content2


📝 Commits (10+)

  • 1724b87 feat: debug remove query content
  • 3535a7c feat: support var type paragraph
  • bff3bc1 chore: fiel
  • cb86a80 feat: var render support paragraph
  • 60f6ab0 feat: webapp support paragraph
  • 8d6ec9a feat: support clear
  • a6db3e6 fix: clearbtn style
  • 32e0ddf merge
  • d16460a fix: remove webapp query valid and i18n merge problem
  • a4ee769 Merge branch 'main' into feat/generation-support-optional-query-content2

📊 Changes

36 files changed (+548 additions, -290 deletions)

View changed files

📝 api/commands.py (+106 -3)
📝 api/constants/model_template.py (+12 -1)
📝 api/controllers/console/app/completion.py (+1 -1)
📝 api/controllers/console/explore/completion.py (+1 -1)
📝 api/controllers/service_api/app/completion.py (+1 -1)
📝 api/controllers/web/completion.py (+1 -1)
📝 api/core/model_providers/models/llm/base.py (+1 -1)
📝 api/core/prompt/generate_prompts/baichuan_chat.json (+1 -1)
📝 api/core/prompt/generate_prompts/common_chat.json (+1 -1)
📝 api/services/app_model_config_service.py (+2 -2)
📝 api/services/completion_service.py (+3 -3)
📝 web/app/components/app/configuration/config-var/config-modal/index.tsx (+19 -14)
📝 web/app/components/app/configuration/config-var/config-modal/style.module.css (+0 -0)
📝 web/app/components/app/configuration/config-var/config-string/index.tsx (+14 -2)
📝 web/app/components/app/configuration/config-var/index.tsx (+2 -2)
📝 web/app/components/app/configuration/config-var/input-type-icon.tsx (+8 -0)
📝 web/app/components/app/configuration/config-var/select-type-item/index.tsx (+56 -26)
📝 web/app/components/app/configuration/config-var/select-type-item/style.module.css (+4 -3)
📝 web/app/components/app/configuration/debug/index.tsx (+0 -9)
📝 web/app/components/app/configuration/index.tsx (+8 -1)

...and 16 more files

📄 Description

⚠️ [BREAKING CHANGE] ⚠️

  • The fixed parameters of the Query content in the text generation application have been removed. Users can freely add any variables in the prompt, instead of appending the content of the query content at the end.
  • The query parameter in the POST /v1/completion-messages endpoint of the App OpenAPI is expected to be completely removed in 3 months. Currently, it's optional and the parameter in API documentation has already been removed.

To ensure that the previous applications can still function properly after removing the fixed parameters in the query content of the text generation application, we need to execute a command to fix the data:

Migration Guide

  1. Enter the Docker Container: Before running the migration script, you need to enter the Docker container where your application is running. Use the following command:

    docker exec -it docker-api-1 bash
    
  2. Run the Migration Script: Once inside the container, execute the following migration command. The migration script can be executed multiple times without side effects:

    # --batch-size: Specifies the number of records migrated per batch, default is 500
    flask update_app_model_configs --batch-size=500
    

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langgenius/dify/pull/1097 **Author:** [@iamjoel](https://github.com/iamjoel) **Created:** 9/3/2023 **Status:** ✅ Merged **Merged:** 9/9/2023 **Merged by:** [@takatost](https://github.com/takatost) **Base:** `main` ← **Head:** `feat/generation-support-optional-query-content2` --- ### 📝 Commits (10+) - [`1724b87`](https://github.com/langgenius/dify/commit/1724b874ab62d3668759bd53dcbe26be0f130568) feat: debug remove query content - [`3535a7c`](https://github.com/langgenius/dify/commit/3535a7ceb6a2a58387aa8ce2def67dc69cf05bc1) feat: support var type paragraph - [`bff3bc1`](https://github.com/langgenius/dify/commit/bff3bc190de32f10e4bef37e73009b5c0c0efc40) chore: fiel - [`cb86a80`](https://github.com/langgenius/dify/commit/cb86a80c24c810048b8f83e5de3b3ca837176d5e) feat: var render support paragraph - [`60f6ab0`](https://github.com/langgenius/dify/commit/60f6ab03814eaa9d72f1c52679f2e575efab6fe6) feat: webapp support paragraph - [`8d6ec9a`](https://github.com/langgenius/dify/commit/8d6ec9aa6897ba0a2b1b4e9f80bff23f0ca53913) feat: support clear - [`a6db3e6`](https://github.com/langgenius/dify/commit/a6db3e65ac24b7054ba59e8ddc944f57fa00bfd4) fix: clearbtn style - [`32e0ddf`](https://github.com/langgenius/dify/commit/32e0ddf185b0b7a691105b4a4ad2edae6a46d431) merge - [`d16460a`](https://github.com/langgenius/dify/commit/d16460ac2dac65eda4dcb913c5e899dc8ca4a6db) fix: remove webapp query valid and i18n merge problem - [`a4ee769`](https://github.com/langgenius/dify/commit/a4ee769f28df74489f2680379916a9323a34af2c) Merge branch 'main' into feat/generation-support-optional-query-content2 ### 📊 Changes **36 files changed** (+548 additions, -290 deletions) <details> <summary>View changed files</summary> 📝 `api/commands.py` (+106 -3) 📝 `api/constants/model_template.py` (+12 -1) 📝 `api/controllers/console/app/completion.py` (+1 -1) 📝 `api/controllers/console/explore/completion.py` (+1 -1) 📝 `api/controllers/service_api/app/completion.py` (+1 -1) 📝 `api/controllers/web/completion.py` (+1 -1) 📝 `api/core/model_providers/models/llm/base.py` (+1 -1) 📝 `api/core/prompt/generate_prompts/baichuan_chat.json` (+1 -1) 📝 `api/core/prompt/generate_prompts/common_chat.json` (+1 -1) 📝 `api/services/app_model_config_service.py` (+2 -2) 📝 `api/services/completion_service.py` (+3 -3) 📝 `web/app/components/app/configuration/config-var/config-modal/index.tsx` (+19 -14) 📝 `web/app/components/app/configuration/config-var/config-modal/style.module.css` (+0 -0) 📝 `web/app/components/app/configuration/config-var/config-string/index.tsx` (+14 -2) 📝 `web/app/components/app/configuration/config-var/index.tsx` (+2 -2) 📝 `web/app/components/app/configuration/config-var/input-type-icon.tsx` (+8 -0) 📝 `web/app/components/app/configuration/config-var/select-type-item/index.tsx` (+56 -26) 📝 `web/app/components/app/configuration/config-var/select-type-item/style.module.css` (+4 -3) 📝 `web/app/components/app/configuration/debug/index.tsx` (+0 -9) 📝 `web/app/components/app/configuration/index.tsx` (+8 -1) _...and 16 more files_ </details> ### 📄 Description ## ⚠️ [BREAKING CHANGE] ⚠️ - The fixed parameters of the `Query content` in the text generation application have been removed. Users can freely add any variables in the prompt, instead of appending the content of the query content at the end. - The `query` parameter in the `POST /v1/completion-messages` endpoint of the App OpenAPI is expected to be completely removed in 3 months. Currently, it's optional and the parameter in API documentation has already been removed. To ensure that the previous applications can still function properly after removing the fixed parameters in the query content of the text generation application, we need to execute a command to fix the data: ### Migration Guide 1. **Enter the Docker Container**: Before running the migration script, you need to enter the Docker container where your application is running. Use the following command: ```shell docker exec -it docker-api-1 bash ``` 2. **Run the Migration Script**: Once inside the container, execute the following migration command. The migration script can be executed multiple times without side effects: ```shell # --batch-size: Specifies the number of records migrated per batch, default is 500 flask update_app_model_configs --batch-size=500 ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-21 20:19:59 -05:00
yindo closed this issue 2026-02-21 20:19:59 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#22890