discourse-ai/spec/models
Sam 17f04c76d8
FEATURE: add OpenAI image generation and editing capabilities (#1293)
This commit enhances the AI image generation functionality by adding support for:

1. OpenAI's GPT-based image generation model (gpt-image-1)
2. Image editing capabilities through the OpenAI API
3. A new "Designer" persona specialized in image generation and editing
4. Two new AI tools: CreateImage and EditImage

Technical changes include:
- Renaming `ai_openai_dall_e_3_url` to `ai_openai_image_generation_url` with a migration
- Adding `ai_openai_image_edit_url` setting for the image edit API endpoint
- Refactoring image generation code to handle both DALL-E and the newer GPT models
- Supporting multipart/form-data for image editing requests

* wild guess but maybe quantization is breaking the test sometimes

this increases distance

* Update lib/personas/designer.rb

Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>

* simplify and de-flake code

* fix, in chat we need enough context so we know exactly what uploads a user uploaded.

* Update lib/personas/tools/edit_image.rb

Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>

* cleanup downloaded files right away

* fix implementation

---------

Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>
2025-04-29 17:38:54 +10:00
..
ai_persona_spec.rb FEATURE: PDF support for rag pipeline (#1118) 2025-02-14 12:15:07 +11:00
ai_tool_spec.rb FEATURE: add OpenAI image generation and editing capabilities (#1293) 2025-04-29 17:38:54 +10:00
completion_prompt_spec.rb FIX: regression, no longer sending examples to AI helper (#993) 2024-12-03 16:03:46 +11:00
llm_model_spec.rb DEV: Prefer ENV key for seeded models (#893) 2024-11-05 06:19:13 -08:00
llm_quota_spec.rb FEATURE: llm quotas (#1047) 2025-01-14 15:54:09 +11:00
llm_quota_usage_spec.rb FEATURE: llm quotas (#1047) 2025-01-14 15:54:09 +11:00
model_accuracy_spec.rb DEV: Update linting (#423) 2024-01-13 00:28:06 +01:00
rag_document_fragment_spec.rb DEV: Robust check for embeddings enabled (#1116) 2025-02-06 12:18:55 -03:00
reviewable_ai_chat_message_spec.rb DEV: Fix new Rubocop offenses 2024-03-06 15:23:29 +01:00
reviewable_ai_post_spec.rb DEV: Fix new Rubocop offenses 2024-03-06 15:23:29 +01:00
shared_ai_conversation_spec.rb SECURITY: Fix XSS on Shared AI Conversations local Onebox (#1069) 2025-01-14 18:05:37 -03:00
user_option_spec.rb FEATURE: Add ability to disable search discoveries (#1177) 2025-03-10 14:17:58 -07:00