- HERENCIA-SIMCO.md actualizado con directivas v3.7 y v3.8 - Actualizaciones de configuracion Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
107 lines
4.7 KiB
JavaScript
107 lines
4.7 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.AIConfig = exports.AIProvider = void 0;
|
|
const typeorm_1 = require("typeorm");
|
|
var AIProvider;
|
|
(function (AIProvider) {
|
|
AIProvider["OPENROUTER"] = "openrouter";
|
|
AIProvider["OPENAI"] = "openai";
|
|
AIProvider["ANTHROPIC"] = "anthropic";
|
|
AIProvider["GOOGLE"] = "google";
|
|
})(AIProvider || (exports.AIProvider = AIProvider = {}));
|
|
let AIConfig = class AIConfig {
|
|
};
|
|
exports.AIConfig = AIConfig;
|
|
__decorate([
|
|
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
__metadata("design:type", String)
|
|
], AIConfig.prototype, "id", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({ type: 'uuid' }),
|
|
__metadata("design:type", String)
|
|
], AIConfig.prototype, "tenant_id", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({ type: 'enum', enum: AIProvider, default: AIProvider.OPENROUTER }),
|
|
__metadata("design:type", String)
|
|
], AIConfig.prototype, "provider", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({ type: 'varchar', length: 100, default: 'anthropic/claude-3-haiku' }),
|
|
__metadata("design:type", String)
|
|
], AIConfig.prototype, "default_model", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
__metadata("design:type", String)
|
|
], AIConfig.prototype, "fallback_model", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({ type: 'numeric', precision: 3, scale: 2, default: 0.7 }),
|
|
__metadata("design:type", Number)
|
|
], AIConfig.prototype, "temperature", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({ type: 'int', default: 2048 }),
|
|
__metadata("design:type", Number)
|
|
], AIConfig.prototype, "max_tokens", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({ type: 'numeric', precision: 3, scale: 2, default: 1.0, nullable: true }),
|
|
__metadata("design:type", Number)
|
|
], AIConfig.prototype, "top_p", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({ type: 'numeric', precision: 3, scale: 2, default: 0.0, nullable: true }),
|
|
__metadata("design:type", Number)
|
|
], AIConfig.prototype, "frequency_penalty", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({ type: 'numeric', precision: 3, scale: 2, default: 0.0, nullable: true }),
|
|
__metadata("design:type", Number)
|
|
], AIConfig.prototype, "presence_penalty", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
__metadata("design:type", String)
|
|
], AIConfig.prototype, "system_prompt", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
__metadata("design:type", Number)
|
|
], AIConfig.prototype, "rate_limit_requests_per_minute", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
__metadata("design:type", Number)
|
|
], AIConfig.prototype, "rate_limit_tokens_per_minute", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
__metadata("design:type", Number)
|
|
], AIConfig.prototype, "rate_limit_tokens_per_month", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({ type: 'boolean', default: true }),
|
|
__metadata("design:type", Boolean)
|
|
], AIConfig.prototype, "is_enabled", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({ type: 'boolean', default: true }),
|
|
__metadata("design:type", Boolean)
|
|
], AIConfig.prototype, "allow_custom_prompts", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({ type: 'boolean', default: false }),
|
|
__metadata("design:type", Boolean)
|
|
], AIConfig.prototype, "log_conversations", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({ type: 'jsonb', default: {} }),
|
|
__metadata("design:type", Object)
|
|
], AIConfig.prototype, "settings", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.CreateDateColumn)({ type: 'timestamptz' }),
|
|
__metadata("design:type", Date)
|
|
], AIConfig.prototype, "created_at", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.UpdateDateColumn)({ type: 'timestamptz' }),
|
|
__metadata("design:type", Date)
|
|
], AIConfig.prototype, "updated_at", void 0);
|
|
exports.AIConfig = AIConfig = __decorate([
|
|
(0, typeorm_1.Entity)({ name: 'configs', schema: 'ai' })
|
|
], AIConfig);
|
|
//# sourceMappingURL=ai-config.entity.js.map
|