Skip to content

[elsa] fix(LlmNodeState): add conditional enableLog control and initialization#156

Merged
CodeCasterX merged 1 commit into
ModelEngine-Group:elsa-0.1.xfrom
RonnyChan96:elsa-0.1.x_compatible_with_lage_model_node_output
Jun 10, 2025
Merged

[elsa] fix(LlmNodeState): add conditional enableLog control and initialization#156
CodeCasterX merged 1 commit into
ModelEngine-Group:elsa-0.1.xfrom
RonnyChan96:elsa-0.1.x_compatible_with_lage_model_node_output

Conversation

@RonnyChan96

@RonnyChan96 RonnyChan96 commented Jun 10, 2025

Copy link
Copy Markdown
Contributor

🔗 相关问题 / Related Issue

Issue 链接 / Issue Link: #237

  • 我已经创建了相关 Issue 并进行了讨论 / I have created and discussed the related issue
  • 这是一个微小的修改(如错别字),不需要 Issue / This is a trivial change (like typo fix) that doesn't need an issue

📋 变更类型 / Type of Change

  • 🐛 Bug 修复 / Bug fix (non-breaking change which fixes an issue)
  • ✨ 新功能 / New feature (non-breaking change which adds functionality)
  • 💥 破坏性变更 / Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 文档更新 / Documentation update
  • 🔧 重构 / Refactoring (no functional changes)
  • ⚡ 性能优化 / Performance improvement
  • 🧹 代码清理 / Code cleanup

📝 变更目的 / Purpose of the Change

升级到社区版本后,老应用升级后无法打开编排页面,同时问题回答会回答两遍。该变更修复上述问题,增强了对enableLog的校验,大模型节点也默认增加了enableLog这个结构体。
After upgrading to the Community Edition, legacy applications fail to load the orchestration page post-upgrade while experiencing duplicate responses in Q&A outputs. This change fixes the aforementioned issues by:

  1. Enhancing validation for enableLog
  2. Adding the enableLog struct to LLM nodes by default

📋 主要变更 / Brief Changelog

  1. Conditional UI Rendering
    Checkbox for enableLog now only renders when enableLogData exists
    Prevents UI errors when logging functionality is unavailable
  2. Core Initialization
    New addEnableLog() method ensures enableLog parameter exists
    Defaults to true for new configurations
    Seamlessly integrates with existing parameter handling
  3. Enhanced Reliability
    Checks for existing enableLog before initialization
    Follows established patterns from other parameter ensure methods
    Preserves all existing process() workflow functionality

🧪 验证变更 / Verifying this Change

测试步骤 / Test Steps

  1. Create an application on the older version
  2. Upgrade the system version
  3. Open the application in the upgraded system
  4. The workflow page opens normally, and the output of the large model node during runtime will be printed to the chat page

测试覆盖 / Test Coverage

  • 我已经添加了单元测试 / I have added unit tests
  • 所有现有测试都通过 / All existing tests pass
  • 我已经进行了手动测试 / I have performed manual testing

📸 截图 / Screenshots

image

✅ 贡献者检查清单 / Contributor Checklist

请确保你的 Pull Request 符合以下要求 / Please ensure your Pull Request meets the following requirements:

基本要求 / Basic Requirements:

  • 确保有 GitHub Issue 对应这个变更(微小变更如错别字除外)/ Make sure there is a Github issue filed for the change (trivial changes like typos excluded)
  • 你的 Pull Request 只解决一个 Issue,没有包含其他不相关的变更 / Your PR addresses just this issue, without pulling in other changes - one PR resolves one issue
  • PR 中的每个 commit 都有有意义的主题行和描述 / Each commit in the PR has a meaningful subject line and body

代码质量 / Code Quality:

  • 我的代码遵循项目的代码规范 / My code follows the project's coding standards
  • 我已经进行了自我代码审查 / I have performed a self-review of my code
  • 我已经为复杂的代码添加了必要的注释 / I have commented my code, particularly in hard-to-understand areas

测试要求 / Testing Requirements:

  • 我已经编写了必要的单元测试来验证逻辑正确性 / I have written necessary unit-tests to verify the logic correction
  • 当存在跨模块依赖时,我尽量使用了 mock / I have used mocks when cross-module dependencies exist
  • 基础检查通过:mvn -B clean package -Dmaven.test.skip=true,elsa README 中的编译检查 / Basic checks pass
  • 单元测试通过:mvn clean install / Unit tests pass

文档和兼容性 / Documentation and Compatibility:

  • 我已经更新了相应的文档 / I have made corresponding changes to the documentation
  • 如果有破坏性变更,我已经在 PR 描述中详细说明 / If there are breaking changes, I have documented them in detail
  • 我已经考虑了向后兼容性 / I have considered backward compatibility

📋 附加信息 / Additional Notes


审查者注意事项 / Reviewer Notes:

@RonnyChan96 RonnyChan96 self-assigned this Jun 10, 2025
@RonnyChan96 RonnyChan96 added type: bug A general bug in: elsa Issues in Elsa modules labels Jun 10, 2025
@CodeCasterX CodeCasterX added this to Nova Jun 10, 2025
@CodeCasterX CodeCasterX added this to the elsa 0.1.x milestone Jun 10, 2025
@CodeCasterX

Copy link
Copy Markdown
Member

该PR涉及app-platform仓库的Issue: #237

@CodeCasterX CodeCasterX merged commit ead3bb8 into ModelEngine-Group:elsa-0.1.x Jun 10, 2025
1 check passed
@github-project-automation github-project-automation Bot moved this to Done in Nova Jun 10, 2025
@CodeCasterX CodeCasterX modified the milestones: elsa 0.1.x, elsa 0.1.2 Jun 12, 2025
Yager-42 pushed a commit to Yager-42/fit-framework that referenced this pull request Aug 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in: elsa Issues in Elsa modules type: bug A general bug

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants