-
Notifications
You must be signed in to change notification settings - Fork 181
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix prompt string concatenation in OpenAI API example
- Loading branch information
Showing
1 changed file
with
6 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,10 +18,12 @@ | |
input_scanners = [Anonymize(vault), Toxicity(), TokenLimit(), PromptInjection()] | ||
output_scanners = [Deanonymize(vault), NoRefusal(), Relevance(), Sensitive()] | ||
|
||
prompt = "Make an SQL insert statement to add a new user to our database. Name is John Doe. Email is [email protected] " | ||
"but also possible to contact him with [email protected] email. Phone number is 555-123-4567 and " | ||
"the IP address is 192.168.1.100. And credit card number is 4567-8901-2345-6789. " | ||
"He works in Test LLC." | ||
prompt = ( | ||
"Make an SQL insert statement to add a new user to our database. Name is John Doe. Email is [email protected] " | ||
"but also possible to contact him with [email protected] email. Phone number is 555-123-4567 and " | ||
"the IP address is 192.168.1.100. And credit card number is 4567-8901-2345-6789. " | ||
"He works in Test LLC." | ||
) | ||
|
||
sanitized_prompt, results_valid, results_score = scan_prompt(input_scanners, prompt) | ||
if any(results_valid.values()) is False: | ||
|