app:
  description: 本工作流调用第三方股票信息，通过股票信息发送给大模型由模型提供分析给出股票的买卖决策判断等信息
  icon: scream
  icon_background: '#FFEAD5'
  mode: advanced-chat
  name: 股票分析系统
  use_icon_as_answer_icon: false
kind: app
version: 0.1.5
workflow:
  conversation_variables: []
  environment_variables:
  - description: ''
    id: 78af7cd7-92fa-44fe-8951-26638703d43c
    name: apikey
    selector:
    - env
    - apikey
    value: zhouhuixxxx
    value_type: string
  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: true
    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
        sourceType: start
        targetType: if-else
      id: 1741660271061-source-1741660654730-target
      selected: false
      source: '1741660271061'
      sourceHandle: source
      target: '1741660654730'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: if-else
        targetType: answer
      id: 1741660654730-false-17416607292670-target
      selected: false
      source: '1741660654730'
      sourceHandle: 'false'
      target: '17416607292670'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: http-request
        targetType: code
      id: 1741660778252-source-1741663437132-target
      selected: false
      source: '1741660778252'
      sourceHandle: source
      target: '1741663437132'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: code
        targetType: if-else
      id: 1741663437132-source-1741670198264-target
      selected: false
      source: '1741663437132'
      sourceHandle: source
      target: '1741670198264'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: if-else
        targetType: llm
      id: 1741670198264-true-1741669644195-target
      selected: false
      source: '1741670198264'
      sourceHandle: 'true'
      target: '1741669644195'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: if-else
        targetType: llm
      id: 1741670198264-6c1dbd89-ad21-4925-89f3-5b690a144fa0-17416703386570-target
      selected: false
      source: '1741670198264'
      sourceHandle: 6c1dbd89-ad21-4925-89f3-5b690a144fa0
      target: '17416703386570'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: if-else
        targetType: llm
      id: 1741670198264-ccf046c0-1736-4991-ac66-a626d63b2fd6-17416704837760-target
      selected: false
      source: '1741670198264'
      sourceHandle: ccf046c0-1736-4991-ac66-a626d63b2fd6
      target: '17416704837760'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: if-else
        targetType: llm
      id: 1741670198264-false-17416706257040-target
      selected: false
      source: '1741670198264'
      sourceHandle: 'false'
      target: '17416706257040'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: answer
      id: 1741669644195-source-answer-target
      selected: false
      source: '1741669644195'
      sourceHandle: source
      target: answer
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: answer
      id: 17416703386570-source-1741698137000-target
      selected: false
      source: '17416703386570'
      sourceHandle: source
      target: '1741698137000'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: answer
      id: 17416704837760-source-1741698182821-target
      selected: false
      source: '17416704837760'
      sourceHandle: source
      target: '1741698182821'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: answer
      id: 17416706257040-source-1741698215893-target
      selected: false
      source: '17416706257040'
      sourceHandle: source
      target: '1741698215893'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: if-else
        targetType: code
      id: 1741660654730-true-1741711639874-target
      source: '1741660654730'
      sourceHandle: 'true'
      target: '1741711639874'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: code
        targetType: http-request
      id: 1741711639874-source-1741660778252-target
      source: '1741711639874'
      sourceHandle: source
      target: '1741660778252'
      targetHandle: target
      type: custom
      zIndex: 0
    nodes:
    - data:
        desc: 股票号码查询可以去东方财富网https://quote.eastmoney.com/center/gridlist.html#fund_lof查找
        selected: false
        title: 开始
        type: start
        variables:
        - label: 股票代码-下拉选择
          max_length: 48
          options:
          - ''
          - 000568
          - '002657'
          - '000050'
          - 000599
          - '600031'
          - '600050'
          - '600054'
          - '01347'
          - 01880
          - 08257
          - 105.WLGS
          - 105.EJH
          - '512670'
          - '501065'
          required: false
          type: select
          variable: stockcode1
        - label: 股票代码手工输入（如A股 000568 、港股 01347、美股 105.WLGS、ETF 512670  LOF 501065）
          max_length: 48
          options: []
          required: false
          type: text-input
          variable: stockcode2
        - label: 市场类型
          max_length: 48
          options:
          - A
          - HK
          - US
          - ETF
          - LOF
          required: true
          type: select
          variable: marketType
      height: 202
      id: '1741660271061'
      position:
        x: 32.5483009607201
        y: 301
      positionAbsolute:
        x: 32.5483009607201
        y: 301
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        answer: '{{#1741669644195.text#}}'
        desc: ''
        selected: false
        title: A股直接回复
        type: answer
        variables: []
      height: 103
      id: answer
      position:
        x: 2158
        y: 456
      positionAbsolute:
        x: 2158
        y: 456
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        cases:
        - case_id: 'true'
          conditions:
          - comparison_operator: not empty
            id: e673fa11-d63f-4c27-b960-ae1132875494
            value: ''
            varType: string
            variable_selector:
            - '1741660271061'
            - stockcode1
          - comparison_operator: not empty
            id: 6dfe60af-e5ac-4b5e-bd13-696af127680e
            value: ''
            varType: string
            variable_selector:
            - '1741660271061'
            - stockcode2
          id: 'true'
          logical_operator: or
        desc: ''
        selected: false
        title: 条件分支
        type: if-else
      height: 152
      id: '1741660654730'
      position:
        x: 334
        y: 301
      positionAbsolute:
        x: 334
        y: 301
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        answer: 股票代码为空不能查询，请重新输入
        desc: ''
        selected: false
        title: 错误提示回复
        type: answer
        variables: []
      height: 100
      id: '17416607292670'
      position:
        x: 638
        y: 301
      positionAbsolute:
        x: 638
        y: 301
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        authorization:
          config: null
          type: no-auth
        body:
          data:
          - id: key-value-1
            key: ''
            type: text
            value: "{\n  \"stock_code\":\"{{#1741711639874.output#}}\",\n  \"market_type\"\
              :\"{{#1741660271061.marketType#}}\"\n }"
          type: json
        desc: ''
        headers: 'Content-Type:application/json

          Authorization:Bearer {{#env.apikey#}}'
        method: post
        params: ''
        retry_config:
          max_retries: 3
          retry_enabled: true
          retry_interval: 100
        selected: false
        timeout:
          max_connect_timeout: 0
          max_read_timeout: 0
          max_write_timeout: 0
        title: 请求股票接口
        type: http-request
        url: http://127.0.0.1:8085/analyze-stock/
        variables: []
      height: 136
      id: '1741660778252'
      position:
        x: 942
        y: 456
      positionAbsolute:
        x: 942
        y: 456
      selected: true
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        code: "import json\ndef main(arg1: str) -> str: # 修改返回类型为 str\n# 修正后的代码（修复缩进问题）\n\
          \    data = json.loads(arg1)\n    technical_summary = data['technical_summary']\n\
          \    recent_data = data['recent_data']\n    report = data['report']\n  \
          \  # 将结果转换为JSON字符串返回\n    return {\n    \"technical_summary\": json.dumps(technical_summary,ensure_ascii=False,\
          \ indent=2),\n    \"recent_data\": json.dumps(recent_data,ensure_ascii=False,\
          \ indent=2),\n    \"report\": json.dumps(report,ensure_ascii=False, indent=2)\n\
          \    }"
        code_language: python3
        desc: ''
        outputs:
          recent_data:
            children: null
            type: string
          report:
            children: null
            type: string
          technical_summary:
            children: null
            type: string
        selected: false
        title: 处理股票接口返回
        type: code
        variables:
        - value_selector:
          - '1741660778252'
          - body
          variable: arg1
      height: 54
      id: '1741663437132'
      position:
        x: 1246
        y: 456
      positionAbsolute:
        x: 1246
        y: 456
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: 对 A股使用大语言模型来分析
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: internlm3-8b-instruct
          provider: openai_api_compatible
        prompt_template:
        - edition_type: basic
          id: 12b5ec7e-4db6-4b84-90ab-e0de3a45e97a
          role: system
          text: "分析A股  {{#1741711639874.output#}}：\n 技术指标概要：\n{{#1741663437132.technical_summary#}}\n\
            近14日交易数据：\n{{#1741663437132.recent_data#}}\n请提供：\n1. 趋势分析（包含支撑位和压力位）\n\
            2. 成交量分析及其含义\n3. 风险评估（包含波动率分析）\n4. 短期和中期目标价位\n5. 关键技术位分析\n6. 具体交易建议（包含止损位）\n\
            请基于技术指标和A股市场特点进行分析，给出具体数据支持。"
        selected: false
        title: 大语言模型A股票分析
        type: llm
        variables: []
        vision:
          enabled: false
      height: 126
      id: '1741669644195'
      position:
        x: 1854
        y: 456
      positionAbsolute:
        x: 1854
        y: 456
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        cases:
        - case_id: 'true'
          conditions:
          - comparison_operator: is
            id: 3ba032e8-c656-4a9b-866e-4c7b11a94ba1
            value: A
            varType: string
            variable_selector:
            - '1741660271061'
            - marketType
          id: 'true'
          logical_operator: and
        - case_id: 6c1dbd89-ad21-4925-89f3-5b690a144fa0
          conditions:
          - comparison_operator: contains
            id: 472510f4-08fb-4f3b-962e-96e45726be27
            value: HK
            varType: string
            variable_selector:
            - '1741660271061'
            - marketType
          id: 6c1dbd89-ad21-4925-89f3-5b690a144fa0
          logical_operator: and
        - case_id: ccf046c0-1736-4991-ac66-a626d63b2fd6
          conditions:
          - comparison_operator: contains
            id: 4f3902b2-5e6f-4792-8c50-d83f68ff7050
            value: US
            varType: string
            variable_selector:
            - '1741660271061'
            - marketType
          id: ccf046c0-1736-4991-ac66-a626d63b2fd6
          logical_operator: and
        desc: 通过该节点判断我们后面股票、基金分析走哪个大语言模型股票分析
        selected: false
        title: 市场类型判断
        type: if-else
      height: 266
      id: '1741670198264'
      position:
        x: 1550
        y: 456
      positionAbsolute:
        x: 1550
        y: 456
      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: gemini-2.0-flash-exp
          provider: google
        prompt_template:
        - edition_type: basic
          id: 12b5ec7e-4db6-4b84-90ab-e0de3a45e97a
          role: system
          text: ''
        - id: e758d19f-6c21-4ca6-8d8d-e4f3387c5c8f
          role: user
          text: "分析港股 {{#1741711639874.output#}}：\n 技术指标概要：\n{{#1741663437132.technical_summary#}}\n\
            近14日交易数据：\n{{#1741663437132.recent_data#}}\n请提供：\n1. 趋势分析（包含支撑位和压力位,港币计价）\n\
            2. 成交量分析及其含义\n3. 风险评估（包含波动率和港股市场特有风险）\n4. 短期和中期目标价位（港币）\n5. 关键技术位分析\n\
            6. 具体交易建议（包含止损位）\n请基于技术指标和港股市场特点进行分析，给出具体数据支持。"
        selected: false
        title: 大语言模型港股票分析
        type: llm
        variables: []
        vision:
          enabled: false
      height: 126
      id: '17416703386570'
      position:
        x: 1854
        y: 622
      positionAbsolute:
        x: 1854
        y: 622
      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: deepseek-V3
          provider: volcengine_maas
        prompt_template:
        - edition_type: basic
          id: 12b5ec7e-4db6-4b84-90ab-e0de3a45e97a
          role: system
          text: "分析美股 {{#1741711639874.output#}}：\n 技术指标概要：\n{{#1741663437132.technical_summary#}}\n\
            近14日交易数据：\n{{#1741663437132.recent_data#}}\n请提供：\n1. 趋势分析（包含支撑位和压力位，美元计价）\n\
            2. 成交量分析及其含义\n3. 风险评估（包含波动率和美股市场特有风险）\n4. 短期和中期目标价位（美元）\n5. 关键技术位分析\n\
            6. 具体交易建议（包含止损位）\n请基于技术指标和美股市场特点进行分析，给出具体数据支持。"
        selected: false
        title: 大语言模型美股票分析
        type: llm
        variables: []
        vision:
          enabled: false
      height: 126
      id: '17416704837760'
      position:
        x: 1854
        y: 788
      positionAbsolute:
        x: 1854
        y: 788
      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: deepseek-ai/DeepSeek-V2.5
          provider: siliconflow
        prompt_template:
        - edition_type: basic
          id: 12b5ec7e-4db6-4b84-90ab-e0de3a45e97a
          role: system
          text: "分析基金 {{#1741711639874.output#}}：\n 技术指标概要：\n{{#1741663437132.technical_summary#}}\n\
            近14日交易数据：\n{{#1741663437132.recent_data#}}\n请提供：\n1. 净值走势分析（包含支撑位和压力位）\n\
            2. 成交量分析及其对净值的影响\n3. 风险评估（包含波动率和折溢价分析）\n4. 短期和中期净值预测\n5. 关键技术位分析\n6. 申购赎回建议（包含止损位）\n\
            请基于技术指标和市场表现进行分析，给出具体数据支持。"
        selected: false
        title: '大语言模型基金分析 '
        type: llm
        variables: []
        vision:
          enabled: false
      height: 98
      id: '17416706257040'
      position:
        x: 1854
        y: 954
      positionAbsolute:
        x: 1854
        y: 954
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        author: 周辉
        desc: ''
        height: 131
        selected: false
        showAuthor: true
        text: '{"root":{"children":[{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"本工作流调用第三方股票信息，通过股票信息发送给大模型由模型提供分析给出股票的买卖决策判断等信息，该工作流用到条件分支、变量聚合器、http请求、代码处理、大语言模型等组件","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: 471
      height: 131
      id: '1741695699375'
      position:
        x: 38.16777964460357
        y: 622
      positionAbsolute:
        x: 38.16777964460357
        y: 622
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom-note
      width: 471
    - data:
        answer: '{{#17416703386570.text#}}'
        desc: ''
        selected: false
        title: 港股直接回复
        type: answer
        variables: []
      height: 103
      id: '1741698137000'
      position:
        x: 2158
        y: 622
      positionAbsolute:
        x: 2158
        y: 622
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        answer: ' {{#17416704837760.text#}}'
        desc: ''
        selected: false
        title: 美股直接回复
        type: answer
        variables: []
      height: 103
      id: '1741698182821'
      position:
        x: 2158
        y: 788
      positionAbsolute:
        x: 2158
        y: 788
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        answer: '{{#17416706257040.text#}}'
        desc: ''
        selected: false
        title: ETF LOF 直接回复
        type: answer
        variables: []
      height: 103
      id: '1741698215893'
      position:
        x: 2158
        y: 940
      positionAbsolute:
        x: 2158
        y: 940
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        code: "def main(arg1: str, arg2: str) -> dict:\n    # 检查 arg1 是否有值\n    if\
          \ arg1:\n        result = arg1\n    # 如果 arg1 没有值，则检查 arg2\n    elif arg2:\n\
          \        result = arg2\n    else:\n        # 如果两个参数都没有值，可以根据需要进行处理，这里选择返回空字符串\n\
          \        result = \"\"\n    # 将结果封装成字典\n    return {'output': result}"
        code_language: python3
        desc: ''
        outputs:
          output:
            children: null
            type: string
        selected: false
        title: 代码执行2个输入值合并
        type: code
        variables:
        - value_selector:
          - '1741660271061'
          - stockcode1
          variable: arg1
        - value_selector:
          - '1741660271061'
          - stockcode2
          variable: arg2
      height: 54
      id: '1741711639874'
      position:
        x: 631.2045307714131
        y: 469.7301778750681
      positionAbsolute:
        x: 631.2045307714131
        y: 469.7301778750681
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    viewport:
      x: 124.99218234652903
      y: 13.158016708250557
      zoom: 0.8324449805019046
