[PR #49] [MERGED] fix: Update prompt message content types to use Literal and add union type for content #105

Closed
opened 2026-02-15 21:15:47 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-plugin-sdks/pull/49
Author: @laipz8200
Created: 3/14/2025
Status: Merged
Merged: 3/17/2025
Merged by: @Yeuoly

Base: mainHead: fix/correct-type-hint-of-prompt-message-content


📝 Commits (1)

  • 38ece31 fix: Update prompt message content types to use Literal and add union type for content

📊 Changes

2 files changed (+36 additions, -14 deletions)

View changed files

📝 python/dify_plugin/entities/model/message.py (+20 -13)
📝 python/tests/test_prompt_message.py (+16 -1)

📄 Description

  1. Add a new union type.
  2. Add Literal type hints.
  3. Add a test case.

fixes #48


🔄 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-sdks/pull/49 **Author:** [@laipz8200](https://github.com/laipz8200) **Created:** 3/14/2025 **Status:** ✅ Merged **Merged:** 3/17/2025 **Merged by:** [@Yeuoly](https://github.com/Yeuoly) **Base:** `main` ← **Head:** `fix/correct-type-hint-of-prompt-message-content` --- ### 📝 Commits (1) - [`38ece31`](https://github.com/langgenius/dify-plugin-sdks/commit/38ece31e3af84bfb3dbf7178a366c809decec6d8) fix: Update prompt message content types to use Literal and add union type for content ### 📊 Changes **2 files changed** (+36 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `python/dify_plugin/entities/model/message.py` (+20 -13) 📝 `python/tests/test_prompt_message.py` (+16 -1) </details> ### 📄 Description 1. Add a new union type. 2. Add Literal type hints. 3. Add a test case. fixes #48 --- <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-15 21:15:47 -05:00
yindo closed this issue 2026-02-15 21:15:47 -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-sdks#105