Prompt for the LLM
(text, passwords)
| 118 | return doc |
| 119 | |
| 120 | def get_prompt(text, passwords): |
| 121 | """Prompt for the LLM""" |
| 122 | prompt = f"""Identify if the given password or api key below is actually a password or api key in the given text or is it a false positive. |
| 123 | If you find the password or api key, please return it between <credential></credential> tag. If there are more than one credentials, |
| 124 | include them in additional <credential></credential> tag. |
| 125 | Password: {str(passwords)} |
| 126 | Text: {text} |
| 127 | """ |
| 128 | return prompt |
| 129 | |
| 130 | def get_secrets_LLM(bert_output): |
| 131 | """Run LLM check and confirmation on the retrieved xlm-RoBERTa-base model""" |