Skip to content

Commit f76ea45

Browse files
author
Jicheng Lu
committed
resolve conflict
2 parents 17beef2 + 4295bd6 commit f76ea45

File tree

5 files changed

+8
-13
lines changed

5 files changed

+8
-13
lines changed

src/Infrastructure/BotSharp.Core/data/agents/01fcc3e5-9af7-49e6-ad7a-a760bd12dc4a/instructions/instruction.liquid

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,5 @@ Optional args:
3838

3939
[CONVERSATION]
4040
{{ conversation }}
41+
42+
Determine which function to call to proceed. Your output must be in JSON format.

src/Plugins/BotSharp.Plugin.KnowledgeBase/Graph/GraphKnowledgeService.cs

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,9 @@ public GraphKnowledgeService(
2020

2121
public async Task<GraphQueryResult> ExecuteQueryAsync(string query, GraphQueryOptions? options = null)
2222
{
23-
try
24-
{
25-
var db = GetGraphDb(options?.Provider);
26-
var result = await db.ExecuteQueryAsync(query, options);
27-
return result;
28-
}
29-
catch (Exception ex)
30-
{
31-
_logger.LogError(ex, $"Error when searching graph knowledge (Query: {query}).");
32-
return new GraphQueryResult();
33-
}
23+
var db = GetGraphDb(options?.Provider);
24+
var result = await db.ExecuteQueryAsync(query, options);
25+
return result;
3426
}
3527

3628

src/Plugins/BotSharp.Plugin.Membase/GraphDb/MembaseGraphDb.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public async Task<GraphQueryResult> ExecuteQueryAsync(string query, GraphQueryEx
5656
{
5757
var argLogs = args.Select(x => (new KeyValue(x.Key, x.Value.ConvertToString(BotSharpOptions.defaultJsonOptions))).ToString());
5858
_logger.LogError(ex, $"Error when executing query in {Provider} graph db. (Query: {query}), (Argments: \r\n{string.Join("\r\n", argLogs)})");
59-
return new();
59+
throw;
6060
}
6161
}
6262
}

src/Plugins/BotSharp.Plugin.Membase/MembasePlugin.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public void RegisterDI(IServiceCollection services, IConfiguration config)
3333
.ConfigureHttpClient(c =>
3434
{
3535
c.BaseAddress = new Uri(settings.Host);
36-
c.Timeout = TimeSpan.FromSeconds(5);
36+
c.Timeout = TimeSpan.FromSeconds(settings.TimeoutSecond);
3737
});
3838

3939
services.AddScoped<IGraphDb, MembaseGraphDb>();

src/Plugins/BotSharp.Plugin.Membase/Settings/MembaseSettings.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ public class MembaseSettings
77
public string Host { get; set; } = "localhost";
88
public string ProjectId { get; set; } = string.Empty;
99
public string ApiKey { get; set; } = string.Empty;
10+
public int TimeoutSecond { get; set; } = 10;
1011
public GraphInstance[] GraphInstances { get; set; } = [];
1112
}

0 commit comments

Comments
 (0)