app:
  description: ''
  icon: 📘
  icon_background: '#ECE9FE'
  mode: advanced-chat
  name: 小说故事与角色批量生成（简单并行）
  use_icon_as_answer_icon: false
dependencies: []
kind: app
version: 0.1.5
workflow:
  conversation_variables: []
  environment_variables: []
  features:
    file_upload:
      allowed_file_extensions:
      - .JPG
      - .JPEG
      - .PNG
      - .GIF
      - .WEBP
      - .SVG
      allowed_file_types:
      - image
      allowed_file_upload_methods:
      - local_file
      - remote_url
      enabled: false
      fileUploadConfig:
        audio_file_size_limit: 50
        batch_count_limit: 5
        file_size_limit: 15
        image_file_size_limit: 10
        video_file_size_limit: 100
        workflow_file_upload_limit: 10
      image:
        enabled: false
        number_limits: 3
        transfer_methods:
        - local_file
        - remote_url
      number_limits: 3
    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:
        sourceType: start
        targetType: llm
      id: 1724834305994-llm
      selected: false
      source: '1724834305994'
      sourceHandle: source
      target: llm
      targetHandle: target
      type: custom
    - data:
        isInIteration: false
        sourceType: llm
        targetType: llm
      id: llm-source-1724835696571-target
      selected: false
      source: llm
      sourceHandle: source
      target: '1724835696571'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: llm
      id: llm-source-1724836594623-target
      selected: false
      source: llm
      sourceHandle: source
      target: '1724836594623'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: llm
      id: llm-source-1724836650906-target
      selected: false
      source: llm
      sourceHandle: source
      target: '1724836650906'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: answer
      id: 1724836774572-source-answer-target
      selected: false
      source: '1724836774572'
      sourceHandle: source
      target: answer
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: tool
      id: 1724835696571-source-1724838137187-target
      selected: false
      source: '1724835696571'
      sourceHandle: source
      target: '1724838137187'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: tool
      id: 1724836594623-source-17248381424170-target
      selected: false
      source: '1724836594623'
      sourceHandle: source
      target: '17248381424170'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: tool
      id: 1724836650906-source-17248381430980-target
      selected: false
      source: '1724836650906'
      sourceHandle: source
      target: '17248381430980'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: tool
        targetType: llm
      id: 1724838137187-source-1724836774572-target
      source: '1724838137187'
      sourceHandle: source
      target: '1724836774572'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: tool
        targetType: llm
      id: 17248381424170-source-1724836774572-target
      source: '17248381424170'
      sourceHandle: source
      target: '1724836774572'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: tool
        targetType: llm
      id: 17248381430980-source-1724836774572-target
      source: '17248381430980'
      sourceHandle: source
      target: '1724836774572'
      targetHandle: target
      type: custom
      zIndex: 0
    nodes:
    - data:
        desc: ''
        selected: false
        title: 开始
        type: start
        variables:
        - label: 小说风格
          max_length: 48
          options: []
          required: true
          type: text-input
          variable: novel_style
        - label: 小说节奏
          max_length: 48
          options: []
          required: true
          type: text-input
          variable: novel_rhythm
        - label: 角色-1
          max_length: 48
          options: []
          required: true
          type: text-input
          variable: role_01
        - label: 角色-2
          max_length: 48
          options: []
          required: true
          type: text-input
          variable: role_02
        - label: 角色-3
          max_length: 48
          options: []
          required: true
          type: text-input
          variable: role_03
      height: 194
      id: '1724834305994'
      position:
        x: -55.358575530143526
        y: 512.077969386271
      positionAbsolute:
        x: -55.358575530143526
        y: 512.077969386271
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        memory:
          query_prompt_template: '{{#sys.query#}}

            小说风格：{{#1724834305994.novel_style#}}

            小说节奏：{{#1724834305994.novel_rhythm#}}'
          role_prefix:
            assistant: ''
            user: ''
          window:
            enabled: false
            size: 10
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: claude-3-5-sonnet-20240620
          provider: langgenius/anthropic/anthropic
        prompt_template:
        - id: a59dc5e6-942a-409e-9913-daf9df901052
          role: system
          text: '你是一名专业的小说写手，现在根据用户输入的信息，补全小说的大致世界观。


            输出的格式请遵循：


            {小说世界观基调}


            '
        selected: false
        title: 基调设定
        type: llm
        variables: []
        vision:
          configs:
            detail: high
          enabled: true
      height: 96
      id: llm
      position:
        x: 325.57016372779447
        y: 512.077969386271
      positionAbsolute:
        x: 325.57016372779447
        y: 512.077969386271
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        answer: '小说设定：

          {{#llm.text#}}


          小说故事：

          {{#1724836774572.text#}}


          参演角色：

          {{#1724835696571.text#}}

          角色卡片：{{#1724838137187.files#}}

          {{#1724836594623.text#}}

          角色卡片：{{#17248381424170.files#}}

          {{#1724836650906.text#}}

          角色卡片：{{#17248381430980.files#}}'
        desc: ''
        selected: false
        title: 最终的小说故事
        type: answer
        variables: []
      height: 238
      id: answer
      position:
        x: 1902.0825922568974
        y: 512.077969386271
      positionAbsolute:
        x: 1902.0825922568974
        y: 512.077969386271
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: claude-3-5-sonnet-20240620
          provider: langgenius/anthropic/anthropic
        prompt_template:
        - id: cff349a4-59a9-4f9a-bafe-424c5d1bb8bc
          role: system
          text: '你现在是一名专业的小说人物塑造专家，请你根据以下小说世界观：

            <{{#llm.text#}}>


            根据用户输入的角色要求 <{{#1724834305994.role_01#}}>，按照以下格式补全这个角色的基本信息：


            `

            姓名：

            物种：

            性别：

            毛发颜色：

            角色偏好：

            角色能力：

            `


            注意：

            你塑造的角色需要符合小说的世界观。'
        - id: 2b6f39c9-09c9-4f06-ba74-a5abc3857484
          role: user
          text: '{{#sys.query#}}

            这是用户输入的角色要求：{{#1724834305994.role_01#}}'
        selected: false
        title: 角色-1
        type: llm
        variables: []
        vision:
          configs:
            detail: high
          enabled: true
      height: 96
      id: '1724835696571'
      position:
        x: 725.0036250416084
        y: 282
      positionAbsolute:
        x: 725.0036250416084
        y: 282
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: claude-3-5-sonnet-20240620
          provider: langgenius/anthropic/anthropic
        prompt_template:
        - id: 54e9bf8f-080b-438f-9fdd-d31b6ca4463b
          role: system
          text: '你现在是一名专业的小说人物塑造专家，请你根据以下小说世界观：

            <{{#llm.text#}}>


            根据用户输入的角色要求 <{{#1724834305994.role_02#}}>，按照以下格式补全这个角色的基本信息：


            `

            姓名：

            物种：

            性别：

            毛发颜色：

            角色偏好：

            角色能力：

            `


            注意：

            你塑造的角色需要符合小说的世界观。'
        - id: 8034171d-8129-4fdb-aa08-906add8e9e77
          role: user
          text: '{{#sys.query#}}

            这是用户输入的角色要求：{{#1724834305994.role_02#}}'
        selected: false
        title: 角色-2
        type: llm
        variables: []
        vision:
          configs:
            detail: high
          enabled: true
      height: 96
      id: '1724836594623'
      position:
        x: 725.0036250416084
        y: 512.077969386271
      positionAbsolute:
        x: 725.0036250416084
        y: 512.077969386271
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: claude-3-5-sonnet-20240620
          provider: langgenius/anthropic/anthropic
        prompt_template:
        - id: 6dbdd2a5-acf4-4e7e-a151-b1a7c9c02f80
          role: system
          text: '你现在是一名专业的小说人物塑造专家，请你根据以下小说世界观：

            <{{#llm.text#}}>


            根据用户输入的角色要求 <{{#1724834305994.role_03#}}>，按照以下格式补全这个角色的基本信息：


            `

            姓名：

            物种：

            性别：

            毛发颜色：

            角色偏好：

            角色能力：

            `


            注意：

            你塑造的角色需要符合小说的世界观。'
        - id: 0db3a2f0-11d6-4218-a18f-52b71c0112a1
          role: user
          text: '{{#sys.query#}}

            这是用户输入的角色要求：{{#1724834305994.role_03#}}'
        selected: false
        title: 角色-3
        type: llm
        variables: []
        vision:
          configs:
            detail: high
          enabled: true
      height: 96
      id: '1724836650906'
      position:
        x: 725.0036250416084
        y: 783.933200142707
      positionAbsolute:
        x: 725.0036250416084
        y: 783.933200142707
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: claude-3-5-sonnet-20240620
          provider: langgenius/anthropic/anthropic
        prompt_template:
        - id: a16bb678-4b3e-402d-a668-6ed87355688c
          role: system
          text: '你是一个小说剧情专家，根据用户输入的小说基调和角色人物，为他们编写一个符合 {{#1724834305994.novel_style#}}
            风格的故事


            最后输出的内容遵循以下格式：


            <小说题目>

            <小说剧情>

            <小说结尾>


            编写小说剧情的时候可以任意挑选一个角色作为主角，然后以第一人称进行撰写。书写小说的时候文风要自然，故事要详细。中间可以加一些诙谐幽默的内容。'
        - id: aec816e5-e5b4-4a8b-ad22-6a22d985311e
          role: user
          text: '小说基调：{{#llm.text#}}

            所涉及的角色：

            {{#1724834305994.role_01#}}

            {{#1724834305994.role_02#}}

            {{#1724834305994.role_03#}}'
        selected: false
        title: 小说内容补全
        type: llm
        variables: []
        vision:
          configs:
            detail: high
          enabled: true
      height: 96
      id: '1724836774572'
      position:
        x: 1581.9869040574301
        y: 512.077969386271
      positionAbsolute:
        x: 1581.9869040574301
        y: 512.077969386271
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        provider_id: dalle
        provider_name: dalle
        provider_type: builtin
        selected: false
        title: 角色 1 插画
        tool_configurations:
          n: 1
          quality: standard
          size: square
          style: natural
        tool_label: DALL-E 3 绘画
        tool_name: dalle3
        tool_parameters:
          prompt:
            type: mixed
            value: '{{#1724835696571.text#}}平面插画风格，图片中不需要有文字'
        type: tool
      height: 168
      id: '1724838137187'
      position:
        x: 1121.1636009566719
        y: 282
      positionAbsolute:
        x: 1121.1636009566719
        y: 282
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        provider_id: dalle
        provider_name: dalle
        provider_type: builtin
        selected: false
        title: 角色 2 插画
        tool_configurations:
          n: 1
          quality: standard
          size: square
          style: natural
        tool_label: DALL-E 3 绘画
        tool_name: dalle3
        tool_parameters:
          prompt:
            type: mixed
            value: '{{#1724836594623.text#}} 平面插画风格，图片中不需要有文字'
        type: tool
      height: 168
      id: '17248381424170'
      position:
        x: 1121.1636009566719
        y: 512.077969386271
      positionAbsolute:
        x: 1121.1636009566719
        y: 512.077969386271
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        provider_id: dalle
        provider_name: dalle
        provider_type: builtin
        selected: false
        title: 角色 3 插画
        tool_configurations:
          n: 1
          quality: standard
          size: square
          style: natural
        tool_label: DALL-E 3 绘画
        tool_name: dalle3
        tool_parameters:
          prompt:
            type: mixed
            value: '{{#1724836650906.text#}}平面插画风格，图片中不需要有文字'
        type: tool
      height: 168
      id: '17248381430980'
      position:
        x: 1121.1636009566719
        y: 783.933200142707
      positionAbsolute:
        x: 1121.1636009566719
        y: 783.933200142707
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        author: Allen
        desc: ''
        height: 88
        selected: false
        showAuthor: true
        text: '{"root":{"children":[{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"小说角色生成环节，你可以根据故事原型，添加或删减角色","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0}],"direction":"ltr","format":"","indent":0,"type":"root","version":1}}'
        theme: blue
        title: ''
        type: ''
        width: 240
      height: 88
      id: '1725374775934'
      position:
        x: 737.5974730909346
        y: 123.21554225668152
      positionAbsolute:
        x: 737.5974730909346
        y: 123.21554225668152
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom-note
      width: 240
    - data:
        author: Allen
        desc: ''
        height: 88
        selected: false
        showAuthor: true
        text: '{"root":{"children":[{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"该列是为了给小说角色生成角色插图。你可以根据需要添加或删除角色插画","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0}],"direction":"ltr","format":"","indent":0,"type":"root","version":1}}'
        theme: blue
        title: ''
        type: ''
        width: 240
      height: 88
      id: '1725374807979'
      position:
        x: 1121.1636009566719
        y: 123.21554225668152
      positionAbsolute:
        x: 1121.1636009566719
        y: 123.21554225668152
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom-note
      width: 240
    viewport:
      x: 67.22775852548767
      y: 23.190229909996503
      zoom: 0.7547129842602815
