Skip to content

Commit c1e52ec

Browse files
committed
fix 修复全局检索重复问题
1 parent 983525c commit c1e52ec

File tree

5 files changed

+12
-4
lines changed

5 files changed

+12
-4
lines changed

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project>
22
<!-- See https://aka.ms/dotnet/msbuild/customize for more details on customizing your build -->
33
<PropertyGroup>
4-
<Version>0.1.23</Version>
4+
<Version>0.1.24</Version>
55
<SKVersion>1.17.1</SKVersion>
66
</PropertyGroup>
77
</Project>

src/GraphRag.Net.Web/Pages/Graph/Chat.razor

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
</Select>
1919
<Input @bind-Value="_input" Style="margin-top:10px;" Placeholder="问题" />
2020
<TextArea @bind-Value="_output" Style="margin-top:10px;" MinRows="8" Placeholder="答案" />
21-
<Button Type="@ButtonType.Primary" Style="margin-top:10px;" OnClick="Search">搜索</Button>
21+
<Button Type="@ButtonType.Primary" Style="margin-top:10px;" OnClick="Search">节点搜索</Button>
22+
<Button Type="@ButtonType.Primary" Style="margin-top:10px;" OnClick="Search1">社区搜索</Button>
2223
<a href="/graph?index=@_index" target="_blank" style="margin-left:10px;">查看图谱</a>
2324
</Spin>
2425
</Col>

src/GraphRag.Net.Web/Pages/Graph/Chat.razor.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,20 @@ protected override async Task OnInitializedAsync()
2626

2727
private async Task Search()
2828
{
29+
Console.Write("111");
2930
loadding = true;
3031
_output = await _graphService.SearchGraphAsync(_index, _input);
3132
loadding = false;
3233
}
3334

35+
private async Task Search1()
36+
{
37+
loadding = true;
38+
_output = await _graphService.SearchGraphCommunityAsync(_index, _input);
39+
loadding = false;
40+
}
41+
42+
3443
private void OnSelectedItemChangedHandler(string value)
3544
{
3645
_index = value;

src/GraphRag.Net/Domain/Service/GraphService.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,6 @@ private async Task<List<TextMemModel>> RetrieveTextMemModelList(string index, st
517517
private async Task<GraphModel> GetFilteredGraphModel(string index, string input, List<Nodes> nodes)
518518
{
519519
var graphModel = GetGraphAllRecursion(index, nodes);
520-
var answer = await _semanticService.GetGraphAnswerAsync(JsonConvert.SerializeObject(graphModel), input);
521520
return graphModel; // or return the answer depending on your use case
522521
}
523522

src/GraphRag.Net/Domain/Service/SemanticService.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ public async Task<GraphModel> CreateGraphAsync(string input)
4444
}
4545
public async Task<string> GetGraphAnswerAsync(string graph, string input)
4646
{
47-
4847
KernelFunction createFun = _kernel.Plugins.GetFunction("graph", "search");
4948
var args = new KernelArguments()
5049
{

0 commit comments

Comments
 (0)