Files
dify-plugin-sdks/python
kurokobo c61fa1282a fix: improve buffer handling for multimodal input (#128)
* fix: improve buffer handling

* tests:add tests for StdioRequestReader

- Introduced a new private method `_read_async` to handle asynchronous reading from stdin.
- Updated `_read_stream` to utilize the new `_read_async` method for improved code clarity and maintainability.
- Added a new test file `test_stdio.py` to validate the functionality of the StdioRequestReader, ensuring correct handling of input data streams.

* fix: remove useless code

* fix: handle empty lines in StdioRequestReader

- Updated the StdioRequestReader to strip and skip empty lines during input processing.
- Added a new test to validate the handling of empty lines, ensuring the reader correctly processes a stream with mixed content.

* apply ruff

---------

Co-authored-by: Yeuoly <admin@srmxy.cn>
2025-05-06 16:37:41 +08:00
..

Dify Plugin SDK

A Python SDK for building plugins for Dify.

Version Management

This SDK follows Semantic Versioning (a.b.c):

  • a: Major version - Indicates significant architectural changes or incompatible API modifications
  • b: Minor version - Indicates new feature additions while maintaining backward compatibility
  • c: Patch version - Indicates backward-compatible bug fixes

For SDK Users

When depending on this SDK, it's recommended to specify version constraints that:

  • Allow patch and minor updates for bug fixes and new features
  • Prevent major version updates to avoid breaking changes

Example in your project's dependency management:

dify_plugin>=0.2.0,<0.3.0