From 06a0bb265e129ab0df526ab19fc7b140b9648acd Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Sun, 27 Oct 2024 18:05:08 -0700 Subject: [PATCH] mp3 and mp4 support for prompt-gemini --- llms/prompt-gemini.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/llms/prompt-gemini.md b/llms/prompt-gemini.md index 6ebccaa38..d9fc893a1 100644 --- a/llms/prompt-gemini.md +++ b/llms/prompt-gemini.md @@ -1,6 +1,6 @@ -# Running prompts against images and PDFs with Google Gemini +# Running prompts against images, PDFs, audio and video with Google Gemini -I'm still working towards adding multi-modal support to my [LLM](https://llm.datasette.io/) tool. In the meantime, here are notes on running prompts against images and PDFs from the command-line using the [Google Gemini](https://ai.google.dev/gemini-api) family of models. +I'm still working towards adding multi-modal support to my [LLM](https://llm.datasette.io/) tool. In the meantime, here are notes on running prompts against images and PDFs and audio and video files from the command-line using the [Google Gemini](https://ai.google.dev/gemini-api) family of models. ## Using curl @@ -248,6 +248,12 @@ if [ -n "$image_file" ]; then pdf) mime_type="application/pdf" ;; + mp3) + mime_type="audio/mp3" + ;; + mp4) + mime_type="video/mp4" + ;; *) echo "Error: Unsupported file type .$ext" >&2 exit 1