xr_ai_tools.vision#
VLM tools over single images, image collections, and timed video frames.
Classes#
An image reference and the question to answer from it. |
|
An ordered image collection and one question spanning the images. |
|
Chronological image frames and a temporal question about them. |
|
A complete VLM answer and visual-input availability state. |
|
One incremental text fragment from a streaming VLM answer. |
|
Answer a question about one caller-selected image. |
|
Answer one question across an ordered image collection. |
|
Answer one temporal question across timestamped image frames. |
|
Stream an answer about one caller-selected image. |
Module Contents#
- class xr_ai_tools.vision.ImageQueryRequest#
An image reference and the question to answer from it.
- image: xr_ai_tools.image.ImageReference#
Image selected by another tool or caller.
- query: str#
Question to answer from the image.
- class xr_ai_tools.vision.MultiImageQueryRequest#
An ordered image collection and one question spanning the images.
- images: list[xr_ai_tools.image.ImageReference]#
Ordered images selected by other tools or the caller.
- query: str#
Question to answer from the images.
- class xr_ai_tools.vision.VideoQueryRequest#
Chronological image frames and a temporal question about them.
- frames: list[xr_ai_tools.image.TimedImage]#
Chronologically ordered image frames with Unix timestamps.
- query: str#
Question to answer from the timed frames.
- validate_timeline() VideoQueryRequest#
Require frames to be supplied in chronological order.
- class xr_ai_tools.vision.ImageQueryResult#
A complete VLM answer and visual-input availability state.
- text: str#
Complete answer text.
- available: bool#
Whether the supplied visual input produced a usable answer.
- class xr_ai_tools.vision.ImageQueryChunk#
One incremental text fragment from a streaming VLM answer.
- text: str#
Partial fragment of the streamed answer text.
- class xr_ai_tools.vision.ImageQueryTool(
- *,
- images: xr_ai_tools.image.ImageRegistry,
- vlm: xr_ai_models.VLMService,
- system_prompt: str = '',
Answer a question about one caller-selected image.
- class xr_ai_tools.vision.MultiImageQueryTool(
- *,
- images: xr_ai_tools.image.ImageRegistry,
- vlm: xr_ai_models.VLMService,
- system_prompt: str = '',
Answer one question across an ordered image collection.
- class xr_ai_tools.vision.VideoQueryTool(
- *,
- images: xr_ai_tools.image.ImageRegistry,
- vlm: xr_ai_models.VLMService,
- system_prompt: str = '',
Answer one temporal question across timestamped image frames.
- class xr_ai_tools.vision.StreamingImageQueryTool(
- *,
- images: xr_ai_tools.image.ImageRegistry,
- vlm: xr_ai_models.VLMService,
- system_prompt: str = '',
Stream an answer about one caller-selected image.