gpt4v_formatter

gpt4v_formatter(prompt: str, img_format: str = 'uri') -> list[str | dict[str, Any]]

Formats the input prompt by replacing image tags and returns a list of text and images.

Parameters:
NameDescription
promptThe input string that may contain image tags like img ...>.

Type: str
img_formatwhat image format should be used.

One of “uri”, “url”, “pil”.

Type: str

Default: ‘uri’
Returns:
TypeDescription
list[str | dict[str, typing.Any]]List[Union[str, dict[str, Any]]]: A list of alternating text and image dictionary items.