Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat/enhance the multi-modal support #8818

Merged
merged 37 commits into from
Oct 21, 2024
Merged

Conversation

laipz8200
Copy link
Collaborator

@laipz8200 laipz8200 commented Sep 26, 2024

Checklist:

Important

Please review the checklist below before submitting your pull request.

  • Please open an issue before creating a PR or link to an existing issue
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods

Description

This feature allows users to pass a File or an Array<File> between nodes in a workflow.

Should fixes #9386 #9110

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update, included: Dify Document
  • Improvement, including but not limited to code refactoring, performance optimization, and UI/UX improvement
  • Dependency upgrade

Testing Instructions

  • Unit Test

@laipz8200 laipz8200 changed the title Feat/enhance multi modal support feat/enhance the multi modal support Sep 26, 2024
@laipz8200 laipz8200 changed the title feat/enhance the multi modal support feat/enhance the multi-modal support Sep 26, 2024
api/core/helper/ssrf_proxy.py Dismissed Show dismissed Hide dismissed
api/core/helper/ssrf_proxy.py Dismissed Show dismissed Hide dismissed
api/core/helper/ssrf_proxy.py Dismissed Show dismissed Hide dismissed
@laipz8200 laipz8200 force-pushed the feat/enhance-multi-modal-support branch 2 times, most recently from 4771b69 to cc4b43e Compare September 27, 2024 07:50
@laipz8200
Copy link
Collaborator Author

should resolve #8824

@laipz8200 laipz8200 force-pushed the feat/enhance-multi-modal-support branch 5 times, most recently from 470b22d to 1e62ad2 Compare September 30, 2024 15:34
@laipz8200 laipz8200 force-pushed the feat/enhance-multi-modal-support branch 9 times, most recently from 73f30df to 0d310b5 Compare October 14, 2024 08:47
@laipz8200 laipz8200 force-pushed the feat/enhance-multi-modal-support branch from 3e75bda to 4721669 Compare October 18, 2024 07:13
@laipz8200 laipz8200 self-assigned this Oct 20, 2024
@laipz8200 laipz8200 force-pushed the feat/enhance-multi-modal-support branch from 73ae995 to 4578695 Compare October 20, 2024 16:54
@laipz8200 laipz8200 marked this pull request as ready for review October 20, 2024 17:04
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. 💪 enhancement New feature or request labels Oct 20, 2024
- Introduced podcast generator with text-to-speech functionality using OpenAI's API.
- Implemented credential validation for TTS services and API keys.
- Added support for generating podcast audio with alternating host voices.
- Included user-friendly setup with internationalized YAML configuration.
- Added SVG icon to enhance visual identification.
- Apply `handle_special_values` to `process_data` in workflow cycle management.
- Improve template processing in `AdvancedPromptTransform` with `VariablePool`.
- Make `system_variables` and `user_inputs` optional in `VariablePool` initialization.
- Specify 'wav' format directly in the speech API request.
- Streamline audio processing by using `from_wav` for efficient handling.
- Introduced 'as_attachment' argument to specify download mode.
- Enables flexible file display as inline or attachment.
- Enhances user control over file preview behavior.
- Deprecated image-preview functionality in favor of file-preview for more uniform file handling.
- Introduced support for handling audio files along with images.
- Improved methods to handle different file types and transfer methods in a modular way.
- Simplified code by removing unnecessary checks for file type and related IDs.
- Updated OpenAI package to version 1.52.0 for improved compatibility.
- Added `jiter` dependency for JSON parsing.
- Changed openai version specifier from caret to tilde for more controlled updates.
- Updated `poetry.lock` file with new content hash.
…action

