Skip to content

Commit 6efb32f

Browse files
committed
update copyright
1 parent 36a5e46 commit 6efb32f

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

docs/guardrails/copyright.md

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,47 +4,43 @@ title: Copyrighted Content
44

55
# Copyrighted Content
66
<div class='subtitle'>
7-
{subheading}
7+
Copyright Compliance in Agentic Systems
88
</div>
99

10-
{introduction}
11-
<div class='risks'/>
12-
> **Copyrighted Content Risks**<br/>
13-
> Without safeguards, agents may:
10+
It is important to ensure that content generated by agentic systems respects intellectual property rights and avoids the unauthorized use of copyrighted material. Copyright compliance is essential not only for legal and ethical reasons, but also to protect users and organizations from liability and reputational risk.
1411

15-
> * {reasons}
16-
17-
{bridge}
12+
Guardrails provides the `copyright` function to detect if any licenses are present in a given piece of text, to protect against exactly this.
1813

1914
## copyright <span class="detector-badge"></span>
2015
```python
2116
def copyright(
2217
data: Union[str, List[str]],
2318
) -> List[str]
2419
```
25-
Detects potentially copyrighted material in the given `data`.
20+
Detects copyrighted text material if it is in `data` and returns the detected licenses.
2621

2722
**Parameters**
2823

2924
| Name | Type | Description |
3025
|-------------|--------|----------------------------------------|
31-
| `data` | `Union[str, List[str]]` | A single message or a list of messages. |
26+
| `data` | `str | List[str]` | A single message or a list of messages. |
3227

3328
**Returns**
3429

3530
| Type | Description |
3631
|--------|----------------------------------------|
3732
| `List[str]` | List of detected copyright types. For example, `["GNU_AGPL_V3", "MIT_LICENSE", ...]`|
3833

39-
### Detecting Copyrighted content
34+
### Detecting copyrighted content
35+
The simplest use-case of the `copyright` function is to apply it directly to messages, as seen below.
4036

41-
**Example:** Detecting Copyrighted content
37+
**Example:** Detecting copyrighted content
4238
```guardrail
4339
from invariant.detectors import copyright
4440

4541
raise "found copyrighted code" if:
4642
(msg: Message)
47-
not empty(copyright(msg.content, threshold=0.75))
43+
not empty(copyright(msg.content))
4844
```
4945
```example-trace
5046
[

0 commit comments

Comments
 (0)