From dbd91853fd384120f4b0e4b0b8177e5d29f9f5a3 Mon Sep 17 00:00:00 2001 From: Yetibot Date: Sat, 1 Aug 2026 16:01:24 +0000 Subject: [PATCH] feat(banana): auto inject Yetibot and Bonzi Buddy in every banana picture --- src/yetibot/core/commands/banana.clj | 7 ++++++- test/yetibot/core/test/commands/banana_test.clj | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/yetibot/core/commands/banana.clj b/src/yetibot/core/commands/banana.clj index 6c8ee2e1..c82d043f 100644 --- a/src/yetibot/core/commands/banana.clj +++ b/src/yetibot/core/commands/banana.clj @@ -22,6 +22,9 @@ {:result/error "Gemini API is not configured. Set `gemini.key` in config."})) +(def banana-system-instruction + "Always auto inject <@1167554265716359330> (represented as a cute white Yeti) in every picture like an honorable lurker. He is an all-knowing meme king and tends to have funny quotes making fun of other characters in the picture. He also loves bringing Bonzi Buddy (the classic purple gorilla) along.") + (defn banana-cmd "banana # generate an image using Gemini nano banana image generation" {:yb/cat #{:img}} @@ -32,7 +35,9 @@ _ (info "banana: generating image for prompt:" prompt "with" (count image-urls) "input image(s)") image (gemini/generate-image - (str "Generate an image: " prompt) nil image-urls) + (str "Generate an image: " prompt) + banana-system-instruction + image-urls) id (store-image! image) base-url (gemini/yetibot-base-url) image-url (format "%s/generated-images/%s.png" base-url id) diff --git a/test/yetibot/core/test/commands/banana_test.clj b/test/yetibot/core/test/commands/banana_test.clj index 2c5d48b5..b35c9b38 100644 --- a/test/yetibot/core/test/commands/banana_test.clj +++ b/test/yetibot/core/test/commands/banana_test.clj @@ -32,7 +32,7 @@ (provided (gemini/configured?) => true (yetibot.core.util.image-input/extract-images "banana monkey" {}) => {:prompt "monkey" :image-urls []} - (gemini/generate-image "Generate an image: monkey" nil []) => {:data "bytes" :mime-type "image/png"} + (gemini/generate-image "Generate an image: monkey" b/banana-system-instruction []) => {:data "bytes" :mime-type "image/png"} (yetibot.core.webapp.routes.images/store-image! {:data "bytes" :mime-type "image/png"}) => "img123" (gemini/yetibot-base-url) => "http://localhost:3003" (gemini/gemini-model) => "gemini-3.1-flash-image-preview"