Skip to main content

Hugging Face local text classification plugin for Open Ticket AI - on-premise ML ticket categorization

Project description

otai-hf-local

Hugging Face local text classification plugin for Open Ticket AI - on-premise ML ticket categorization.

Overview

otai-hf-local enables local, privacy-preserving text classification using Hugging Face Transformers. Run state-of-the-art NLP models entirely on-premise for ticket categorization, priority detection, and sentiment analysis without sending data to external services.

Features

  • 🤖 Local inference - Run models entirely on your infrastructure
  • 🔒 Privacy-first - No data leaves your environment
  • 🎯 Pre-trained models - Use any Hugging Face text classification model
  • GPU acceleration - Optional CUDA support for faster inference
  • 🎨 Flexible pipelines - Support for multi-label and single-label classification
  • 📊 Confidence scores - Get prediction probabilities

Installation

pip install otai-hf-local

For GPU support:

pip install otai-hf-local[gpu]

Configuration

Add the plugin to your Open Ticket AI configuration:

pipes:
  - type: hf_local
    params:
      model_name: "distilbert-base-uncased-finetuned-sst-2-english"
      device: "cpu"  # or "cuda" for GPU
      batch_size: 8

Usage

Programmatic Usage

from otai_hf_local import HFLocalClassifier

# Initialize classifier
classifier = HFLocalClassifier(
    model_name="distilbert-base-uncased-finetuned-sst-2-english",
    device="cpu"
)

# Classify text
result = await classifier.classify(
    text="The server is down and users cannot login"
)

print(result.label)  # e.g., "urgent"
print(result.confidence)  # e.g., 0.95

With Open Ticket AI

from open_ticket_ai import OpenTicketAI

# Load configuration with HF Local pipe
app = OpenTicketAI.from_yaml("config.yml")

# Process ticket through classification pipeline
result = await app.process_ticket(ticket)

Supported Models

Any Hugging Face model for text classification, including:

  • Sentiment: distilbert-base-uncased-finetuned-sst-2-english
  • Zero-shot: facebook/bart-large-mnli
  • Multi-label: joeddav/xlm-roberta-large-xnli
  • Custom models: Upload your fine-tuned models to Hugging Face

Requirements

  • Python 3.13 or higher
  • PyTorch 2.0+
  • transformers 4.52.4+
  • CUDA (optional, for GPU acceleration)

Performance

  • CPU: ~50-200ms per classification (depends on model)
  • GPU: ~10-50ms per classification
  • Batch processing: Up to 10x faster with batching

Documentation

Contributing

Contributions welcome! See the main repository for guidelines.

License

LGPL-2.1-only - See LICENSE.

Related Packages

Links

otai-zammad

Zammad ticket system integration plugin for Open Ticket AI - automated helpdesk and ITSM workflows.

Overview

otai-zammad provides seamless integration between Open Ticket AI and Zammad ticket systems. It enables automated ticket management, AI-powered classification, and intelligent workflow automation for Zammad instances.

Features

  • 🎫 Full CRUD operations - Create, read, update, and delete tickets
  • 🔍 Advanced search - Query tickets with flexible search criteria
  • 📝 Article management - Add notes and articles to tickets
  • 🔄 Real-time sync - Keep ticket data synchronized
  • 🔐 Secure authentication - Token-based API authentication
  • 🎯 Type-safe - Full Pydantic v2 validation

Installation

pip install otai-zammad

Configuration

Add the plugin to your Open Ticket AI configuration:

ticketsystem_service:
  type: zammad
  params:
    base_url: "https://your-zammad.example.com"
    access_token: "your-api-token"
    timeout: 30.0
    verify: true

Usage

Programmatic Usage

from otai_zammad import ZammadTicketsystemService
from open_ticket_ai.models import UnifiedTicket, UnifiedEntity

# Initialize service
service = ZammadTicketsystemService(
    base_url="https://your-zammad.example.com",
    access_token="your-api-token"
)

# Create a ticket
ticket = await service.create_ticket(
    UnifiedTicket(
        subject="Issue with VPN",
        body="Cannot connect to VPN after update",
        queue=UnifiedEntity(name="IT Support"),
        priority=UnifiedEntity(name="2 normal"),
        customer=UnifiedEntity(name="user@example.com")
    )
)

With Open Ticket AI

from open_ticket_ai import OpenTicketAI

# Load configuration
app = OpenTicketAI.from_yaml("config.yml")

# Use the Zammad service
tickets = await app.ticketsystem.find_tickets(limit=10)

Requirements

  • Python 3.13 or higher
  • Zammad instance with API access
  • Valid Zammad API token

Documentation

Contributing

Contributions welcome! See the main repository for guidelines.

License

LGPL-2.1-only - See LICENSE.

Related Packages

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

otai_hf_local-1.5.14.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

otai_hf_local-1.5.14-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file otai_hf_local-1.5.14.tar.gz.

File metadata

  • Download URL: otai_hf_local-1.5.14.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.8

File hashes

Hashes for otai_hf_local-1.5.14.tar.gz
Algorithm Hash digest
SHA256 58dfbb97f101c0aeff30d9d370f6790eca865761ceaa506e5dd49871a56b6dae
MD5 e6cc07b99d69cca5d328d05cf19e5fd1
BLAKE2b-256 93a9c251a4ead2ac11c1667e5660434925a0ae863867751e34acd8eb3fcff625

See more details on using hashes here.

File details

Details for the file otai_hf_local-1.5.14-py3-none-any.whl.

File metadata

File hashes

Hashes for otai_hf_local-1.5.14-py3-none-any.whl
Algorithm Hash digest
SHA256 a98f131d95ac6b600e18ed48465a8d7a87a01d10f7bb4d44da4d34020ed5d8e7
MD5 2cab69f290b8d41b8bc023de23a5da1f
BLAKE2b-256 bb56014490954042e4071638f92faab258fa4b5a15262852cf63fe8fd882e291

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page