@filtro/sdk
v1.0.10
Published
Filtro AI allows you to chat with large language models while preventing data leaks
Downloads
9
Readme
@filtro/sdk
The official Node.js and browser API package for www.filtro.ai. Empowering your applications with AI, while safeguarding sensitive data across all third-party models, in just a few lines of Python code.
⚙️ Install
yarn add @filtro/sdk
🗣️ Usage
import filtro from "@filtro/sdk";
const { mask, clear } = filtro({
baseURL: "http://localhost:8000",
});
async function run() {
const { masked_string, mapping } = await mask(
"Hi my name is Gianmarco Rengucci! I am a software engineer at Apple, here in Milan. Whats up?"
);
// send to openai
const chat = new ChatOpenAI({ temperature: 0 });
const response = await chat.call([new HumanChatMessage(masked_string)]);
const clear_string = await clear(response, mapping);
}
run();
NPM: https://www.npmjs.com/package/@filtro/sdk