Skip to content

Support tool calling for the Laguna chat templates #180

Support tool calling for the Laguna chat templates

Support tool calling for the Laguna chat templates #180

name: Check chat templates against the Hub
on:
schedule:
- cron: '0 2 * * 1' # Runs weekly on Monday at 2am UTC
workflow_dispatch:
pull_request:
paths:
- ".github/workflows/chat_templates_check.yml"
- "scripts/check_chat_templates.py"
- "trl/chat_templates/**"
env:
CI_SLACK_CHANNEL: ${{ secrets.CI_PUSH_MAIN_CHANNEL }}
HF_TOKEN: ${{ secrets.HF_TOKEN }}
permissions: {}
jobs:
check_chat_templates:
permissions:
contents: read
name: Check chat templates against the Hub
runs-on: ubuntu-latest
# Pull requests from forks or Dependabot get no `HF_TOKEN`, which the gated reference repos require
if: >-
github.event_name != 'pull_request' ||
(github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]')
steps:
- name: Git checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Python 3.13
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: '3.13'
- name: Install uv
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
with:
enable-cache: false
- name: Create Python virtual environment
run: uv venv
- name: Install dependencies
run: |
source .venv/bin/activate
uv pip install huggingface_hub
- name: Check chat templates
run: |
source .venv/bin/activate
python scripts/check_chat_templates.py
- name: Post to Slack
if: github.ref == 'refs/heads/main' && !cancelled()
uses: ./.github/actions/post-slack
with:
slack_channel: ${{ env.CI_SLACK_CHANNEL }}
title: Check chat templates against the Hub
slack_token: ${{ secrets.SLACK_CIFEEDBACK_BOT_TOKEN }}