feat: plan 18
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user