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
+5 -2
View File
@@ -38,7 +38,8 @@ describe("playTranscodedPreparedStream", () => {
it("pipes transcoder output to session and broadcasts to web", async () => {
// mock global broadcast
const broadcasts: Buffer[] = [];
(globalThis as any).broadcastVideoToWeb = (chunk: Buffer) => broadcasts.push(Buffer.from(chunk));
(globalThis as any).broadcastVideoToWeb = (chunk: Buffer) =>
broadcasts.push(Buffer.from(chunk));
const session = {
connection: { channel: { id: "c" } },
@@ -52,7 +53,9 @@ describe("playTranscodedPreparedStream", () => {
stop: vi.fn(),
} as any;
await playTranscodedPreparedStream("http://example.test/stream", session, { fps: 30 });
await playTranscodedPreparedStream("http://example.test/stream", session, {
fps: 30,
});
expect(session.play).toHaveBeenCalled();
expect(broadcasts.length).toBeGreaterThanOrEqual(0);
});