app: description: 'GPT relay prompt enhancer — 通过中转站优化生图 prompt,单张调试版' icon: ✨ icon_background: '#EBF5FF' mode: workflow name: laser_prompt_enhancer_v2 use_icon_as_answer_icon: false kind: app version: 0.3.0 dependencies: - current_identifier: null type: marketplace value: marketplace_plugin_unique_identifier: langgenius/openai_api_compatible workflow: conversation_variables: [] environment_variables: [] features: file_upload: image: enabled: false number_limits: 3 transfer_methods: - local_file - remote_url opening_statement: '' retriever_resource: enabled: false sensitive_word_avoidance: enabled: false speech_to_text: enabled: false suggested_questions: [] suggested_questions_after_answer: enabled: false text_to_speech: enabled: false language: '' voice: '' graph: edges: - data: isInIteration: false isInLoop: false sourceType: start targetType: llm id: start-source-llm-enhance-target source: start sourceHandle: source target: llm-enhance targetHandle: target type: custom zIndex: 0 - data: isInIteration: false isInLoop: false sourceType: llm targetType: end id: llm-enhance-source-end-target source: llm-enhance sourceHandle: source target: end targetHandle: target type: custom zIndex: 0 nodes: # ================================================================ # 开始节点 # ================================================================ - data: desc: '接收原始 bg_prompt 和用户风格描述' selected: false title: "开始" type: start variables: - label: bg_prompt max_length: 4096 options: [] required: true type: text-input variable: bg_prompt - label: user_prompt max_length: 1024 options: [] required: false type: text-input variable: user_prompt height: 130 id: start position: x: 30 y: 300 positionAbsolute: x: 30 y: 300 selected: false sourcePosition: right targetPosition: left type: custom width: 244 # ================================================================ # LLM 节点 — 通过中转站增强 prompt # ================================================================ - data: desc: '通过中转站的 LLM 优化 bg_prompt,输出增强后的单条 prompt' selected: false title: "中转站 LLM 增强" type: llm model: provider: openai_api_compatible name: gpt-4o mode: chat completion_params: temperature: 0.7 max_tokens: 1024 prompt_template: - role: system text: | You are a professional prompt engineer for the GPT image edit API (/v1/images/edits). Rewrite a SINGLE image prompt into a detailed, vivid image editing instruction. Rules: - The input image is the ORIGINAL full photo containing a person. - Describe what background/style changes to apply around the person. - KEEP THE ORIGINAL PERSON IDENTICAL (same face, same identity, same pose, same clothing). Only modify the background and decorative elements around them. - Output only the enhanced prompt text, no markdown, no JSON wrapping. - Maximum 2000 characters. - role: user text: | Raw prompt: {{ start.bg_prompt }} {% if start.user_prompt %} User style direction: {{ start.user_prompt }} {% endif %} prompt_config: jinja2_variables: [] memory: role_prefix: user: '' assistant: '' window: enabled: false query_prompt_template: '' context: enabled: false vision: enabled: false configs: variable_selector: - sys - files detail: high height: 180 id: llm-enhance position: x: 320 y: 300 positionAbsolute: x: 320 y: 300 selected: false sourcePosition: right targetPosition: left type: custom width: 244 # ================================================================ # 结束节点 # ================================================================ - data: desc: '返回增强后的 prompt' outputs: - value_selector: - llm-enhance - text variable: enhanced_prompt selected: false title: "结束" type: end height: 90 id: end position: x: 610 y: 300 positionAbsolute: x: 610 y: 300 selected: false sourcePosition: right targetPosition: left type: custom width: 244