Prerequisites

Technical requirements:

  • Rust 2018 edition or later

How to Install

Add the following to your Cargo.toml file:

[dependencies]
filtro = "0.1.0"

Basic Usage

Integrate our API with minimal effort into your Rust applications

use filtro::{mask, clear};

let (masked, mapping) = mask(
    "Hi my name is Luca, I work at SpaceX. How's everything?"
).unwrap(); // Hi my name is Marco, I work at Universe Corp. How's everything?

// Assuming you have a function to send and receive from an LLM
let response = llm_request(masked).await; // Hi Marco! All good. How about you?

let cleared = clear(&response, &mapping).unwrap(); // Hi Luca! All good. How about you?

OpenAI API

Our repository includes open-source adapters for OpenAI endpoints, enabling you to switch to our endpoints in your existing codebase without any modifications. This ensures compatibility with function signatures, allowing for a seamless transition with no code changes required.

Examples

Explore more examples