diff --git a/front/lib/models/assistant/actions/retrieval.ts b/front/lib/models/assistant/actions/retrieval.ts index 5121a796e941f..5593af5d3f56a 100644 --- a/front/lib/models/assistant/actions/retrieval.ts +++ b/front/lib/models/assistant/actions/retrieval.ts @@ -1,4 +1,5 @@ import { + CreationOptional, DataTypes, ForeignKey, InferAttributes, @@ -18,7 +19,9 @@ export class AgentRetrievalConfiguration extends Model< InferAttributes, InferCreationAttributes > { - declare id: number; + declare id: CreationOptional; + declare createdAt: CreationOptional; + declare updatedAt: CreationOptional; declare query: "auto" | "none" | "templated"; declare queryTemplate: string | null; @@ -36,6 +39,16 @@ AgentRetrievalConfiguration.init( autoIncrement: true, primaryKey: true, }, + createdAt: { + type: DataTypes.DATE, + allowNull: false, + defaultValue: DataTypes.NOW, + }, + updatedAt: { + type: DataTypes.DATE, + allowNull: false, + defaultValue: DataTypes.NOW, + }, query: { type: DataTypes.STRING, allowNull: false, @@ -100,7 +113,9 @@ export class AgentDataSourceConfiguration extends Model< InferAttributes, InferCreationAttributes > { - declare id: number; + declare id: CreationOptional; + declare createdAt: CreationOptional; + declare updatedAt: CreationOptional; declare minTimestamp: number | null; declare maxTimestamp: number | null; @@ -124,6 +139,16 @@ AgentDataSourceConfiguration.init( autoIncrement: true, primaryKey: true, }, + createdAt: { + type: DataTypes.DATE, + allowNull: false, + defaultValue: DataTypes.NOW, + }, + updatedAt: { + type: DataTypes.DATE, + allowNull: false, + defaultValue: DataTypes.NOW, + }, minTimestamp: { type: DataTypes.INTEGER, allowNull: true, diff --git a/front/lib/models/assistant/agent.ts b/front/lib/models/assistant/agent.ts index dcda67f5b35c6..c10393cceac4b 100644 --- a/front/lib/models/assistant/agent.ts +++ b/front/lib/models/assistant/agent.ts @@ -1,4 +1,5 @@ import { + CreationOptional, DataTypes, ForeignKey, InferAttributes, @@ -21,7 +22,9 @@ export class AgentConfiguration extends Model< InferAttributes, InferCreationAttributes > { - declare id: number; + declare id: CreationOptional; + declare createdAt: CreationOptional; + declare updatedAt: CreationOptional; declare sId: string; declare status: AgentConfigurationStatus; @@ -40,6 +43,16 @@ AgentConfiguration.init( autoIncrement: true, primaryKey: true, }, + createdAt: { + type: DataTypes.DATE, + allowNull: false, + defaultValue: DataTypes.NOW, + }, + updatedAt: { + type: DataTypes.DATE, + allowNull: false, + defaultValue: DataTypes.NOW, + }, sId: { type: DataTypes.STRING, allowNull: false, @@ -95,7 +108,9 @@ export class AgentGenerationConfiguration extends Model< InferAttributes, InferCreationAttributes > { - declare id: number; + declare id: CreationOptional; + declare createdAt: CreationOptional; + declare updatedAt: CreationOptional; declare prompt: string; declare modelProvider: string; @@ -110,6 +125,16 @@ AgentGenerationConfiguration.init( autoIncrement: true, primaryKey: true, }, + createdAt: { + type: DataTypes.DATE, + allowNull: false, + defaultValue: DataTypes.NOW, + }, + updatedAt: { + type: DataTypes.DATE, + allowNull: false, + defaultValue: DataTypes.NOW, + }, prompt: { type: DataTypes.TEXT, allowNull: false,