add impact

This commit is contained in:
Jicheng Lu 2023-10-25 15:09:21 -05:00
parent 975b5720c7
commit 6f7f143e7d
6 changed files with 13 additions and 3 deletions

View file

@ -5,7 +5,6 @@ using BotSharp.Abstraction.Users.Models;
using BotSharp.Abstraction.Agents.Models;
using MongoDB.Driver;
using BotSharp.Abstraction.Routing.Models;
using Amazon.Util;
namespace BotSharp.Core.Repository;
@ -380,7 +379,13 @@ public class FileRepository : IBotSharpRepository
}
var functionText = JsonSerializer.Serialize(functions, _options);
File.WriteAllText(functionFile, functionText);
using (var sw = File.CreateText(functionFile))
{
sw.Write(functionText);
}
//File.WriteAllText(functionFile, functionText);
}
private void UpdateAgentTemplates(string agentId, List<AgentTemplate> templates)

View file

@ -2,6 +2,7 @@ using BotSharp.Abstraction.Agents.Models;
namespace BotSharp.Plugin.MongoStorage.Models;
[BsonIgnoreExtraElements]
public class AgentResponseMongoElement
{
public string Prefix { get; set; }

View file

@ -2,6 +2,7 @@ using BotSharp.Abstraction.Agents.Models;
namespace BotSharp.Plugin.MongoStorage.Models;
[BsonIgnoreExtraElements]
public class AgentTemplateMongoElement
{
public string Name { get; set; }

View file

@ -3,6 +3,7 @@ using System.Text.Json;
namespace BotSharp.Plugin.MongoStorage.Models;
[BsonIgnoreExtraElements]
public class FunctionDefMongoElement
{
public string Name { get; set; }

View file

@ -2,6 +2,7 @@ using BotSharp.Abstraction.Routing.Models;
namespace BotSharp.Plugin.MongoStorage.Models;
[BsonIgnoreExtraElements]
public class RoutingRuleMongoElement
{
public string Field { get; set; }

View file

@ -10,4 +10,5 @@ global using BotSharp.Abstraction.Plugins;
global using Microsoft.Extensions.Configuration;
global using Microsoft.Extensions.DependencyInjection;
global using MongoDB.Bson;
global using MongoDB.Driver;
global using MongoDB.Driver;
global using MongoDB.Bson.Serialization.Attributes;