🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
import type { VideoGenerationModelRef } from '@lobechat/builtin-tool-video-generation';
import debug from 'debug';
import { lambdaClient } from '@/libs/trpc/client';
import { type CreateVideoServicePayload } from '@/server/routers/lambda/video';
const log = debug('lobe-video:service');
export class AiVideoService {
async createVideo(payload: CreateVideoServicePayload) {
log('Creating video with payload: %O', payload);
try {
const result = await lambdaClient.video.createVideo.mutate(payload);
log('Video creation service call completed: %O', {
batchId: result.data?.batch?.id,
generationCount: result.data?.generations?.length,
success: result.success,
});
return result;
} catch (error) {
log('Video creation service call failed: %O', {
error: (error as Error).message,
payload,
});
throw error;
}
}
async getModelLatencies(models: VideoGenerationModelRef[]) {
return lambdaClient.video.getModelLatencies.query({ models });
}
}
export const videoService = new AiVideoService();