feat(api): add conversation archive with vector search (MS22-DB-004, MS22-API-004)
- Add ConversationArchive Prisma model with pgvector(1536) embedding field - Migration: 20260228000000_ms22_conversation_archive - NestJS module at apps/api/src/conversation-archive/ with service, controller, DTOs, spec - POST /api/conversations/ingest — ingest session logs, auto-embed via EmbeddingService - POST /api/conversations/search — vector similarity search with agentId filter - GET /api/conversations — paginated list with agentId + date range filters - GET /api/conversations/:id — fetch full conversation including messages - Register ConversationArchiveModule in app.module.ts - 8 unit tests, all passing (vitest) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
import { IsString, IsOptional, MaxLength, IsInt, Min, Max, IsDateString } from "class-validator";
|
||||
import { Type } from "class-transformer";
|
||||
|
||||
/**
|
||||
* DTO for listing/filtering conversation archives
|
||||
*/
|
||||
export class ListConversationsDto {
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@MaxLength(500)
|
||||
agentId?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsDateString()
|
||||
startedAfter?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsDateString()
|
||||
startedBefore?: string;
|
||||
|
||||
@IsOptional()
|
||||
@Type(() => Number)
|
||||
@IsInt()
|
||||
@Min(1)
|
||||
page?: number;
|
||||
|
||||
@IsOptional()
|
||||
@Type(() => Number)
|
||||
@IsInt()
|
||||
@Min(1)
|
||||
@Max(100)
|
||||
limit?: number;
|
||||
}
|
||||
Reference in New Issue
Block a user