app:
  description: 新闻标签
  icon: ✉️
  icon_background: '#E0F2FE'
  mode: workflow
  name: 提取新闻发生的事件及经纬度信息-DeepseekV3
  use_icon_as_answer_icon: false
dependencies:
- current_identifier: null
  type: marketplace
  value:
    marketplace_plugin_unique_identifier: langgenius/volcengine_maas:0.0.10@ba0a7fc3151e89bf8645cd3abb3ccff971ee59e5b1127efca50b092dbb93bf80
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:
        isInLoop: false
        sourceType: code
        targetType: end
      id: 1745896611748-source-1727235861736-target
      source: '1745896611748'
      sourceHandle: source
      target: '1727235861736'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        isInLoop: false
        sourceType: start
        targetType: llm
      id: 1727233123593-source-1745905312976-target
      source: '1727233123593'
      sourceHandle: source
      target: '1745905312976'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInLoop: false
        sourceType: llm
        targetType: code
      id: 1745905312976-source-1745896611748-target
      source: '1745905312976'
      sourceHandle: source
      target: '1745896611748'
      targetHandle: target
      type: custom
      zIndex: 0
    nodes:
    - data:
        desc: "{\n  \"msg_info\": \"DeryckWhibley坚称他'不是骗子',前经理否认了性胁迫指控\",\n  \"sys.files\"\
          : [],\n  \"sys.user_id\": \"sl_backend_twitter\"\n}"
        selected: false
        title: 开始
        type: start
        variables:
        - label: msg_info
          max_length: 2000
          options: []
          required: true
          type: paragraph
          variable: msg_info
      height: 197
      id: '1727233123593'
      position:
        x: -36.369609408540725
        y: 274.1424650967822
      positionAbsolute:
        x: -36.369609408540725
        y: 274.1424650967822
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 243
    - data:
        desc: ''
        outputs:
        - value_selector:
          - '1745896611748'
          - result
          variable: result
        selected: false
        title: 结束
        type: end
      height: 89
      id: '1727235861736'
      position:
        x: 1052.254623008516
        y: 310.3874923435948
      positionAbsolute:
        x: 1052.254623008516
        y: 310.3874923435948
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 243
    - data:
        code: "def main(text: str) -> dict:\n    json_part = text.split(\"</think>\"\
          )[1].replace(\"```json\", \"\").replace(\"```\", \"\").replace('\\\\n',\
          \ '').strip().replace('\\\\','')\n    data = json.loads(json_part)\n   \
          \ r = []\n    r.append(data)\n    return {\n        \"result\": r,\n   \
          \ }\n"
        code_language: python3
        desc: ''
        outputs:
          result:
            children: null
            type: array[object]
        selected: false
        title: 代码执行
        type: code
        variables:
        - value_selector:
          - '1745905312976'
          - text
          variable: text
      height: 53
      id: '1745896611748'
      position:
        x: 689.7058009416385
        y: 318.0154642845672
      positionAbsolute:
        x: 689.7058009416385
        y: 318.0154642845672
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 243
    - data:
        context:
          enabled: true
          variable_selector:
          - '1727233123593'
          - msg_info
        desc: ''
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: Deepseek-R1
          provider: langgenius/volcengine_maas/volcengine_maas
        prompt_template:
        - id: e49c99a8-1450-4a33-aac4-ab525eb3e379
          role: system
          text: "```xml\n<instruction>\n你是一个专业的犯罪新闻事件及经纬度提取助手,能够精准地从各类文本中提取新闻犯罪事件的关键信息。请按照以下步骤处理输入的文本信息:\n\
            \n1. **提取犯罪事件发生时间**:从文本中识别事件发生的具体时间,包括日期和时间(格式必须为“2023-05-15”)。若文本中未明确提及时间,则标记为“”,输出字段为:event_time。\n\
            \n2. **分类犯罪事件类型**:从给定的犯罪类型列表中选择最匹配的类别。列表包括:纵火、袭击、入室盗窃、扰乱公共秩序、毒品/酒精、酒驾/醉驾、欺诈、杀人、车辆盗窃、抢劫、性犯罪、盗窃、破坏公物、车内盗窃、武器犯罪、其他。若无法明确分类,则标记为“其他”,输出字段为:event_type。\n\
            \n3. **确定犯罪点经纬度**:从文本中提取事件发生的具体地点(如“Bang Lamung, Chon Buri”)且不需要翻译,并转换为经纬度坐标。若地点不明确,则采用最匹配地点的经纬度(如城市中心坐标)。若无法确定,则标记为“”,输出字段为:location,longitude,latitude。\n\
            \n4. **总结犯罪详情**:用50字以内的简洁语言概括事件的核心内容,包括犯罪手段、受害者或损失情况等,输出字段为:content。\n\
            \n请按照以下步骤操作:\n- 仔细阅读输入的消息,确保理解所有关键信息。。\n- 用简洁的语言总结消息,确保通俗易懂且不超过50字。\n\
            - 根据事件性质判断事件类型(如纵火、袭击、入室盗窃、扰乱公共秩序等)。\n- 将提取的信息整理为JSON格式,确保字段名与要求一致(event_time、event_type、location、longitude、latitude、content)。\n\
            - 事件发生的时间格式,必须为:xxxx-xx-xx。\n- 输出时不要包含任何XML标签,仅提供纯JSON格式内容。\n输出格式为JSON,包含以下字段:\
            \  \n- `event_time`:事件时间  \n- `event_type`:事件类型  \n- `location`:事件发生地点\n\
            - `longitude`:经度  \n- `latitude`:纬度  \n- `content`:事件详情  \n</instruction>\n\
            \n<examples>\n<example>\n输入:  \n“2023年10月12日晚,一名男子在上海市浦东新区持刀抢劫便利店,抢走现金5000元后逃离现场。”\
            \  \n\n输出:  \n{\n  \"event_time\": \"2023-10-12\",\n  \"event_type\":\
            \ \"抢劫\",\n  \"location\": \"上海市浦东新区\",\n  \"longitude\": \"121.5677\"\
            ,\n  \"latitude\": \"31.2456\",\n  \"content\": \"男子持刀抢劫便利店,抢走现金5000元。\"\
            \n}\n</example>\n\n<example>\n输入:  \n“5月20日凌晨,杭州市西湖区某酒吧发生群体斗殴事件,造成3人轻伤,警方已介入调查。”\
            \  \n\n输出:  \n{\n  \"event_time\": \"2025-05-20\",\n  \"event_type\":\
            \ \"扰乱公共秩序\",\n \"location\": \"杭州市西湖区\",\n  \"longitude\": \",\n  \"\
            latitude\": \"\",\n  \"content\": \"杭州市西湖区某酒吧发生群体斗殴事件\"\n}\n</example>"
        - id: dfd9b8ea-7e8c-4f38-be89-75b1624b41a7
          role: user
          text: '{{#1727233123593.msg_info#}}}'
        selected: true
        title: LLM
        type: llm
        variables: []
        vision:
          enabled: false
      height: 89
      id: '1745905312976'
      position:
        x: 321.58798976900476
        y: 293.2033137258802
      positionAbsolute:
        x: 321.58798976900476
        y: 293.2033137258802
      selected: true
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 243
    viewport:
      x: -270.50630049668894
      y: 9.884318461029522
      zoom: 0.8242832714190462