This repository was archived by the owner on Jul 4, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed
cortex-js/src/infrastructure Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import { ThreadsUsecases } from '@/usecases/threads/threads.usecases';
1212import { CreateThreadDto } from '@/infrastructure/dtos/threads/create-thread.dto' ;
1313import { UpdateThreadDto } from '@/infrastructure/dtos/threads/update-thread.dto' ;
1414import { DeleteThreadResponseDto } from '@/infrastructure/dtos/threads/delete-thread.dto' ;
15+ import { GetThreadResponseDto } from '@/infrastructure/dtos/threads/get-thread.dto' ;
1516import {
1617 ApiCreatedResponse ,
1718 ApiOkResponse ,
@@ -38,6 +39,11 @@ export class ThreadsController {
3839 return this . threadsService . findAll ( ) ;
3940 }
4041
42+ @ApiResponse ( {
43+ status : 200 ,
44+ description : 'Ok' ,
45+ type : GetThreadResponseDto ,
46+ } )
4147 @ApiOperation ( { summary : 'Get thread' , description : "Retrieves a thread along with its configurations." } )
4248 @ApiParam ( { name : 'id' , required : true , description : "The unique identifier of the thread." } )
4349 @Get ( ':id' )
Original file line number Diff line number Diff line change 1+ import { ApiProperty } from '@nestjs/swagger' ;
2+
3+ export class GetThreadResponseDto {
4+ @ApiProperty ( { example : 'thread_abc123' , description : 'The identifier of the thread.' } )
5+ id : string ;
6+
7+ @ApiProperty ( { example : 'thread' , description : 'Type of the object' } )
8+ object : string ;
9+
10+ @ApiProperty ( { example : 1699014083 , description : 'Unix timestamp representing the creation time of the thread.' , type : 'integer' } )
11+ created_at : number ;
12+
13+ @ApiProperty ( { example : [ 'assistant-001' ] , description : 'List of assistants involved in the thread.' , type : [ String ] } )
14+ assistants : string [ ] ;
15+
16+ @ApiProperty ( { example : { } , description : 'Metadata associated with the thread.' } )
17+ metadata : object ;
18+
19+ @ApiProperty ( { example : [ ] , description : 'List of messages within the thread.' , type : [ String ] } )
20+ messages : string [ ] ;
21+ }
You can’t perform that action at this time.
0 commit comments