merge with dev
This commit is contained in:
parent
a882689e2c
commit
f2e0fb0ef7
|
|
@ -33,6 +33,8 @@ public class Agent
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Knowledges { get; set; }
|
public string Knowledges { get; set; }
|
||||||
|
|
||||||
|
public bool IsPublic { get; set; }
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
=> $"{Name} {Id}";
|
=> $"{Name} {Id}";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ public class AgentRecord : RecordBase
|
||||||
public List<string> Responses { get; set; }
|
public List<string> Responses { get; set; }
|
||||||
|
|
||||||
public string Samples { get; set; }
|
public string Samples { get; set; }
|
||||||
|
public bool IsPublic { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public DateTime CreatedTime { get; set; }
|
public DateTime CreatedTime { get; set; }
|
||||||
|
|
@ -32,6 +33,8 @@ public class AgentRecord : RecordBase
|
||||||
Description = agent.Description,
|
Description = agent.Description,
|
||||||
Instruction = agent.Instruction,
|
Instruction = agent.Instruction,
|
||||||
Functions = agent.Functions,
|
Functions = agent.Functions,
|
||||||
|
Responses = agent.Responses,
|
||||||
|
IsPublic = agent.IsPublic
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -44,6 +47,8 @@ public class AgentRecord : RecordBase
|
||||||
Description = Description,
|
Description = Description,
|
||||||
Instruction = Instruction,
|
Instruction = Instruction,
|
||||||
Functions = Functions,
|
Functions = Functions,
|
||||||
|
Responses = Responses,
|
||||||
|
IsPublic = IsPublic,
|
||||||
CreatedDateTime = CreatedTime,
|
CreatedDateTime = CreatedTime,
|
||||||
UpdatedDateTime = UpdatedTime
|
UpdatedDateTime = UpdatedTime
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ public class AgentCreationModel
|
||||||
public string Instruction { get; set; }
|
public string Instruction { get; set; }
|
||||||
public List<string> Functions { get; set; }
|
public List<string> Functions { get; set; }
|
||||||
public List<string> Responses { get; set; }
|
public List<string> Responses { get; set; }
|
||||||
|
public bool IsPublic { get; set; }
|
||||||
|
|
||||||
public Agent ToAgent()
|
public Agent ToAgent()
|
||||||
{
|
{
|
||||||
|
|
@ -18,7 +19,8 @@ public class AgentCreationModel
|
||||||
Description = Description,
|
Description = Description,
|
||||||
Instruction = Instruction,
|
Instruction = Instruction,
|
||||||
Functions = Functions,
|
Functions = Functions,
|
||||||
Responses = Responses
|
Responses = Responses,
|
||||||
|
IsPublic = IsPublic
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ public class AgentViewModel
|
||||||
public string Instruction { get; set; }
|
public string Instruction { get; set; }
|
||||||
public List<string> Functions { get; set; }
|
public List<string> Functions { get; set; }
|
||||||
public List<string> Responses { get; set; }
|
public List<string> Responses { get; set; }
|
||||||
|
public bool IsPublic { get; set; }
|
||||||
public DateTime UpdatedDateTime { get; set; }
|
public DateTime UpdatedDateTime { get; set; }
|
||||||
|
|
||||||
public static AgentViewModel FromAgent(Agent agent)
|
public static AgentViewModel FromAgent(Agent agent)
|
||||||
|
|
@ -22,6 +23,7 @@ public class AgentViewModel
|
||||||
Instruction = agent.Instruction,
|
Instruction = agent.Instruction,
|
||||||
Functions = agent.Functions,
|
Functions = agent.Functions,
|
||||||
Responses = agent.Responses,
|
Responses = agent.Responses,
|
||||||
|
IsPublic= agent.IsPublic,
|
||||||
UpdatedDateTime = agent.UpdatedDateTime
|
UpdatedDateTime = agent.UpdatedDateTime
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ public class AgentCollection : MongoBase
|
||||||
public string Instruction { get; set; }
|
public string Instruction { get; set; }
|
||||||
public List<string> Functions { get; set; }
|
public List<string> Functions { get; set; }
|
||||||
public List<string> Responses { get; set; }
|
public List<string> Responses { get; set; }
|
||||||
|
public bool IsPublic { get; set; }
|
||||||
|
|
||||||
public DateTime CreatedTime { get; set; }
|
public DateTime CreatedTime { get; set; }
|
||||||
public DateTime UpdatedTime { get; set; }
|
public DateTime UpdatedTime { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ public class MongoRepository : IBotSharpRepository
|
||||||
Instruction = x.Instruction,
|
Instruction = x.Instruction,
|
||||||
Functions = x.Functions,
|
Functions = x.Functions,
|
||||||
Responses = x.Responses,
|
Responses = x.Responses,
|
||||||
|
IsPublic = x.IsPublic,
|
||||||
CreatedTime = x.CreatedTime,
|
CreatedTime = x.CreatedTime,
|
||||||
UpdatedTime = x.UpdatedTime
|
UpdatedTime = x.UpdatedTime
|
||||||
}).ToList();
|
}).ToList();
|
||||||
|
|
@ -243,6 +244,7 @@ public class MongoRepository : IBotSharpRepository
|
||||||
Instruction = x.Instruction,
|
Instruction = x.Instruction,
|
||||||
Functions = x.Functions,
|
Functions = x.Functions,
|
||||||
Responses = x.Responses,
|
Responses = x.Responses,
|
||||||
|
IsPublic = x.IsPublic,
|
||||||
CreatedTime = x.CreatedTime,
|
CreatedTime = x.CreatedTime,
|
||||||
UpdatedTime = x.UpdatedTime
|
UpdatedTime = x.UpdatedTime
|
||||||
}).ToList();
|
}).ToList();
|
||||||
|
|
@ -256,6 +258,7 @@ public class MongoRepository : IBotSharpRepository
|
||||||
.Set(x => x.Instruction, agent.Instruction)
|
.Set(x => x.Instruction, agent.Instruction)
|
||||||
.Set(x => x.Functions, agent.Functions)
|
.Set(x => x.Functions, agent.Functions)
|
||||||
.Set(x => x.Responses, agent.Responses)
|
.Set(x => x.Responses, agent.Responses)
|
||||||
|
.Set(x => x.IsPublic, agent.IsPublic)
|
||||||
.Set(x => x.CreatedTime, agent.CreatedTime)
|
.Set(x => x.CreatedTime, agent.CreatedTime)
|
||||||
.Set(x => x.UpdatedTime, agent.UpdatedTime);
|
.Set(x => x.UpdatedTime, agent.UpdatedTime);
|
||||||
_dc.Agents.UpdateOne(filter, update, _options);
|
_dc.Agents.UpdateOne(filter, update, _options);
|
||||||
|
|
@ -367,6 +370,7 @@ public class MongoRepository : IBotSharpRepository
|
||||||
Instruction = agent.Instruction,
|
Instruction = agent.Instruction,
|
||||||
Functions = agent.Functions,
|
Functions = agent.Functions,
|
||||||
Responses = agent.Responses,
|
Responses = agent.Responses,
|
||||||
|
IsPublic = agent.IsPublic,
|
||||||
UpdatedTime = DateTime.UtcNow
|
UpdatedTime = DateTime.UtcNow
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -378,6 +382,7 @@ public class MongoRepository : IBotSharpRepository
|
||||||
.Set(x => x.Instruction, agent.Instruction)
|
.Set(x => x.Instruction, agent.Instruction)
|
||||||
.Set(x => x.Functions, agent.Functions)
|
.Set(x => x.Functions, agent.Functions)
|
||||||
.Set(x => x.Responses, agent.Responses)
|
.Set(x => x.Responses, agent.Responses)
|
||||||
|
.Set(x => x.IsPublic, agent.IsPublic)
|
||||||
.Set(x => x.UpdatedTime, agent.UpdatedTime);
|
.Set(x => x.UpdatedTime, agent.UpdatedTime);
|
||||||
|
|
||||||
_dc.Agents.UpdateOne(filter, update, _options);
|
_dc.Agents.UpdateOne(filter, update, _options);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue