@lobehub/chat
Version:
Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.
20 lines (16 loc) • 601 B
text/typescript
import { SessionModel } from '@/database/models/session';
import { LobeChatDatabase } from '@/database/type';
import { getServerDefaultAgentConfig } from '@/server/globalConfig';
export class AgentService {
private readonly userId: string;
private readonly db: LobeChatDatabase;
constructor(db: LobeChatDatabase, userId: string) {
this.userId = userId;
this.db = db;
}
async createInbox() {
const sessionModel = new SessionModel(this.db, this.userId);
const defaultAgentConfig = getServerDefaultAgentConfig();
await sessionModel.createInbox(defaultAgentConfig);
}
}