- HERENCIA-SIMCO.md actualizado con directivas v3.7 y v3.8 - Actualizaciones de configuracion Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
128 lines
5.3 KiB
JavaScript
128 lines
5.3 KiB
JavaScript
"use strict";
|
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
};
|
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
};
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.ChatResponseDto = exports.UsageDto = exports.ChatChoiceDto = exports.ChatRequestDto = exports.ChatMessageDto = void 0;
|
|
const swagger_1 = require("@nestjs/swagger");
|
|
const class_validator_1 = require("class-validator");
|
|
const class_transformer_1 = require("class-transformer");
|
|
class ChatMessageDto {
|
|
}
|
|
exports.ChatMessageDto = ChatMessageDto;
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({ description: 'Message role', enum: ['system', 'user', 'assistant'] }),
|
|
(0, class_validator_1.IsString)(),
|
|
(0, class_validator_1.IsIn)(['system', 'user', 'assistant']),
|
|
__metadata("design:type", String)
|
|
], ChatMessageDto.prototype, "role", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({ description: 'Message content' }),
|
|
(0, class_validator_1.IsString)(),
|
|
__metadata("design:type", String)
|
|
], ChatMessageDto.prototype, "content", void 0);
|
|
class ChatRequestDto {
|
|
}
|
|
exports.ChatRequestDto = ChatRequestDto;
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({ description: 'Array of chat messages', type: [ChatMessageDto] }),
|
|
(0, class_validator_1.IsArray)(),
|
|
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
(0, class_transformer_1.Type)(() => ChatMessageDto),
|
|
__metadata("design:type", Array)
|
|
], ChatRequestDto.prototype, "messages", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiPropertyOptional)({ description: 'Model to use (e.g., anthropic/claude-3-haiku)' }),
|
|
(0, class_validator_1.IsOptional)(),
|
|
(0, class_validator_1.IsString)(),
|
|
__metadata("design:type", String)
|
|
], ChatRequestDto.prototype, "model", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiPropertyOptional)({ description: 'Temperature (0-2)', default: 0.7 }),
|
|
(0, class_validator_1.IsOptional)(),
|
|
(0, class_validator_1.IsNumber)(),
|
|
(0, class_validator_1.Min)(0),
|
|
(0, class_validator_1.Max)(2),
|
|
__metadata("design:type", Number)
|
|
], ChatRequestDto.prototype, "temperature", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiPropertyOptional)({ description: 'Maximum tokens to generate', default: 2048 }),
|
|
(0, class_validator_1.IsOptional)(),
|
|
(0, class_validator_1.IsNumber)(),
|
|
(0, class_validator_1.Min)(1),
|
|
(0, class_validator_1.Max)(32000),
|
|
__metadata("design:type", Number)
|
|
], ChatRequestDto.prototype, "max_tokens", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiPropertyOptional)({ description: 'Top P sampling (0-1)', default: 1.0 }),
|
|
(0, class_validator_1.IsOptional)(),
|
|
(0, class_validator_1.IsNumber)(),
|
|
(0, class_validator_1.Min)(0),
|
|
(0, class_validator_1.Max)(1),
|
|
__metadata("design:type", Number)
|
|
], ChatRequestDto.prototype, "top_p", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiPropertyOptional)({ description: 'Stream response', default: false }),
|
|
(0, class_validator_1.IsOptional)(),
|
|
__metadata("design:type", Boolean)
|
|
], ChatRequestDto.prototype, "stream", void 0);
|
|
class ChatChoiceDto {
|
|
}
|
|
exports.ChatChoiceDto = ChatChoiceDto;
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)(),
|
|
__metadata("design:type", Number)
|
|
], ChatChoiceDto.prototype, "index", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)(),
|
|
__metadata("design:type", ChatMessageDto)
|
|
], ChatChoiceDto.prototype, "message", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)(),
|
|
__metadata("design:type", String)
|
|
], ChatChoiceDto.prototype, "finish_reason", void 0);
|
|
class UsageDto {
|
|
}
|
|
exports.UsageDto = UsageDto;
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)(),
|
|
__metadata("design:type", Number)
|
|
], UsageDto.prototype, "prompt_tokens", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)(),
|
|
__metadata("design:type", Number)
|
|
], UsageDto.prototype, "completion_tokens", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)(),
|
|
__metadata("design:type", Number)
|
|
], UsageDto.prototype, "total_tokens", void 0);
|
|
class ChatResponseDto {
|
|
}
|
|
exports.ChatResponseDto = ChatResponseDto;
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)(),
|
|
__metadata("design:type", String)
|
|
], ChatResponseDto.prototype, "id", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)(),
|
|
__metadata("design:type", String)
|
|
], ChatResponseDto.prototype, "model", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({ type: [ChatChoiceDto] }),
|
|
__metadata("design:type", Array)
|
|
], ChatResponseDto.prototype, "choices", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)(),
|
|
__metadata("design:type", UsageDto)
|
|
], ChatResponseDto.prototype, "usage", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)(),
|
|
__metadata("design:type", Number)
|
|
], ChatResponseDto.prototype, "created", void 0);
|
|
//# sourceMappingURL=chat.dto.js.map
|