img_utils
autogen.agentchat.contrib.img_utils.llava_formatter
llava_formatter
Formats the input prompt by replacing image tags and returns the new prompt along with image locations.
Parameters:
- prompt (str): The input string that may contain image tags like <img ...>
.
- order_image_tokens (bool, optional): Whether to order the image tokens with numbers.
It will be useful for GPT-4V. Defaults to False.
Returns:
- Tuple[str, List[str]]: A tuple containing the formatted string and a list of images (loaded in b64 format).
Name | Description |
---|---|
prompt | Type: str |
order_image_tokens | Type: bool Default: False |
Type | Description |
---|---|
tuple[str, list[str]] | - Tuple[str, List[str]]: A tuple containing the formatted string and a list of images (loaded in b64 format). |