- Updated the version of the dify_plugin from 0.6.0b1 to 0.6.0b2 in pyproject.toml.
- Adjusted the requirements.txt file to reflect the new plugin version.
These changes ensure that the project dependencies are aligned with the latest plugin version.
- Removed the deprecated IssuesTrigger class and replaced it with a more focused IssueOpenedTrigger class to handle specific events when a new issue is opened.
- Updated the GitHub trigger YAML configuration to reflect changes in the subscription schema and parameters.
- Enhanced the validation logic for issue parameters, including title patterns, labels, assignees, authors, milestones, and body content.
- Improved the overall structure and clarity of the trigger implementation, ensuring better maintainability and functionality.
These changes contribute to a more efficient and organized handling of GitHub issue events, enhancing the plugin's responsiveness to user interactions.
- Introduced a new CHECKBOX type in CommonParameterType to enhance parameter options.
- Updated ToolParameter and TriggerParameter classes to include the new CHECKBOX type.
- Modified the GitHub trigger manifest version to 1.1.0 and changed parameter type from select to checkbox in issues.yaml.
These changes improve the flexibility of parameter types available in the plugin, allowing for more diverse user interactions.
- Introduced TriggerProviderImpl and TriggerSubscriptionConstructor implementations in test_construct_trigger_provider.py to facilitate testing.
- Updated session management and request/response handling for improved test clarity and functionality.
- Ensured that the tests validate the behavior of the TriggerProvider and TriggerSubscriptionConstructor interfaces effectively.
These changes contribute to a more robust and maintainable testing framework for trigger functionality.
- Removed the TriggerRuntime dependency from the test_construct_trigger.py file, streamlining the trigger instantiation process.
- Adjusted imports to reflect the updated structure, enhancing code clarity.
These changes contribute to a cleaner and more maintainable test setup for the trigger functionality.
- Adjusted import order in request.py for consistency.
- Enhanced the description formatting in trigger.py for better clarity.
- Streamlined exception handling and method signatures in github.py for improved readability.
- Simplified dictionary construction in message_delivered.py to enhance clarity.
- Consolidated return statements in test_trigger_factory.py for better organization.
These changes contribute to a cleaner and more maintainable codebase, improving overall readability and consistency across the project.
- Removed the MAX_REQUEST_TIMEOUT parameter from the Plugin initialization for default behavior.
- Added a new section in the GitHub provider YAML file to specify the source of the Python implementation.
These changes simplify the plugin setup and enhance the configuration clarity for the GitHub trigger integration.
- Consolidated logic in PluginRegistration for determining subscription constructor classes.
- Simplified method signatures in TriggerFactory for better readability.
- Updated import paths in providers.py to reflect the new module structure.
- Introduced comprehensive tests for the TriggerFactory to ensure robust functionality.
These changes improve code clarity and maintainability while enhancing the overall structure of the trigger management system.
- Added TriggerSubscriptionConstructorRuntime for managing subscription credentials and session data.
- Refactored PluginExecutor to utilize the new trigger subscription constructor for improved event handling.
- Updated PluginRegistration to support the new trigger subscription constructor interface.
- Introduced example-lark-trigger dependency in pyproject.toml for enhanced functionality.
- Cleaned up and standardized trigger-related classes and interfaces for better maintainability.
These changes improve the overall structure and functionality of the trigger subscription system, ensuring a more robust and flexible event handling process.
- Added UnsubscribeError class to handle errors during unsubscribe operations, providing detailed error messages and codes.
- Updated GithubProvider to raise UnsubscribeError in various failure scenarios, enhancing error reporting and debugging.
- Minor adjustments in the IssuesTrigger class to prepare for future enhancements.
These changes improve the robustness of the GitHub trigger integration by ensuring clearer error management during webhook unsubscription processes.
- Updated the class name from Unsubscription to UnsubscribeResult to better reflect its purpose.
- Adjusted related type hints and return types in the TriggerProvider interface and example implementations to maintain consistency.
These changes enhance code readability and improve the understanding of the unsubscription process in the trigger system.
- Eliminated the DatasourceProviderMapping class to streamline the codebase.
- This change enhances maintainability by reducing complexity in the plugin registration module.
- Reformatted the definition of PluginAccessAction to enhance code clarity.
- Removed an unnecessary blank line in the TriggerInvokeRequest class.
These changes contribute to better code organization and maintainability.
- Included DatasourceActions in the merged PluginAccessAction for enhanced access control.
- Added a blank line for improved readability in the TriggerInvokeRequest class.
These changes improve the structure and functionality of the plugin request handling.
- Updated type hints in `setup.py` and `__init__.py` for better clarity and compatibility with newer Python versions.
- Improved descriptions in `trigger.py` for better understanding of output variables.
- Added new dynamic options fetching for repositories in `github.py`, enhancing user experience.
- Updated `manifest.yaml` to reflect the new version 100.1.1 and included additional localization for Japanese.
- Cleaned up and standardized code in various files for improved readability and maintainability.
These changes enhance the overall functionality and usability of the GitHub trigger integration, ensuring a more robust event handling process.
- Deleted obsolete trigger files for various GitHub events including commit comments, create, delete, deployment, discussion, and others to streamline the trigger set.
- Introduced a new `issues.py` trigger to handle GitHub issue events, enhancing event handling capabilities.
- Added corresponding `issues.yaml` configuration to define the new trigger's properties and behavior.
These changes improve the overall functionality and maintainability of the GitHub trigger integration, ensuring a more efficient event handling process.
- Added a new trigger configuration for `pull_request_merged.yaml` to enhance event handling.
- Updated the `deployment_status_created.py` to return event variables correctly.
- Expanded the `deployment_status_created.yaml` with additional properties for better event context.
- Removed obsolete trigger files related to discussions and issues, streamlining the trigger set.
These changes improve the overall functionality and maintainability of the GitHub trigger integration.
- Introduced a new plugin for WhatsApp Business that integrates webhook triggers for automated messaging workflows.
- Implemented triggers for text, image, and message delivery events, allowing users to respond to various message types.
- Added dynamic options fetching for available phone numbers and message templates.
- Included comprehensive documentation in README.md and manifest.yaml for setup and usage instructions.
- Enhanced security with signature validation for incoming webhook requests.
These additions provide a robust framework for automating interactions via WhatsApp, improving user engagement and operational efficiency.
- Added `TriggerIgnoreEventError` to handle cases where events should be ignored based on filter criteria.
- Updated various GitHub trigger files to return relevant payload fields directly, improving data accessibility for event handling.
- Enhanced the handling of event filtering in triggers to ensure only relevant events are processed.
These changes improve the robustness and clarity of the GitHub trigger integration, allowing for better error management and data handling.
- Introduced a new boolean field 'multiple' in the ProviderConfig class to allow for more flexible configuration settings.
This addition improves the configurability of provider options within the plugin.
- Refactored `TriggerInvokeResponse` to use `Mapping[str, Any]` for event representation.
- Renamed `properties` to `variables` in the `Event` class for clarity and updated the description accordingly.
- Expanded the event options in the GitHub trigger configuration to allow selection of all events.
- Removed the deprecated `issue_comment` trigger implementation and its associated files.
- Bumped version in `manifest.yaml` to 0.0.9 to reflect these changes.
These updates improve the flexibility and clarity of the GitHub trigger integration, allowing for a broader range of event handling.
* fix latency calc
* feat: add timing context management to AIModel for latency tracking
- Introduced a new TimingContextRaceConditionError to handle race conditions in multi-threaded environments.
- Implemented a timing_context method in AIModel to track request timing and prevent concurrent usage.
- Updated various model classes (LargeLanguageModel, ModerationModel, RerankModel, Speech2TextModel, TextEmbeddingModel, TTSModel) to utilize the new timing context for latency calculations.
- Added tests to validate timing context behavior under concurrent and sequential usage scenarios.
* feat: implement ModelFactory for dynamic model instance creation
- Added ModelFactory class to generate stateless model instances based on provider configurations and model classes.
- Updated PluginRegistration to utilize ModelFactory for managing model instances, enhancing code organization and maintainability.
* feat: add unit tests for model registry and mock model provider
- Introduced a new test file for validating model registry functionality.
- Implemented mock classes for model provider and LLM to facilitate testing.
- Added tests to ensure correct model instance retrieval from the registry.
* apply ruff
---------
Co-authored-by: Yeuoly <admin@srmxy.cn>
- Modified the test for `oauth_get_authorization_url` to pass a redirect URI as the first argument, ensuring proper functionality and coverage.
This change enhances the accuracy of the test case for the TriggerProvider's OAuth implementation.
- Removed redundant import paths for `fetch_repositories` in `github.py` and `issue_comment.py`.
- Updated import statements to use a consistent module path for better maintainability.
These changes enhance code organization and readability across the GitHub trigger implementation.
- Removed unused imports in `__init__.py` and `dynamic_options.py`.
- Consolidated import statements in `github.py` and `issue_comment.py` for better organization.
- Standardized string formatting in test cases for consistency.
- Enhanced overall code clarity and maintainability.
These changes contribute to a cleaner codebase and improved readability across the project.
- Updated `IssueCommentTrigger` and `GithubProvider` to support multiple event selections for GitHub triggers.
- Introduced a new `multiple` field in the trigger parameters to allow users to select multiple events.
- Implemented dynamic fetching of repository options based on OAuth credentials.
- Bumped version in `manifest.yaml` to 0.0.7 to reflect these enhancements.
This update improves the flexibility and usability of the GitHub trigger integration.
- Bumped version in manifest.yaml to 0.0.5.
- Enhanced OAuth credential retrieval to include the 'admin:repo_hook' scope.
- Improved payload parsing logic for better handling of incoming requests.
- Adjusted default event in provider configuration for clarity.
- Enhanced the GitHub provider to handle both form-encoded and JSON payloads from webhooks.
- Updated error handling to provide clearer messages for payload parsing issues.
- Ensured compatibility with various content types in incoming requests.
This change improves the robustness of the GitHub trigger integration by accommodating different data formats.
- Updated `PluginExecutor` to return a result upon validating provider credentials.
- Renamed `ValidateProviderCredentials` to `ValidateTriggerCredentials` for consistency in trigger actions.
- Improved the `PluginRegistration` class to return OAuth schemas for registered providers.
- Added new error classes for better handling of trigger provider credential validation and OAuth errors.
- Refactored HTTP request and response serialization/deserialization for improved clarity and functionality.
- Enhanced GitHub provider to utilize new error handling and validation mechanisms.
This commit improves the overall structure and error management of the trigger system, ensuring better integration and usability.