app:
  description: HTTP 查即時天氣→依晴雨自動調整室內外行程→產出旅遊手冊。
  icon: 🧳
  icon_background: '#FEF3C7'
  icon_type: emoji
  mode: workflow
  name: 智慧旅遊行程規劃器
  use_icon_as_answer_icon: false
dependencies:
- current_identifier: null
  type: marketplace
  value:
    marketplace_plugin_unique_identifier: langgenius/anthropic:0.3.24@c5e50da8c13c7ac75348df5ac75b9418c79736eb506064669dd7ca06cbd83537
    version: null
kind: app
version: 0.6.0
workflow:
  conversation_variables: []
  environment_variables: []
  features:
    file_upload:
      allowed_file_extensions:
      - .JPG
      allowed_file_types:
      - image
      allowed_file_upload_methods:
      - local_file
      enabled: false
      fileUploadConfig:
        attachment_image_file_size_limit: 2
        audio_file_size_limit: 50
        batch_count_limit: 5
        file_size_limit: 15
        file_upload_limit: 20
        image_file_batch_limit: 10
        image_file_size_limit: 10
        single_chunk_attachment_limit: 10
        video_file_size_limit: 100
        workflow_file_upload_limit: 10
      image:
        enabled: false
        number_limits: 3
        transfer_methods:
        - local_file
      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
        isInLoop: false
        sourceType: start
        targetType: http-request
      id: 30s-source-30http
      source: 30s
      sourceHandle: source
      target: 30http
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        isInLoop: false
        sourceType: http-request
        targetType: tool
      id: 30http-source-30code
      source: 30http
      sourceHandle: source
      target: 30code
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        isInLoop: false
        sourceType: tool
        targetType: if-else
      id: 30code-source-30if
      source: 30code
      sourceHandle: source
      target: 30if
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        isInLoop: false
        sourceType: if-else
        targetType: llm
      id: 30if-true-30lrain
      source: 30if
      sourceHandle: 'true'
      target: 30lrain
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        isInLoop: false
        sourceType: if-else
        targetType: llm
      id: 30if-false-30lclear
      source: 30if
      sourceHandle: 'false'
      target: 30lclear
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        isInLoop: false
        sourceType: llm
        targetType: variable-aggregator
      id: 30lrain-source-30agg
      source: 30lrain
      sourceHandle: source
      target: 30agg
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        isInLoop: false
        sourceType: llm
        targetType: variable-aggregator
      id: 30lclear-source-30agg
      source: 30lclear
      sourceHandle: source
      target: 30agg
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        isInLoop: false
        sourceType: variable-aggregator
        targetType: llm
      id: 30agg-source-30ltips
      source: 30agg
      sourceHandle: source
      target: 30ltips
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        isInLoop: false
        sourceType: llm
        targetType: template-transform
      id: 30ltips-source-30tpl
      source: 30ltips
      sourceHandle: source
      target: 30tpl
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        isInLoop: false
        sourceType: template-transform
        targetType: end
      id: 30tpl-source-30e
      source: 30tpl
      sourceHandle: source
      target: 30e
      targetHandle: target
      type: custom
      zIndex: 0
    nodes:
    - data:
        selected: false
        title: 開始
        type: start
        variables:
        - default: ''
          hint: ''
          label: 目的地城市
          max_length: 40
          options: []
          placeholder: 例：Tokyo、Taipei、Osaka
          required: true
          type: text-input
          variable: city
        - default: ''
          hint: ''
          label: 天數
          options: []
          placeholder: '3'
          required: true
          type: number
          variable: days
        - default: ''
          hint: ''
          label: 旅遊偏好
          max_length: 80
          options: []
          placeholder: 例：美食、親子、文化古蹟
          required: false
          type: text-input
          variable: interest
      height: 161
      id: 30s
      position:
        x: 0
        y: 0
      positionAbsolute:
        x: 0
        y: 0
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 242
    - data:
        authorization:
          config: null
          type: no-auth
        body:
          data:
          - type: text
            value: ''
          type: none
        headers: ''
        method: get
        params: ''
        retry_config:
          max_retries: 3
          retry_enabled: true
          retry_interval: 100
        selected: false
        ssl_verify: true
        timeout:
          max_connect_timeout: 10
          max_read_timeout: 30
          max_write_timeout: 30
        title: 查詢天氣 API
        type: http-request
        url: https://wttr.in/{{#30s.city#}}?format=j1
        variables: []
      height: 141
      id: 30http
      position:
        x: 342
        y: 36.83333333333333
      positionAbsolute:
        x: 342
        y: 36.83333333333333
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 242
    - data:
        provider_id: code
        provider_name: code
        provider_type: builtin
        selected: false
        title: 解析天氣
        tool_configurations: {}
        tool_label: Code Interpreter
        tool_name: simple_code
        tool_node_version: '2'
        tool_parameters:
          code:
            type: mixed
            value: "import json\nraw = \"\"\"{{#30http.body#}}\"\"\"\ntry:\n    d=json.loads(raw)\n\
              \    cur=d['current_condition'][0]\n    temp=cur['temp_C']; desc=cur['weatherDesc'][0]['value']\n\
              \    place=d.get('nearest_area',[{}])[0].get('areaName',[{'value':'?'}])[0]['value']\n\
              \    rainy=False; lines=[]\n    for wd in d.get('weather',[])[:3]:\n\
              \        hourly=wd.get('hourly',[])\n        chrain=max([int(h.get('chanceofrain',0))\
              \ for h in hourly] or [0])\n        if chrain>=50: rainy=True\n    \
              \    lines.append(wd['date']+': '+wd['mintempC']+'~'+wd['maxtempC']+'C,\
              \ 降雨機率最高 '+str(chrain)+'%')\n    print('地點：'+str(place))\n    print('目前：'+str(temp)+'C,\
              \ '+str(desc))\n    print('未來天氣：')\n    for l in lines: print(' - '+l)\n\
              \    print('FLAG='+('RAINY' if rainy else 'CLEAR'))\nexcept Exception\
              \ as ex:\n    print('天氣資料解析失敗：'+str(ex))\n    print('FLAG=CLEAR')\n"
          language:
            type: constant
            value: python3
        type: tool
      height: 52
      id: 30code
      position:
        x: 684
        y: 104.83333333333333
      positionAbsolute:
        x: 684
        y: 104.83333333333333
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 242
    - data:
        cases:
        - case_id: 'true'
          conditions:
          - comparison_operator: contains
            id: c1
            value: FLAG=RAINY
            variable_selector:
            - 30code
            - text
          id: 'true'
          logical_operator: and
        selected: false
        title: 是否多雨
        type: if-else
      height: 148
      id: 30if
      position:
        x: 1026
        y: 65.5
      positionAbsolute:
        x: 1026
        y: 65.5
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 242
    - data:
        context:
          enabled: false
          variable_selector: []
        model:
          completion_params:
            temperature: 0.6
          mode: chat
          name: claude-sonnet-5
          provider: langgenius/anthropic/anthropic
        prompt_template:
        - id: s雨天行程規劃
          role: system
          text: '你是在地旅遊規劃師。這幾天當地『降雨機率較高』，請以室內或不怕雨的行程為主（博物館、美術館、購物、溫泉、室內樂園、有頂商店街），並在戶外景點附上雨天備案。

            目的地：{{#30s.city#}}，天數：{{#30s.days#}} 天，偏好：{{#30s.interest#}}。

            天氣資訊：

            {{#30code.text#}}


            請規劃逐日行程（每天分上午/下午/晚上），景點與餐飲要具體、動線合理，並標註大約交通方式。繁體中文、Markdown。'
        - id: u雨天行程規劃
          role: user
          text: 請開始。
        selected: false
        title: 雨天行程規劃
        type: llm
        vision:
          enabled: false
      height: 88
      id: 30lrain
      position:
        x: 1388
        y: 41.100000000000016
      positionAbsolute:
        x: 1388
        y: 41.100000000000016
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 242
    - data:
        context:
          enabled: false
          variable_selector: []
        model:
          completion_params:
            temperature: 0.6
          mode: chat
          name: claude-sonnet-5
          provider: langgenius/anthropic/anthropic
        prompt_template:
        - id: s晴天行程規劃
          role: system
          text: '你是在地旅遊規劃師。這幾天當地『天氣晴朗』，請安排較多戶外與景觀行程（公園、展望台、步道、戶外市集、景點漫遊），並善用好天氣。

            目的地：{{#30s.city#}}，天數：{{#30s.days#}} 天，偏好：{{#30s.interest#}}。

            天氣資訊：

            {{#30code.text#}}


            請規劃逐日行程（每天分上午/下午/晚上），景點與餐飲要具體、動線合理，並標註大約交通方式。繁體中文、Markdown。'
        - id: u晴天行程規劃
          role: user
          text: 請開始。
        selected: false
        title: 晴天行程規劃
        type: llm
        vision:
          enabled: false
      height: 88
      id: 30lclear
      position:
        x: 1388
        y: 209.10000000000002
      positionAbsolute:
        x: 1388
        y: 209.10000000000002
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 242
    - data:
        output_type: string
        selected: false
        title: 彙整行程
        type: variable-aggregator
        variables:
        - - 30lrain
          - text
        - - 30lclear
          - text
      height: 134
      id: 30agg
      position:
        x: 1750
        y: 116.76666666666668
      positionAbsolute:
        x: 1750
        y: 116.76666666666668
      selected: true
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 242
    - data:
        context:
          enabled: false
          variable_selector: []
        model:
          completion_params:
            temperature: 0.5
          mode: chat
          name: claude-sonnet-5
          provider: langgenius/anthropic/anthropic
        prompt_template:
        - id: s實用建議
          role: system
          text: '根據下方的天氣與行程，給旅客 4-6 條實用叮嚀：該帶什麼（依天氣）、交通票券建議、預算概念、注意事項。繁體中文、條列。


            天氣：

            {{#30code.text#}}


            行程：

            {{#30agg.output#}}'
        - id: u實用建議
          role: user
          text: 請開始。
        selected: false
        title: 實用建議
        type: llm
        vision:
          enabled: false
      height: 88
      id: 30ltips
      position:
        x: 2092
        y: 162.10000000000002
      positionAbsolute:
        x: 2092
        y: 162.10000000000002
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 242
    - data:
        selected: false
        template: '# {{ city }} {{ days }} 日行程手冊


          ## ☁️ 天氣概況

          {{ weather }}


          ## 🗺️ 建議行程

          {{ plan }}


          ## 🎒 實用叮嚀

          {{ tips }}

          '
        title: 組裝行程手冊
        type: template-transform
        variables:
        - value_selector:
          - 30s
          - city
          variable: city
        - value_selector:
          - 30s
          - days
          variable: days
        - value_selector:
          - 30code
          - text
          variable: weather
        - value_selector:
          - 30agg
          - output
          variable: plan
        - value_selector:
          - 30ltips
          - text
          variable: tips
      height: 52
      id: 30tpl
      position:
        x: 2434
        y: 194.76666666666668
      positionAbsolute:
        x: 2434
        y: 194.76666666666668
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 242
    - data:
        outputs:
        - value_selector:
          - 30tpl
          - output
          value_type: string
          variable: handbook
        selected: false
        title: 輸出
        type: end
      height: 88
      id: 30e
      position:
        x: 2776
        y: 185.43333333333337
      positionAbsolute:
        x: 2776
        y: 185.43333333333337
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 242
    viewport:
      x: -644.190372914031
      y: 367.6201779223648
      zoom: 0.3590577745647328
  rag_pipeline_variables: []
