mirror of
https://github.com/langgenius/dify-plugin-sdks.git
synced 2026-07-22 02:15:22 -04:00
[PR #88] [MERGED] enhancement: remove prompt_messages from LLMResult and LLMResultChunk #134
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/langgenius/dify-plugin-sdks/pull/88
Author: @Yeuoly
Created: 4/11/2025
Status: ✅ Merged
Merged: 4/11/2025
Merged by: @Yeuoly
Base:
main← Head:fix/remove-prompt_messages-from-llm-result📝 Commits (5)
f7f6552refactor: remove prompt_messages from LLMResult and LLMResultChunk1f2b715fix: add backward compatibility for deprecated prompt_messages field in LLMResult and LLMResultChunkae38642fix: set default value for prompt_messages field to an empty list in LLMResult and LLMResultChunk for backward compatibility4ae8019feat: add test for LLMResult to validate prompt_messages field and ensure backward compatibilitydccfcb0apply ruff📊 Changes
10 files changed (+81 additions, -32 deletions)
View changed files
📝
python/dify_plugin/entities/model/llm.py(+31 -4)📝
python/dify_plugin/entities/model/message.py(+1 -0)📝
python/dify_plugin/interfaces/model/large_language_model.py(+0 -2)📝
python/dify_plugin/interfaces/model/openai_compatible/llm.py(+2 -6)📝
python/dify_plugin/invocations/model/llm.py(+0 -1)📝
python/examples/agent/output_parser/cot_output_parser.py(+1 -3)📝
python/examples/jina/models/text_embedding/text_embedding.py(+1 -1)📝
python/examples/openai/models/llm/llm.py(+0 -8)➕
python/tests/test_llm_result.py(+43 -0)📝
python/tests/test_tool_call_model_init.py(+2 -7)📄 Description
Solves high CPU usage of dify-api container caused by LLMResultChunk decoding
Related:
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.