mirror of
https://github.com/discourse/discourse.git
synced 2026-08-08 17:53:55 +08:00
### settings Settings required for V2 captions: - discourse_ai_enabled = true - ai_post_image_descriptions_enabled = true - ai_helper_image_caption_agent must be set. It defaults to -26, the default image caption agent `+` optional tuning: - ai_post_image_descriptions_per_post_limit, default 10 - ai_post_image_descriptions_backfill_hourly_rate, default 0, so backfill is off by default - ai_post_image_descriptions_backfill_max_age_days, default 30 These settings are required for generation/backfill: - the selected `ai_helper_image_caption_agent` must exist and be enabled - the agent/persona must be vision-enabled - the resolved LLM must be vision-capable - credits must be available - ai_post_image_descriptions_backfill_hourly_rate > 0 for scheduled backfill ______ ### this pr ... does _a few things_. 1. removes the old AI image captioning flow (v1)... - removes the composer manual captioning UI - stops inserting generated captions into post raw - removes `image_caption` from the AI helper enabled features setting 2. adds the new post image description flow (v2)... - backfills descriptions for existing post images - stores descriptions in `ai_post_image_descriptions`, keyed by `post_id`, `locale`, and `base62_sha1` - keeps duplicate rows per post image instead of relying only on uploads - cook-time lookup, deletion, and per-post editing stay simple even when multiple posts reuse the same upload - doing this also prevents the author of one post image from affecting another post's image if they have the same image - uses `base62_sha1` and `locale` for reuse when the same image appears again - exposes caption editing from the composer preview for already-described post images - includes descriptions in search indexing without inserting them into raw - decorates cooked post images with localized `aria-description` - shows the AI description visibly in the lightbox under the existing image title |
||
|---|---|---|
| .. | ||
| 20241031041242_migrate_sentiment_classification_result_format_spec.rb | ||
| 20250125162658_fix_broken_open_ai_embeddings_config_spec.rb | ||
| 20250127145305_clean_unused_embedding_search_indexes_spec.rb | ||
| 20260331024139_split_translation_public_content_setting_spec.rb | ||
| 20260504211108_backfill_reviewable_ai_tool_action_scope_spec.rb | ||
| 20260513162531_convert_ai_translation_target_categories_to_excluded_categories_spec.rb | ||
| 20260708051450_remove_image_caption_from_ai_helper_enabled_features_spec.rb | ||
| 20260708080308_convert_ai_translation_excluded_categories_to_category_scope_spec.rb | ||