name: QWED Verification Example

on:
  workflow_dispatch:  # Manual trigger only
  # push:
  #   branches: [ main ]
  # pull_request:
  #   branches: [ main ]

jobs:
  verify-math:
    name: Verify Mathematical Calculations
    runs-on: ubuntu-latest
    
    steps:
      - name: Verify Derivative
        uses: QWED-AI/qwed-verification@v2.2.0
        with:
          query: "What is the derivative of x^2?"
          provider: "openai"
          api-key: ${{ secrets.OPENAI_API_KEY }}
          model: "gpt-4o-mini"
      
      - name: Verify Integration
        uses: QWED-AI/qwed-verification@v2.2.0
        with:
          query: "What is the integral of 2x?"
          provider: "openai"
          api-key: ${{ secrets.OPENAI_API_KEY }}

  verify-logic:
    name: Verify Logical Statements
    runs-on: ubuntu-latest
    
    steps:
      - name: Verify SAT Problem
        uses: QWED-AI/qwed-verification@v2.2.0
        with:
          query: "Is (A AND B) OR (NOT A) always true?"
          provider: "anthropic"
          api-key: ${{ secrets.ANTHROPIC_API_KEY }}
          model: "claude-3-haiku-20240307"

  verify-code-security:
    name: Check Code for Security Issues
    runs-on: ubuntu-latest
    
    steps:
      - name: Verify Code Safety
        uses: QWED-AI/qwed-verification@v2.2.0
        with:
          query: |
            Is this code safe?
            ```python
            def process_user_input(data):
                return eval(data)
            ```
          verification-type: "code"
          provider: "openai"
          api-key: ${{ secrets.OPENAI_API_KEY }}

  verify-with-pii-masking:
    name: Verify with Privacy Protection
    runs-on: ubuntu-latest
    
    steps:
      - name: Secure Verification
        uses: QWED-AI/qwed-verification@v2.2.0
        with:
          query: "Calculate: my email is john@example.com, what is 2+2?"
          mask-pii: "true"
          provider: "openai"
          api-key: ${{ secrets.OPENAI_API_KEY }}
