Skip to main content

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

Release files for otai-hf-local 1.5.14

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for otai-hf-local 1.5.14
File Size Uploaded
otai_hf_local-1.5.14.tar.gz 9.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for otai-hf-local 1.5.14
File Interpreter ABI Platform
otai_hf_local-1.5.14-py3-none-any.whl Python 3 none any Details

Total release size: 15.4 kB

Release files / otai_hf_local-1.5.14.tar.gz

Download URL otai_hf_local-1.5.14.tar.gz
Size 9.4 kB
Tags Source
SHA-256 checksum
How to use checksums
58dfbb97f101c0aeff30d9d370f6790eca865761ceaa506e5dd49871a56b6dae
BLAKE2b-256 checksum
How to use checksums
93a9c251a4ead2ac11c1667e5660434925a0ae863867751e34acd8eb3fcff625
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.9.8

Release files / otai_hf_local-1.5.14-py3-none-any.whl

Download URL otai_hf_local-1.5.14-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a98f131d95ac6b600e18ed48465a8d7a87a01d10f7bb4d44da4d34020ed5d8e7
BLAKE2b-256 checksum
How to use checksums
bb56014490954042e4071638f92faab258fa4b5a15262852cf63fe8fd882e291
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.9.8

Release history Release notifications | RSS feed

This release

1.5.14 This release

2 release files

1.5.13

2 release files

1.5.11

2 release files

1.5.10

2 release files

1.5.9

2 release files

1.5.8

2 release files

1.5.7

2 release files

1.5.6

2 release files

1.5.5

2 release files

1.5.4

2 release files

1.5.3

2 release files

1.5.2

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.19

2 release files

1.4.17

2 release files

1.4.16

2 release files

1.4.15

2 release files

1.4.14

2 release files

1.4.13

2 release files

1.4.12

2 release files

1.4.11

2 release files

1.4.10

2 release files

1.4.9

2 release files

1.4.8

2 release files

1.4.7

2 release files

1.4.6

2 release files

1.4.5

2 release files

1.4.4

2 release files

1.4.3

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.1

2 release files

1.2.5

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page