feat: add chatbot conversations endpoint
This commit is contained in:
@@ -27,6 +27,17 @@ export class ChatbotService {
|
||||
private readonly openRouterService: OpenRouterService,
|
||||
) {}
|
||||
|
||||
public async getConversations(user: User) {
|
||||
const conversations =
|
||||
await this.conversationService.findConversationsByUser(user);
|
||||
|
||||
return conversations.map((conversation) => ({
|
||||
conversationId: conversation.id,
|
||||
title: conversation.title,
|
||||
updatedAt: conversation.updatedAt,
|
||||
}));
|
||||
}
|
||||
|
||||
private async getConversationMessages(
|
||||
user: User,
|
||||
message: string,
|
||||
|
||||
Reference in New Issue
Block a user