Skip to content

How to add attachments ? #154

@jide

Description

@jide

How can we add attachments to the chat ?

I tried usings parts in append, but the chat does not take files into account :

                    append({
                      role: "user",
                      content: "What is in the attached file ?", // needed ?
                      parts: [
                        {
                          type: "text",
                          text: "What is in the attached file ?",
                        },
                        {
                          type: "file",
                          mimeType: "image/png",
                          data: "https://www.ffkarate.fr/wp-content/uploads/2024/12/FFK_OPENPARIS2025_KV_40X60_HD-1377x2048.png",
                        },
                      ],
                    });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions