PLUGIN

Report

8 Downloads

src / index.ts

import { type PluginContext } from "@lmstudio/sdk";
import { configSchematics, globalConfigSchematics } from "./config";
import { generate } from "./generator";

// This is the entry point of the plugin. The main function is to register different components of
// the plugin, such as preprocessor, predictionLoopHandler, etc.
//
// You do not need to modify this file unless you want to add more components to the plugin, and/or
// add custom initialization logic.

export async function main(context: PluginContext) {
  // Register the configuration schematics.
  context.withConfigSchematics(configSchematics);
  // Register the global configuration schematics.
  context.withGlobalConfigSchematics(globalConfigSchematics);
  // Register the generator.
  context.withGenerator(generate);
}