Skip to content

Support for passing a list[ImageUrl] to chatprompt #445

@ashwin153

Description

@ashwin153

I want to write a function like:

@magentic.chatprompt(
    magentic.UserMessage([
        # how do i include images here?
    ]),
)
def generate_something(images: list[magentic.ImageUrl])

But I'm struggling with figured out how to embed the list of images.

The workaround is to use magentic.Chat, but then I have to implement retries and stuff myself. Any ideas? @jackmpcollins

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions