Suppress.js is a small library that makes integrating AI into any existing or new application easy, and responsible.
🏁
Quickstart Who is this for? This library has been made to be used by developers at any level. If you are a beginner, you can use this library to get started with AI. If you are an expert, you can use this library to quickly integrate AI into your existing or new application.
📥
Ready Follow along with the installation notebook to get started.
First, install the package from npm:
npm install ai.suppress.js
Set
Once installed, lets import some main components from the library:
const { SuppresServer, DataGenerator, OpenAILLM } = require("ai.suppress.js");
Now we construct these components:
const server = new SuppresServer();
const llm = new OpenAILLM("OPENAI_API_KEY");
Now that we have the base all set up, lets register some endpoints
server.createEndpoint(
"/hello/:name/:country",
"GET",
new DataGenerator(
"Write a greeting for {name}. Create a brief description of {country}, in which the user lives.",
JSON.stringify({"greeting":"string", "description":"string"}),
llm
)
);
Go
Now we can start the server:
server.start();
And that's it! Now you can make requests to the server and get back data!
Run the server and make a request:
curl http://localhost:3000/hello/John/Spain
🚨 Responsibility & Security 🚨
When building apps which rely on AI, it is important to consider many factors. Here are some tools to help you build responsibly.
- Prompt Security Testing
- Model Insight (coming soon)
- User Key Management (coming soon)
Documentation 🕮
You can find the full documentation here.
Models
Suppress.js on it own supports OpenAI models for now. However, you can use any model that is supported by HuggingFace Transformers, if you also install mix.suppress.js
package.
Key Features
- Gives structure to data produced by LLMs
- Allows for effortless integration of AI into existing projects
- You send the data, suppress handles it. You want the data? Suppress gets it.
➕
Contributing There is plenty to do! If you want to contribute, please following standard contributing guidelines. https://docs.github.com/en/get-started/quickstart/contributing-to-projects