scanner
Classes:
Name | Description |
---|---|
EmbeddingScanner |
Defines an interface for scanning input embeddings for unauthorized prompts. |
EmbeddingScanner
¶
Bases: Protocol
Defines an interface for scanning input embeddings for unauthorized prompts.
Methods:
Name | Description |
---|---|
scan |
Scan and detect unauthorized embeddings in the input. |
scan
abstractmethod
¶
scan(input_embeddings: Tensor) -> None
Scan and detect unauthorized embeddings in the input.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
Tensor
|
The input embeddings to be scanned. |
required |
Raises:
Type | Description |
---|---|
RuntimeError
|
If any of the input embeddings are invalid. |