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: support LLM understand video #9828

Merged
merged 4 commits into from
Nov 8, 2024
Merged

feat: support LLM understand video #9828

merged 4 commits into from
Nov 8, 2024

Conversation

hjlarry
Copy link
Contributor

@hjlarry hjlarry commented Oct 25, 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

change list

  • support transfer a video file to a VideoPromptMessageContent
  • support qwen model understand video
  • support zhipu model understand video
  • when create a new agent app and open the vision feature, default allow video format files upload

restrictions

  • the qwen model requires users to submit a work order for application, and it only support url send mode
  • the exist agent app, its model config already saved in the database, so can't upload video format files

preview

local_video_file

remote_video_file

workflow_node

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

test locally

  • Test local video file send with base64 format
  • Test remote video file send with base64 format
  • Test remote video file send with url format
  • Test workflow's llm node

test link: https://cloud.video.taobao.com/vod/S8T54f_w1rkdfLdYjL3S5zKN9CrhkzuhRwOhF313tIQ.mp4
test file: https://github.com/user-attachments/assets/f5264e1f-e360-4b07-a201-da1216b0310a

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. ⚙️ feat:model-runtime labels Oct 25, 2024
Copy link
Member

@laipz8200 laipz8200 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Nov 7, 2024
@laipz8200 laipz8200 requested a review from iamjoel November 7, 2024 11:29
@laipz8200
Copy link
Member

Hi @hjlarry, could you please also add the new environment variable into the .env.example and the docker-compose.yaml file under the docker/?

@laipz8200 laipz8200 merged commit 033ab54 into langgenius:main Nov 8, 2024
7 checks passed
@hjlarry
Copy link
Contributor Author

hjlarry commented Nov 8, 2024

Hi @hjlarry, could you please also add the new environment variable into the .env.example and the docker-compose.yaml file under the docker/?

sure, I will add it later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚙️ feat:model-runtime lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants