What is inquire

Inquire allows you to answer open-ended questions based on your videos. Context from multiple videos is automatically gathered to best generate a response.

For example, with search you can ask “show me every blue car” and get all the clips of blue cars. With inquire, you can ask: “How many blue cars crossed the street” and you can get a number in return.

Running Inquire

After specifying an index, add the query from which you are trying to extract insights. This query can be a short question or a very long contextual element to prompt the model more significantly.

Prompts can also be used to run inquiry calls that require external knowledge bases, more textual context, detailed instructions, or output formats up to 500k tokens in length.

To run a query:

resp = moonshine.inquire("your-index-name", "How has the car changed over time?")

# resp = "The car was moved several times and sustained a dent on its left side when parked in the garage."

Setting a Target

By default, inquire uses context from all videos in an index to generate its response. If you want to focus the inquiry on a specific video and timestamp, you can provide a VideoTarget. While the inquire call will still consider context from all other media, it prioritizes the information from the specified VideoTarget in its response.

The VideoTarget class takes the form of:

parmasdescriptionexample
file_idMoonshine generated FileID of the target video (created during upload)‘FHXYU838JHDWK.mp4’
timestampTarget timestamp of video in seconds30

To add a VideoTarget to your inquiry:

target = moonshine.VideoTarget(file_id="FHXYU838JHDWK.mp4", timestamp=30)
resp = moonshine.inquire("test-index-1", "What caused the car to end up like this?", target=target)