- Utilize `patch` decorator for better isolation in prompt transform tests.
- Simplify `mock_download` call by removing unnecessary `tenant_id` parameter in document extractor tests.
- Separate document extensions based on ETL type configuration.
- Include additional formats like eml, msg, pptx, ppt, xml, and epub for "Unstructured" ETL type.
- Maintain the original extension list for other ETL types.
- Renamed `models.py` to `entities.py` and updated imports accordingly for better clarity and consistency.
- Renamed `document_extractor_node.py` to `node.py` to simplify module naming.
- Adjusted related imports in test files to reflect the new file names.
- Renamed `HttpExecutor` to `Executor` for consistency.
- Unified `Response` handling by moving common logic to a single `Response` class to avoid redundancy.
- Simplified imports and file structure for clearer organization.
- Updated tests and references to reflect changes in class and module names.
- Consolidated entity imports to enhance code organization.
- Reordered imports for clarity and maintainability.
- Moved `BaseNode` to a new `base` package for better organization.
- Updated all import statements to reflect new path structure.
- Added `__init__.py` to `base` package for proper module export.
- Moved BaseNodeData and related classes from `base_node_data_entities` to `nodes.base.entities`.
- Updated imports across various files to reflect new location of BaseNodeData.
- Created `event` module for handling NodeEvents to improve organization.
- Optimized usage of TYPE_CHECKING for conditional imports, enhancing performance.
- Improved class metadata management by assigning default factories and utilizing type annotations.
- Removed `BaseIterationState` class to clean up unused code.
- Eliminates unnecessary dependencies on the Pydantic library for this entity.
- Simplifies the codebase by discarding obsolete data model definitions.
- Moved and renamed `LLMNode` from `llm_node` to `node` for clearer structuring.
- Introduced `ModelInvokeCompletedEvent` to replace the `ModelInvokeCompleted` class.
- Updated import paths throughout to reflect module restructuring.
- Updated event handling logic to use `ModelInvokeCompletedEvent` consistently.
- Consolidated NodeType and other related imports under core.workflow.nodes
- Removed redundant imports from enums
- Enhanced module organization with new __init__.py files for node classes
- Streamlined node class references in node_mapping and other modules
- Replaced `node_classes` with `node_type_classes_mapping` for better clarity and consistency.
- Eliminated `NodeType.value_of` method, simplifying NodeType retrieval.
- Adjusted imports to streamline access to `IterationNodeData`.
- Updated unit tests to align with changes in node type handling.
- Moved enums to a dedicated 'models.enums' module for better organization.
- Updated all import statements across the project to use the new location.
- Removed unnecessary docstring placeholders from enum classes.
@laipz8200 laipz8200 force-pushed the feat/enhance-multi-modal-support branch from 37ab3ad to fe47ecd Compare October 21, 2024 02:34
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Oct 21, 2024
@laipz8200 laipz8200 merged commit e61752b into main Oct 21, 2024
15 checks passed
@laipz8200 laipz8200 deleted the feat/enhance-multi-modal-support branch October 21, 2024 02:43
lau-td pushed a commit to heydevs-io/dify that referenced this pull request Oct 23, 2024
Scorpion1221 added a commit to yybht155/dify that referenced this pull request Oct 24, 2024
* commit 'ca21c285b00a4a72993a4400cc7902646b0bda0e': (73 commits)
  chore: update version to 0.10.0 in packaging and docker configurations (langgenius#9534)
  chore: translate i18n files (langgenius#9528)
  fix: when upload file response 3** will raise error (langgenius#9555)
  fix: TOKEN_EXPIRY_MINUTES (langgenius#9557)
  feat(file-upload): add support for optional file source parameter (langgenius#9554)
  fix: input vars not auto rename in list operator (langgenius#9550)
  fix: list filter node some operator raise error (langgenius#9539)
  fix: list filter node url not work (langgenius#9540)
  fix: RESET_PASSWORD_TOKEN_EXPIRY_HOURS error (langgenius#9542)
  Fix: chatbot retrieval setting save issue (langgenius#9536)
  fix(dockerfile): update libsqlite3 package version (langgenius#9530)
  feat/enhance the multi-modal support (langgenius#8818)
  Feat/attachments (langgenius#9526)
  Feat/new login (langgenius#8120)
  chore: translate i18n files (langgenius#9523)
  New Auth Methods (langgenius#8119)
  fix: draft run workflow node with image will raise error (langgenius#9406)
  refactor wenxin rerank (langgenius#9486)
  fix: ignore all files except for .gitkeep under docker/nginx/ssl by gitignore (langgenius#9518)
  feat: Add custom username and avatar define in discord tool (langgenius#9514)
  ...

# Conflicts:
#	api/core/file/file_obj.py
#	api/core/file/message_file_parser.py
#	api/core/tools/tool_file_manager.py
#	api/core/tools/utils/message_transformer.py
#	api/core/workflow/nodes/tool/tool_node.py
#	web/yarn.lock
idonotknow pushed a commit to AceDataCloud/Dify that referenced this pull request Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💪 enhancement New feature or request lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Run failed: Failed to invoke tool: Object of type FileVar is not JSON serializable
2 participants