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: use media url directly in both LMM and code sandbox #215

Merged
merged 12 commits into from
Aug 29, 2024

Conversation

yzld2002
Copy link
Member

@yzld2002 yzld2002 commented Aug 28, 2024

We used to always use the local media:

  • encode it as base64 and talk with OpenAI
  • upload it to the code interpreter before execution

This PR adds the support to directly use the media URL

  1. OpenAI supports both base64 and URL format of the image
  2. Added the support to download from URL in the tool load_image and extract_frames. Although the moviepy can directly use the URL, but after testing, looks like download it first seems more stable.
  3. During write_plan, we need to feed the LLM one frame of the video, we assume there is a same url that only differs in the suffix. (https://xxxxx.mp4 -> https://xxxxx.png)

Local run:

  • image
image
  • video
image

Copy link
Member

@dillonalaird dillonalaird left a comment

Choose a reason for hiding this comment

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

LGTM will slack you some extra details on this

@yzld2002 yzld2002 merged commit 5df3ced into main Aug 29, 2024
8 checks passed
@yzld2002 yzld2002 deleted the zhichao-download-media-directly branch August 29, 2024 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants