123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- import { Controller, Get, Query, Post, Body } from '@nestjs/common'
- import { ApiOperation, ApiTags } from '@nestjs/swagger'
- import {
- CreateTestTaskDto,
- GetTestTaskListDto,
- StopTestTaskDto,
- ResumeTestTaskDto,
- GetTestTaskConversationsDto
- } from '@/dto/agent-test'
- import { AgentTestService } from './service/agent-test.service'
- @ApiTags('agent-test')
- @Controller('agent-test')
- export class AgentTestController {
- constructor(private readonly agentTestService: AgentTestService) {}
- @Post('create-test-task')
- @ApiOperation({ summary: '创建测试任务' })
- async createTestTask(@Body() body: CreateTestTaskDto) {
- return this.agentTestService.createTestTask(body)
- }
- @Get('get-evaluate-type')
- @ApiOperation({ summary: '获取评估类型' })
- async getEvaluateType() {
- return this.agentTestService.getEvaluateType()
- }
- @Get('get-test-task-list')
- @ApiOperation({ summary: '获取测试任务列表' })
- async getTestTaskList(@Query() query: GetTestTaskListDto) {
- return this.agentTestService.getTestTaskList(query)
- }
- @Post('stop-test-task')
- @ApiOperation({ summary: '停止测试任务' })
- async stopTestTask(@Body() body: StopTestTaskDto) {
- return this.agentTestService.stopTestTask(body)
- }
- @Post('resume-test-task')
- @ApiOperation({ summary: '恢复测试任务' })
- async resumeTestTask(@Body() body: ResumeTestTaskDto) {
- return this.agentTestService.resumeTestTask(body)
- }
- @Get('get-test-task-conversations')
- @ApiOperation({ summary: '获取测试任务会话列表' })
- async getTestTaskConversations(@Query() query: GetTestTaskConversationsDto) {
- return this.agentTestService.getTestTaskConversations(query)
- }
- }
|