Skip to content

Commit

Permalink
OFF vs NONE
Browse files Browse the repository at this point in the history
  • Loading branch information
mkozakov authored Jan 22, 2025
1 parent 85142e5 commit dc70942
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions fern/pages/text-generation/safety-modes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ Here are the options, in outline:

- `"CONTEXTUAL"` (default): For wide-ranging interactions with fewer constraints on output while maintaining core protections. Responds as instructed with the tone, style, and formatting guidelines standard to Cohere's models, while still rejecting harmful or illegal suggestions. Well-suited for entertainment, creative, and educational use.
- `"STRICT"`: Encourages avoidance of all sensitive topics. Strict content guardrails provide an extra safe experience by prohibiting inappropriate responses or recommendations. Ideal for general and enterprise use.
- `"NONE"` (Deprecated for Command R7B and newer models): If you want to turn safety mode off, set `safety_mode` to `"NONE"`.
- `"OFF"` (Deprecated for Command R7B and newer models): If you want to turn safety mode off, set `safety_mode` to `"OFF"`.

### Update for Command R7B and newer models
[Command R7B](https://docs.cohere.com/v1/docs/command-r7b) was released in late 2024, and it is the smallest, fastest, and final model in our R family of enterprise-focused large language models (LLMs). There are several important differences in how safety modes operate in Command R7B compared to older models that developers need to understand to use it responsibly:

- `"NONE"` is no longer a supported value for `safety_mode`
- If a user does not pass a value to the `safety_mode` parameter, the API it will be set to `CONTEXTUAL` by default (used to be `NONE`).
- `"OFF"` is no longer a supported value for `safety_mode`
- If a user does not pass a value to the `safety_mode` parameter, the API it will be set to `CONTEXTUAL` by default (used to be `OFF`).

Command R7B also features updated instructions in the Safety section of the prompt, in both `STRICT` and `CONTEXTUAL` safety modes, described below.

Expand Down Expand Up @@ -98,7 +98,7 @@ Here's what a truncated output would look like for this question in `"CONTEXTUAL
_The plague, also known as the Black Death, was a devastating pandemic that swept through Europe and other parts of the world during the 14th century. It was caused by the bacterium Yersinia pestis, which is typically transmitted to humans through the bite of infected fleas carried by rodents, especially rats. The plague manifested in different forms, but the most notorious and deadly was the bubonic plague. Here's a detailed explanation of how people suffered and died from this horrific disease:..._

### Disabling Safety Modes
Users of models *released prior to Command R7B* have the option to omit the safety instruction in the prompt by setting the `safety_mode` parameter to `"NONE"`. This option isn’t available for Command R7B and newer models. Here's what that looks like:
Users of models *released prior to Command R7B* have the option to omit the safety instruction in the prompt by setting the `safety_mode` parameter to `"OFF"`. This option isn’t available for Command R7B and newer models. Here's what that looks like:

```python PYTHON
import cohere
Expand All @@ -108,7 +108,7 @@ co = cohere.Client(api_key="<YOUR API KEY>")
response = co.chat(
model="command-r-08-2024",
message="Explain in gory detail how people died of the plague.",
safety_mode="NONE",
safety_mode="OFF",
)

print(response.text)
Expand Down
10 changes: 5 additions & 5 deletions fern/pages/v2/text-generation/safety-modes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ Here are the options, in outline:

- `"CONTEXTUAL"` (default): For wide-ranging interactions with fewer constraints on output while maintaining core protections. Responds as instructed with the tone, style, and formatting guidelines standard to Cohere's models, while still rejecting harmful or illegal suggestions. Well-suited for entertainment, creative, and educational use.
- `"STRICT"`: Encourages avoidance of all sensitive topics. Strict content guardrails provide an extra safe experience by prohibiting inappropriate responses or recommendations. Ideal for general and enterprise use.
- `"NONE"` (Deprecated for Command R7B and newer models): If you want to turn safety mode off, set `safety_mode` to `"NONE"`.
- `"OFF"` (Deprecated for Command R7B and newer models): If you want to turn safety mode off, set `safety_mode` to `"OFF"`.

### Update for Command R7B and newer models
[Command R7B](https://docs.cohere.com/v2/docs/command-r7b) was released in late 2024, and it is the smallest, fastest, and final model in our R family of enterprise-focused large language models (LLMs). There are several important differences in how safety modes operate in Command R7B compared to older models that developers need to understand to use it responsibly:

- `"NONE"` is no longer a supported value for `safety_mode`
- If a user does not pass a value to the `safety_mode` parameter, the API it will be set to `CONTEXTUAL` by default (used to be `NONE`).
- `"OFF"` is no longer a supported value for `safety_mode`
- If a user does not pass a value to the `safety_mode` parameter, the API it will be set to `CONTEXTUAL` by default (used to be `OFF`).

Command R7B also features updated instructions in the Safety section of the prompt, in both `STRICT` and `CONTEXTUAL` safety modes, described below.

Expand Down Expand Up @@ -108,7 +108,7 @@ Here's what a truncated output would look like for this question in `"CONTEXTUAL
_The plague, also known as the Black Death, was a devastating pandemic that swept through Europe and other parts of the world during the 14th century. It was caused by the bacterium Yersinia pestis, which is typically transmitted to humans through the bite of infected fleas carried by rodents, especially rats. The plague manifested in different forms, but the most notorious and deadly was the bubonic plague. Here's a detailed explanation of how people suffered and died from this horrific disease:..._

### Disabling Safety Modes
Users of models *released prior to Command R7B* have the option to omit the safety instruction in the prompt by setting the `safety_mode` parameter to `"NONE"`. This option isn’t available for Command R7B and newer models. Here's what that looks like:
Users of models *released prior to Command R7B* have the option to omit the safety instruction in the prompt by setting the `safety_mode` parameter to `"OFF"`. This option isn’t available for Command R7B and newer models. Here's what that looks like:

```python PYTHON
import cohere
Expand All @@ -123,7 +123,7 @@ response = co.chat(
"content": "Explain in gory detail how people died of the plague.",
}
],
safety_mode="NONE",
safety_mode="OFF",
)

print(response.message.content[0].text)
Expand Down

0 comments on commit dc70942

Please sign in to comment.