Prompt Injections
You can check for Prompt Injections from the /injection
REST API endpoint or
any of the official SDKs (Python, Go, Rust, JS, or cURL).
The output will include a score from 0.0 to 1.0. The higher the score, the higher the probability of the checked prompt being an injection.
Check for Prompt Injection
To check for prompt injections, you can use the following code examples. Depending on your preference or requirements, select the appropriate method for your application.
The output will look something like:
This approach presents a straightforward way for readers to choose and apply the code example that best suits their needs for generating text completions using either Python, Go, Rust, JS, or cURL.