Skip to content

Instantly share code, notes, and snippets.

View su77ungr's full-sized avatar

su77ungr

View GitHub Profile
@su77ungr
su77ungr / image.baml
Last active February 8, 2025 16:11
Annotate XKCD comic using structured output via baml and gemini-2.0-flash
class ComicDescription {
tags ("physics" | "programming" | "multiple people" | "irony" | "woman" | "politics" | "philosophy" | "finance")[]? @description("Tags best fitting for this comic. Those eight: physics, programming, multiple people, irony, woman, politics, philosophy, finance")
tiles string? @description("Amount of sections the comic has, answer with number")
PresentItem string[]? @description("Physical items portrayed in this comic")
Interpretation string
Rating (0 | 1 | 2 | 3 | 4 | 5)? @description("Humor level of the topic 0-5")
Color ("black-white" | "color")? @description("Color: black-white or color")
}
function DescribeImage(first_image: image) -> ComicDescription {