Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/yetibot/core/commands/banana.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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 <prompt> # generate an image using Gemini nano banana image generation"
{:yb/cat #{:img}}
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion test/yetibot/core/test/commands/banana_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down