Skip to content

painebenjamin/taproot.js

Repository files navigation


An open source real-time AI inference engine for seamless scaling

JavaScript Client

Installation (Node)

npm install taproot-client

Installation (Browser)

Include one of the compiled .min.js release files in your project.

Usage

// Point to a running taproot cluster
const taproot = new Taproot("ws://127.0.0.1:32189");

// Request an echo, response is the same type as sent
taproot.invoke({
  task: "echo",
  parameters: {
    message: "Hello, world!"
  }
}).then(console.log).catch(console.error);

// Requests an image using SDXL turbo then outputs it to the document
let appendToDocument = document.body.append.bind(document.body);
taproot.invoke({
  task: "image-generation",
  model: "stable-diffusion-xl-turbo",
  parameters: {
    prompt: "A cat wearing a hat",
    output_type: "jpg"
  }
}).then(appendToDocument).catch(console.error);

About

JavaScript Client for Taproot: An open source real-time AI inference engine for seamless scaling

Resources

License

Stars

Watchers

Forks

Packages

No packages published