[PR #240] [MERGED] feat: add backward compatibility for LLMResultChunk and new test case #393

Closed
opened 2026-02-16 01:15:50 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-plugin-daemon/pull/240
Author: @Yeuoly
Created: 4/24/2025
Status: Merged
Merged: 4/24/2025
Merged by: @Yeuoly

Base: mainHead: fix/backwards-compatible-to-llm-result-chunk


📝 Commits (1)

  • e2c69e4 feat: add backward compatibility for LLMResultChunk and new test case

📊 Changes

2 files changed (+30 additions, -0 deletions)

View changed files

📝 pkg/entities/model_entities/llm.go (+16 -0)
📝 pkg/entities/model_entities/llm_test.go (+14 -0)

📄 Description

  • Implemented a compatibility layer in LLMResultChunk to ensure backward compatibility with the old format by adding a PromptMessages field.
  • Added a new test case TestLLMResultChunkCompatibility to verify the JSON marshaling behavior of the updated LLMResultChunk structure.

🔄 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-plugin-daemon/pull/240 **Author:** [@Yeuoly](https://github.com/Yeuoly) **Created:** 4/24/2025 **Status:** ✅ Merged **Merged:** 4/24/2025 **Merged by:** [@Yeuoly](https://github.com/Yeuoly) **Base:** `main` ← **Head:** `fix/backwards-compatible-to-llm-result-chunk` --- ### 📝 Commits (1) - [`e2c69e4`](https://github.com/langgenius/dify-plugin-daemon/commit/e2c69e485dddaa45954ca1bae67c64e1f0b2da21) feat: add backward compatibility for LLMResultChunk and new test case ### 📊 Changes **2 files changed** (+30 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `pkg/entities/model_entities/llm.go` (+16 -0) 📝 `pkg/entities/model_entities/llm_test.go` (+14 -0) </details> ### 📄 Description - Implemented a compatibility layer in LLMResultChunk to ensure backward compatibility with the old format by adding a `PromptMessages` field. - Added a new test case `TestLLMResultChunkCompatibility` to verify the JSON marshaling behavior of the updated LLMResultChunk structure. --- <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-16 01:15:50 -05:00
yindo closed this issue 2026-02-16 01:15:50 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugin-daemon#393