feat: add multimodal analysis support to LLM moderation client by processing image attachments

This commit is contained in:
MythEclipse
2026-05-17 23:56:04 +07:00
parent 059d569566
commit 51dc1f8869
21 changed files with 443 additions and 83 deletions
+14 -9
View File
@@ -3,24 +3,29 @@ import { demux } from "@dank074/discord-video-stream/dist/media/LibavDemuxer.js"
async function run() {
console.log("Starting prepareStream...");
const { command, output } = prepareStream("https://samplelib.com/preview/mp4/sample-5s.mp4", {
encoder: Encoders.software(),
width: 1280,
height: 720,
includeAudio: true,
minimizeLatency: false // Add this
});
const { command, output } = prepareStream(
"https://samplelib.com/preview/mp4/sample-5s.mp4",
{
encoder: Encoders.software(),
width: 1280,
height: 720,
includeAudio: true,
minimizeLatency: false, // Add this
},
);
try {
const { video, audio } = await demux(output, { format: "nut" });
console.log("DEMUX VIDEO:", !!video);
console.log("DEMUX AUDIO:", !!audio);
} catch(e) {
} catch (e) {
console.error("DEMUX ERR:", e);
}
setTimeout(() => {
try { command.kill("SIGKILL"); } catch(e) {}
try {
command.kill("SIGKILL");
} catch (e) {}
process.exit(0);
}, 10000);
}