jaikit-flows
Login

cars_daily_refresh — Catalogue voitures EV/hybride — refresh quotidien

sha=cb5d38366ed6 · visibility=admin · tags=cars, ev, daily, llm
🚫 Workflow bloqué — composants manquants (5)

Le bouton "Run now" est désactivé tant que ces erreurs ne sont pas résolues.

id: cars_daily_refresh
name: Catalogue voitures EV/hybride — refresh quotidien
description: |
  Pull RSS constructeurs → dedup contre jaikit-car canary → extract LLM →
  HITL si confidence < 0.8 → insert dans la canary slot → notif Telegram.

owner: admin
visibility: admin
tags: [cars, ev, daily, llm]

triggers:
  - type: cron
    expr: "0 6 * * *"
    timezone: Europe/Paris

inputs:
  feeds:
    type: list
    default:
      - https://www.renault.com/fr/actualites.rss
      - https://www.byd.com/eu/news.rss
      - https://www.tesla.com/blog/feed
      - https://www.volvocars.com/intl/news/rss

env:
  JAIKIT_CAR_DB: /mnt/d/BOULOT/jaikit-car/data/catalog.db

steps:

  - id: fetch_rss
    node: http.rss
    with:
      urls: ${{ inputs.feeds }}

  - id: dedup
    node: jaikit.car_canary_diff
    with:
      items: ${{ steps.fetch_rss.outputs.items }}
      db_path: ${{ env.JAIKIT_CAR_DB }}
      id_field: id

  - id: extract_each
    node: llm.extract
    foreach: ${{ steps.dedup.outputs.new_items }}
    with:
      content: ${{ each.summary }}
      schema:
        type: object
        properties:
          model_name: {type: string}
          motorisation: {type: string}
          price_eur: {type: number}
          range_km: {type: number}
          available_from: {type: string}
        required: [model_name]
      instructions: |
        Extrais les specs d'une voiture EV/hybride à partir d'un texte court.
        Si une info manque, mets null. _confidence reflète ta certitude.
    on_low_confidence:
      hitl_gate:
        title: "Voiture mal extraite — révise"
        notify: telegram
        timeout_minutes: 1440
        on_timeout: skip

  - id: insert
    node: jaikit.car_publish
    foreach: ${{ steps.extract_each.outputs }}
    with:
      slot: canary
      db_path: ${{ env.JAIKIT_CAR_DB }}
      payload: ${{ each.data }}

  - id: notify
    node: notif.telegram
    if: ${{ steps.dedup.outputs.new_items | length }}
    with:
      message: |
        🚗 Catalogue voitures : ${{ steps.dedup.outputs.new_items | length }} nouveautés.
        Run: ${{ run.id }}

on_failure:
  - id: notify_fail
    node: notif.telegram
    with:
      message: "❌ cars_daily_refresh a échoué — run ${{ run.id }}"