import { RaijinLabsLucidAiCore } from "raijin-labs-lucid-ai/core.js";
import { matchCompute } from "raijin-labs-lucid-ai/funcs/matchCompute.js";
// Use `RaijinLabsLucidAiCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const raijinLabsLucidAi = new RaijinLabsLucidAiCore();
async function run() {
const res = await matchCompute(raijinLabsLucidAi, {
body: {
modelMeta: {
schemaVersion: "1.0",
modelPassportId: "ppt_model_7xK9mQ2v",
format: "safetensors",
runtimeRecommended: "vllm",
contextLength: 32768,
requirements: {
minVramGb: 16,
},
},
policy: {
policyVersion: "1.0",
allowRegions: [
"us-east-1",
],
latency: {
p95MsBudget: 500,
},
},
computeCatalog: [
{
schemaVersion: "1.0",
computePassportId: "ppt_compute_Xn5vR2kJ",
providerType: "cloud",
regions: [
"us-east-1",
],
hardware: {
gpu: "NVIDIA-A100-40GB",
vramGb: 40,
},
runtimes: [
{
name: "tensorrt",
},
],
endpoints: {
inferenceUrl: "https://ironclad-puritan.biz/",
},
},
],
},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("matchCompute failed:", res.error);
}
}
run();