You've already forked DataMate
Add three new LLM-powered auto-annotation operators: - LLMTextClassification: Text classification using LLM - LLMNamedEntityRecognition: Named entity recognition with type validation - LLMRelationExtraction: Relation extraction with entity and relation type validation Key features: - Load LLM config from t_model_config table via modelId parameter - Lazy loading of LLM configuration on first execute() - Result validation with whitelist checking for entity/relation types - Fault-tolerant: returns empty results on LLM failure instead of throwing - Fully compatible with existing Worker pipeline Files added: - runtime/ops/annotation/_llm_utils.py: Shared LLM utilities - runtime/ops/annotation/llm_text_classification/: Text classification operator - runtime/ops/annotation/llm_named_entity_recognition/: NER operator - runtime/ops/annotation/llm_relation_extraction/: Relation extraction operator Files modified: - runtime/ops/annotation/__init__.py: Register 3 new operators - runtime/python-executor/datamate/auto_annotation_worker.py: Add to Worker whitelist - frontend/src/pages/DataAnnotation/OperatorCreate/hooks/useOperatorOperations.ts: Add to frontend whitelist
17 lines
501 B
Python
17 lines
501 B
Python
# -*- coding: utf-8 -*-
|
|
"""Annotation-related operators (e.g. YOLO detection, LLM-based NLP annotation)."""
|
|
|
|
from . import image_object_detection_bounding_box
|
|
from . import test_annotation_marker
|
|
from . import llm_text_classification
|
|
from . import llm_named_entity_recognition
|
|
from . import llm_relation_extraction
|
|
|
|
__all__ = [
|
|
"image_object_detection_bounding_box",
|
|
"test_annotation_marker",
|
|
"llm_text_classification",
|
|
"llm_named_entity_recognition",
|
|
"llm_relation_extraction",
|
|
]
|