mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-23 11:30:37 +00:00
experimental: docstrings update (#18048)
Added missed docstrings. Formatted docsctrings to the consistent format.
This commit is contained in:
@@ -11,6 +11,8 @@ if TYPE_CHECKING:
|
||||
|
||||
|
||||
class PromptInjectionException(ValueError):
|
||||
"""Exception raised when prompt injection attack is detected."""
|
||||
|
||||
def __init__(
|
||||
self, message: str = "Prompt injection attack detected", score: float = 1.0
|
||||
):
|
||||
@@ -48,7 +50,8 @@ def _model_default_factory(
|
||||
|
||||
|
||||
class HuggingFaceInjectionIdentifier(BaseTool):
|
||||
"""Tool that uses HF model to detect prompt injection attacks."""
|
||||
"""Tool that uses HuggingFace Prompt Injection to
|
||||
detect prompt injection attacks."""
|
||||
|
||||
name: str = "hugging_face_injection_identifier"
|
||||
description: str = (
|
||||
|
Reference in New Issue
Block a user