diff --git a/comps/guardrails/toxicity_detection/requirements.txt b/comps/guardrails/toxicity_detection/requirements.txt index 9d4fe17833..64bfa169cb 100644 --- a/comps/guardrails/toxicity_detection/requirements.txt +++ b/comps/guardrails/toxicity_detection/requirements.txt @@ -5,7 +5,6 @@ httpx huggingface_hub langchain-community langchain-huggingface -langsmith opentelemetry-api opentelemetry-exporter-otlp opentelemetry-sdk diff --git a/comps/guardrails/toxicity_detection/toxicity_detection.py b/comps/guardrails/toxicity_detection/toxicity_detection.py index bb89f53dbd..df965505f5 100644 --- a/comps/guardrails/toxicity_detection/toxicity_detection.py +++ b/comps/guardrails/toxicity_detection/toxicity_detection.py @@ -1,9 +1,6 @@ # Copyright (C) 2024 Intel Corporation # SPDX-License-Identifier: Apache-2.0 -from langsmith import traceable - -# from utils import initialize_model from transformers import pipeline from comps import ServiceType, TextDoc, opea_microservices, register_microservice @@ -18,7 +15,6 @@ input_datatype=TextDoc, output_datatype=TextDoc, ) -@traceable(run_type="llm") def llm_generate(input: TextDoc): input_text = input.text toxic = toxicity_pipeline(input_text)