is there a way, for me to, within an openai agent tool, access the query engine / user message?
def create_gif_from_timestamps(video_path: str, output_path: str, start_time: str, end_time: str) -> str:
"""
Create a GIF from an MP4 video using the specified timestamps.
Parameters:
- video_path: The path to the input MP4 video file.
- output_path: The path where the output GIF file will be saved.
- start_time: The start timestamp in the format "HH:MM:SS" indicating the beginning of the GIF.
- end_time: The end timestamp in the format "HH:MM:SS" indicating the end of the GIF.
Returns:
- The path to the generated GIF file.
"""
clip = VideoFileClip(video_path).subclip(start_time, end_time)
clip.write_gif(output_path)
return output_path
gif_tool = FunctionTool.from_defaults(fn=create_gif_from_timestamps)
i want to be able to query the index, grab a document, use that document to get file path / timestamps from metadata, then make a gif and return it