llava_formatter

llava_formatter(prompt: str, order_image_tokens: bool = False) -> tuple[str, list[str]]

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).

Parameters:
NameDescription
promptType: str
order_image_tokensType: bool

Default: False
Returns:
TypeDescription
tuple[str, list[str]]- Tuple[str, List[str]]: A tuple containing the formatted string and a list of images (loaded in b64 format).