diff --git a/lib/modules/ai_bot/commands/image_command.rb b/lib/modules/ai_bot/commands/image_command.rb index 22cd83fc..a170cef8 100644 --- a/lib/modules/ai_bot/commands/image_command.rb +++ b/lib/modules/ai_bot/commands/image_command.rb @@ -129,10 +129,7 @@ module DiscourseAi::AiBot::Commands [/grid] RAW - { - prompts: uploads.map { |item| { prompt: item[:prompt], seed: item[:seed] } }, - displayed_to_user: true, - } + { prompts: uploads.map { |item| item[:prompt] }, seeds: uploads.map { |item| item[:seed] } } end end end diff --git a/spec/lib/modules/ai_bot/commands/image_command_spec.rb b/spec/lib/modules/ai_bot/commands/image_command_spec.rb index ddecb5f2..0bd77657 100644 --- a/spec/lib/modules/ai_bot/commands/image_command_spec.rb +++ b/spec/lib/modules/ai_bot/commands/image_command_spec.rb @@ -34,13 +34,7 @@ RSpec.describe DiscourseAi::AiBot::Commands::ImageCommand do info = image.process(prompts: prompts).to_json - expect(JSON.parse(info)).to eq( - "prompts" => [ - { "prompt" => "a pink cow", "seed" => 99 }, - { "prompt" => "a red cow", "seed" => 99 }, - ], - "displayed_to_user" => true, - ) + expect(JSON.parse(info)).to eq("prompts" => ["a pink cow", "a red cow"], "seeds" => [99, 99]) expect(image.custom_raw).to include("upload://") expect(image.custom_raw).to include("[grid]") expect(image.custom_raw).to include("a pink cow")