feat: plan 18

This commit is contained in:
thanhnv
2026-07-10 11:28:14 +09:00
parent fafccc47ad
commit d882a9dc23
15 changed files with 934 additions and 25 deletions
@@ -1,4 +1,5 @@
import { Body, Controller, Get, Headers, Inject, Post, Query } from '@nestjs/common';
import { Body, Controller, Get, Headers, Inject, Post, Query, Res } from '@nestjs/common';
import type { Response } from 'express';
import { ok } from '../common/api-response.js';
import { actorFromHeaders } from '../common/auth-context.js';
import { ChatAskInput, ChatService } from './chat.service.js';
@@ -12,6 +13,15 @@ export class ChatController {
return ok(this.svc.ask(body, actorFromHeaders(headers)));
}
@Post('ask/stream')
askStream(
@Headers() headers: Record<string, string | string[] | undefined>,
@Body() body: ChatAskInput,
@Res() res: Response,
) {
this.svc.streamAsk(body, actorFromHeaders(headers), res);
}
@Get('audit/verify')
verifyAudit() {
return ok(this.svc.verifyAudit());