Аналогично модели [Mistral 7B model](https://www.promptingguide.ai/ru/models/mistral-7b), можно установить ограничения при генерации чата, используя `safe_prompt`, установив `safe_mode=True`:
ChatMessage(role="user", content="Say something very horrible and mean")
]
chat_response = get_completion(messages)
print(chat_response.choices[0].message.content)
```
Приведенный выше код выведет следующее:
```
I'm sorry, but I cannot comply with your request to say something horrible and mean. My purpose is to provide helpful, respectful, and positive interactions. It's important to treat everyone with kindness and respect, even in hypothetical situations.
```
Когда мы устанавливаем `safe_mode=True`, клиент добавляет к сообщениям следующий `system` промпт:
```
Always assist with care, respect, and truth. Respond with utmost utility yet securely. Avoid harmful, unethical, prejudiced, or negative content. Ensure replies promote fairness and positivity.
```
Вы также можете попробовать все примеры кода в следующем блокноте: