Skip to content

Commit e0499f9

Browse files
committed
margin
2 parents a7fa05e + a676e6c commit e0499f9

File tree

5 files changed

+10
-26
lines changed

5 files changed

+10
-26
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.17</Version>
4+
<Version>0.1.19</Version>
55
<SKVersion>1.17.1</SKVersion>
66
</PropertyGroup>
77
</Project>

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
在appsettings.json配置
1818

1919
```
20-
"OpenAI": {
20+
"GraphOpenAI": {
2121
"Key": "sk-xxx",
2222
"EndPoint": "https://api.antsk.cn/",
2323
"ChatModel": "gpt-4o-mini",

src/GraphRag.Net/Domain/Model/Constant/SystemConstant.cs

Lines changed: 0 additions & 7 deletions
This file was deleted.

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using GraphRag.Net.Options;
22
using GraphRag.Net.Domain.Interface;
3-
using GraphRag.Net.Domain.Model.Constant;
43
using GraphRag.Net.Domain.Model.Graph;
54
using GraphRag.Net.Repositories;
65
using GraphRag.Net.Utils;
@@ -156,7 +155,7 @@ public async Task InsertGraphDataAsync(string index, string input)
156155
_nodes_Repositories.Update(oldNode);
157156
text2 = $"Name:{oldNode.Name};Type:{oldNode.Type};Desc:{oldNode.Desc}";
158157
nodeDic.Add(n.Id, oldNode.Id);
159-
await textMemory.SaveInformationAsync(SystemConstant.NodeIndex, id: oldNode.Id, text: text2, cancellationToken: default);
158+
await textMemory.SaveInformationAsync(index, id: oldNode.Id, text: text2, cancellationToken: default);
160159
continue;
161160
}
162161

src/GraphRag.Net/Extensions/ServiceCollectionExtensions.cs

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -89,28 +89,20 @@ static void InitSK(IServiceCollection services,Kernel _kernel = null)
8989
/// </summary>
9090
static void CodeFirst()
9191
{
92-
9392
// 获取仓储服务
9493
var _repository = new Nodes_Repositories();
9594

9695
// 创建数据库(如果不存在)
9796
_repository.GetDB().DbMaintenance.CreateDatabase();
98-
99-
// 获取当前应用程序域中所有程序集
100-
var assemblies = AppDomain.CurrentDomain.GetAssemblies();
101-
10297
// 在所有程序集中查找具有[SugarTable]特性的类
103-
foreach (var assembly in assemblies)
104-
{
105-
// 获取该程序集中所有具有SugarTable特性的类型
106-
var entityTypes = assembly.GetTypes()
98+
var assembly = Assembly.GetExecutingAssembly();
99+
// 获取该程序集中所有具有SugarTable特性的类型
100+
var entityTypes = assembly.GetTypes()
107101
.Where(type => TypeIsEntity(type));
108-
109-
// 为每个找到的类型初始化数据库表
110-
foreach (var type in entityTypes)
111-
{
112-
_repository.GetDB().CodeFirst.InitTables(type);
113-
}
102+
// 为每个找到的类型初始化数据库表
103+
foreach (var type in entityTypes)
104+
{
105+
_repository.GetDB().CodeFirst.InitTables(type);
114106
}
115107
}
116108

0 commit comments

Comments
 (0)