feat: 增强 Chat 能力并补充单机部署方案
完善会话消息删除、Qwen 联网搜索/深度思考参数与 SSE 来源事件,同时增加请求体日志与 TS6 配置兼容调整,并新增 Ubuntu+PM2+Nginx 的部署文档与脚本以支持可回滚发布。 Made-with: Cursor
This commit is contained in:
@@ -1,6 +1,13 @@
|
||||
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
||||
import { Type } from 'class-transformer';
|
||||
import { IsArray, IsIn, IsOptional, IsString, ValidateNested } from 'class-validator';
|
||||
import {
|
||||
IsArray,
|
||||
IsBoolean,
|
||||
IsIn,
|
||||
IsOptional,
|
||||
IsString,
|
||||
ValidateNested,
|
||||
} from 'class-validator';
|
||||
import { StreamChatRequest } from '@shared/ai-gateway/types/chat.types';
|
||||
|
||||
export class ChatMessageDto {
|
||||
@@ -43,6 +50,24 @@ export class StreamChatBodyDto implements StreamChatRequest {
|
||||
@IsString()
|
||||
platform?: string;
|
||||
|
||||
@ApiPropertyOptional({
|
||||
type: Boolean,
|
||||
description: '是否启用联网搜索(当前仅 qwen 平台生效)',
|
||||
example: true,
|
||||
})
|
||||
@IsOptional()
|
||||
@IsBoolean()
|
||||
enableWebSearch?: boolean;
|
||||
|
||||
@ApiPropertyOptional({
|
||||
type: Boolean,
|
||||
description: '是否启用深度思考(当前仅 qwen 平台生效)',
|
||||
example: true,
|
||||
})
|
||||
@IsOptional()
|
||||
@IsBoolean()
|
||||
enableThinking?: boolean;
|
||||
|
||||
@ApiProperty({
|
||||
type: () => ChatMessageDto,
|
||||
isArray: true,
|
||||
|
||||
Reference in New Issue
Block a user