Feat: System Prompts
- Se añade un sistema de prompts de gerarquía máxima para molder el asistente. - Se añade control del sistema de prompts mediante el panel de administración.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
// ChatbotApi/Data/Models/AppContexto.cs
|
||||
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using ChatbotApi.Data.Models;
|
||||
|
||||
namespace ChatbotApi.Data.Models
|
||||
{
|
||||
@@ -7,8 +8,9 @@ namespace ChatbotApi.Data.Models
|
||||
{
|
||||
public AppContexto(DbContextOptions<AppContexto> options) : base(options) { }
|
||||
|
||||
public DbSet<ContextoItem> ContextoItems { get; set; } = null!;
|
||||
public DbSet<ConversacionLog> ConversacionLogs { get; set; } = null!;
|
||||
public DbSet<FuenteContexto> FuentesDeContexto { get; set; } = null!;
|
||||
public DbSet<ConversacionLog> ConversacionLogs { get; set; }
|
||||
public DbSet<ContextoItem> ContextoItems { get; set; }
|
||||
public DbSet<FuenteContexto> FuentesDeContexto { get; set; }
|
||||
public DbSet<SystemPrompt> SystemPrompts { get; set; }
|
||||
}
|
||||
}
|
||||
25
ChatbotApi/Data/Models/SystemPrompt.cs
Normal file
25
ChatbotApi/Data/Models/SystemPrompt.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace ChatbotApi.Data.Models
|
||||
{
|
||||
[Table("SystemPrompts")]
|
||||
public class SystemPrompt
|
||||
{
|
||||
[Key]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Required]
|
||||
[MaxLength(100)]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
public string Content { get; set; } = string.Empty;
|
||||
|
||||
public bool IsActive { get; set; }
|
||||
|
||||
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
||||
|
||||
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user