Skip to content

Commit 8fa683a

Browse files
author
Jicheng Lu
committed
refine
1 parent 74b2773 commit 8fa683a

File tree

9 files changed

+20
-1
lines changed

9 files changed

+20
-1
lines changed

src/Infrastructure/BotSharp.Abstraction/Files/Options/FileLlmProcessOptions.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,21 @@ public class FileLlmProcessOptions
2727
/// </summary>
2828
public string? Instruction { get; set; }
2929

30+
/// <summary>
31+
/// Message from user
32+
/// </summary>
33+
public string? UserMessage { get; set; }
34+
3035
/// <summary>
3136
/// Template name in Agent
3237
/// </summary>
3338
public string? TemplateName { get; set; }
3439

40+
/// <summary>
41+
/// The upstream where the file llm is invoked
42+
/// </summary>
43+
public string? InvokeFrom { get; set; }
44+
3545
/// <summary>
3646
/// Data that is used to render instruction
3747
/// </summary>

src/Infrastructure/BotSharp.Abstraction/Knowledges/Models/KnowledgeFileFilter.cs renamed to src/Infrastructure/BotSharp.Abstraction/Knowledges/Filters/KnowledgeFileFilter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace BotSharp.Abstraction.Knowledges.Models;
1+
namespace BotSharp.Abstraction.Knowledges.Filters;
22

33
public class KnowledgeFileFilter : Pagination
44
{

src/Infrastructure/BotSharp.Abstraction/Knowledges/IKnowledgeService.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using BotSharp.Abstraction.Graph.Models;
22
using BotSharp.Abstraction.Graph.Options;
3+
using BotSharp.Abstraction.Knowledges.Filters;
34
using BotSharp.Abstraction.Knowledges.Options;
45
using BotSharp.Abstraction.Knowledges.Responses;
56
using BotSharp.Abstraction.VectorStorage.Models;

src/Infrastructure/BotSharp.Abstraction/Repositories/IBotSharpRepository.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using BotSharp.Abstraction.Knowledges.Filters;
12
using BotSharp.Abstraction.Loggers.Models;
23
using BotSharp.Abstraction.Plugins.Models;
34
using BotSharp.Abstraction.Repositories.Filters;

src/Infrastructure/BotSharp.Core/Instructs/Services/InstructService.Execute.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,9 @@ public async Task<InstructResult> Execute(
119119
Provider = provider,
120120
Model = model,
121121
Instruction = instruction,
122+
UserMessage = message.Content,
122123
TemplateName = templateName,
124+
InvokeFrom = $"{nameof(InstructService)}.{nameof(Execute)}",
123125
Data = state.GetStates().ToDictionary(x => x.Key, x => (object)x.Value)
124126
});
125127
result = inference.Result.IfNullOrEmptyAs(string.Empty);

src/Infrastructure/BotSharp.Core/Repository/FileRepository/FileRepository.KnowledgeBase.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using BotSharp.Abstraction.Knowledges.Filters;
12
using BotSharp.Abstraction.VectorStorage.Filters;
23
using BotSharp.Abstraction.VectorStorage.Models;
34
using System.IO;

src/Infrastructure/BotSharp.OpenAPI/ViewModels/Knowledges/Request/GetKnowledgeDocsRequest.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
using BotSharp.Abstraction.Knowledges.Filters;
2+
13
namespace BotSharp.OpenAPI.ViewModels.Knowledges;
24

35
public class GetKnowledgeDocsRequest : KnowledgeFileFilter

src/Plugins/BotSharp.Plugin.KnowledgeBase/Services/KnowledgeService.Document.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using BotSharp.Abstraction.Files;
22
using BotSharp.Abstraction.Files.Models;
33
using BotSharp.Abstraction.Files.Utilities;
4+
using BotSharp.Abstraction.Knowledges.Filters;
45
using BotSharp.Abstraction.Knowledges.Helpers;
56
using BotSharp.Abstraction.Knowledges.Options;
67
using BotSharp.Abstraction.Knowledges.Responses;

src/Plugins/BotSharp.Plugin.MongoStorage/Repository/MongoRepository.KnowledgeBase.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using BotSharp.Abstraction.Knowledges.Filters;
12
using BotSharp.Abstraction.Knowledges.Models;
23
using BotSharp.Abstraction.VectorStorage.Filters;
34
using BotSharp.Abstraction.VectorStorage.Models;

0 commit comments

Comments
 (0)