How to pass video file to evaluator function? #24727
Replies: 2 comments 2 replies
-
Hello, @MichaelMMeskhi! I'm here to help you with your LangChain issue. If you need assistance, feel free to ask. To pass a video file to an evaluator function in LangChain, you can use the Here's how you can adapt your code:
Here is an example of how you can achieve this: Step 1: Process the Video Filefrom langchain_experimental.video_captioning.services.image_service import ImageProcessor
# Initialize the ImageProcessor
image_processor = ImageProcessor()
# Path to the video file
video_file_path = "path/to/your/video.mp4"
# Process the video file
video_models = image_processor.process(video_file_path)
# video_models now contains the processed video data Step 2: Modify the
|
Beta Was this translation helpful? Give feedback.
-
@dosu thats no right |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Checked other resources
Commit to Help
Example Code
Description
I am using a custom criteria evaluator to evaluate an answer of Gemini with respect to input video file. How can I pass that same input + video to the evaluator which is also Gemini in this case.
This is how I call my base LLM that takes in a question + video:
And lets assume this is my criteria function:
My dataset csv file is simple 2 columns:
question, video_url
I am having trouble understanding how to get this working.
System Info
langchain==0.2.6
langchain-chroma==0.1.2
langchain-community==0.2.1
langchain-core==0.2.23
langchain-google-genai==1.0.7
langchain-google-vertexai==1.0.7
langchain-openai==0.1.13
langchain-text-splitters==0.2.0
langchainhub==0.1.20
openinference-instrumentation-langchain==0.1.22
Beta Was this translation helpful? Give feedback.
All reactions