Download utils.py from airworkx/vertexchat: direct link, hf CLI and curl.
- Browser
- Download file 845 Bytes
-
https://huggingface.co/airworkx/vertexchat/resolve/main/utils.py
- Command line
-
hf download hf://airworkx/vertexchat/utils.py
-
curl -L -o utils.py https://huggingface.co/airworkx/vertexchat/resolve/main/utils.py
845 Bytes
| # Original code | |
| SAFETY_SETTINGS = [ | |
| { | |
| "category": "HARM_CATEGORY_SEXUAL", | |
| "threshold": "BLOCK_NONE", | |
| }, | |
| { | |
| "category": "HARM_CATEGORY_DANGEROUS", | |
| "threshold": "BLOCK_NONE", | |
| }, | |
| { | |
| "category": "HARM_CATEGORY_HARASSMENT", | |
| "threshold": "BLOCK_NONE", | |
| }, | |
| { | |
| "category": "HARM_CATEGORY_HATE_SPEECH", | |
| "threshold": "BLOCK_NONE", | |
| }, | |
| { | |
| "category": "HARM_CATEGORY_SEXUALLY_EXPLICIT", | |
| "threshold": "BLOCK_NONE", | |
| }, | |
| { | |
| "category": "HARM_CATEGORY_DANGEROUS_CONTENT", | |
| "threshold": "BLOCK_NONE", | |
| }, | |
| ] | |
| # Modified code to allow uninterrupted chat session | |
| MODIFIED_SAFETY_SETTTINGS = SAFETY_SETTINGS.copy() | |
| for setting in MODIFIED_SAFETY_SETTTINGS: | |
| setting["threshold"] = "BLOCK_NONE" # Choose the appropriate threshold |