Skip to content

Commit 6841257

Browse files
authored
Merge pull request #157 from Senparc/Developer-MicrosoftMemoryKernel
Developer microsoft memory kernel
2 parents 2a95f79 + 18bf705 commit 6841257

File tree

5 files changed

+29
-24
lines changed

5 files changed

+29
-24
lines changed

Samples/Senparc.AI.Samples.Consoles/Samples/EmbeddingSample.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public class Record
3030
[VectorStoreData(IsFullTextIndexed = true)]
3131
public string Description { get; set; }
3232

33-
[VectorStoreVector(Dimensions: 3072 /*根据模型调整,例如 text-embedding-ada-002 为 1536*/, DistanceFunction = DistanceFunction.CosineSimilarity, IndexKind = IndexKind.Hnsw)]
33+
[VectorStoreVector(Dimensions: 1536 /*根据模型调整,例如 text-embedding-ada-002 为 1536,Large 为 3072*/, DistanceFunction = DistanceFunction.CosineSimilarity, IndexKind = IndexKind.Hnsw)]
3434
public ReadOnlyMemory<float>? DescriptionEmbedding { get; set; }
3535

3636
[VectorStoreData(IsIndexed = true)]

Samples/Senparc.AI.Samples.Consoles/appsettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"IsDebug": true,
1717
"AiPlatform": "NeuCharAI", //注意修改为自己平台对应的枚举值
1818
"VectorDB": {
19-
"Type": "Default",
19+
"Type": "InMemory",
2020
"ConnectionString": ""
2121
},
2222
"NeuCharAIKeys": {

src/Senparc.AI.Kernel/Senparc.AI.Kernel.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Project Sdk="Microsoft.NET.Sdk">
33
<PropertyGroup>
44
<TargetFramework>netstandard2.1</TargetFramework>
5-
<Version>0.25.0</Version>
5+
<Version>0.25.1</Version>
66
<Nullable>enable</Nullable>
77
<LangVersion>12.0</LangVersion>
88
<AssemblyName>Senparc.AI.Kernel</AssemblyName>
@@ -59,6 +59,7 @@
5959
[2025-05-10] v0.23.4 Upgrade for Chat history limit
6060
[2025-06-01] v0.24.0 Upgrade for vector database, support for Qdrant; update Sample for Embedding and RAG
6161
[2025-06-02] v0.25.0 Upgrade for vector database, support for InMemory; update Sample for Embedding and RAG
62+
[2025-06-05] v0.25.1 Update basic Senparc.AI library
6263
</PackageReleaseNotes>
6364
<RepositoryUrl>https://github.com/Senparc/Senparc.AI.Kernel</RepositoryUrl>
6465
<Configurations>Debug;Release;Test</Configurations>

src/Senparc.AI/Interfaces/ISenparcAiSetting.cs

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -195,26 +195,29 @@ public enum VectorDBType
195195
//PostgreSQL,
196196
//Sqlite,
197197
//SqlServer,
198-
AzureAISearch,
199-
CosmosDBMongoDB,
200-
CosmosDBNoSQL,
201-
Chroma, //Planed
202-
Couchbase,
203-
Elasticsearch,
204-
Faiss,
205-
InMemory,
206-
JDBC,
207-
Milvus, //Planed (not included in https://learn.microsoft.com/en-us/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/inmemory-connector?pivots=programming-language-csharp)
208-
MongoDB,
209-
Pinecon,
210-
Postgres,
211-
Qdrant,
212-
Redis,
213-
SqlServer, //Planed
214-
SQLite,
215-
VolatileInMemory,
216-
Weaviate,
217-
Default = Redis,
198+
199+
/* 注意:枚举值一旦确定,不能再进行修改 */
200+
201+
AzureAISearch=0,
202+
CosmosDBMongoDB=1,
203+
CosmosDBNoSQL=2,
204+
Chroma=3, //Planed
205+
Couchbase=4,
206+
Elasticsearch=5,
207+
Faiss=6,
208+
InMemory=7,
209+
JDBC=8,
210+
Milvus=9, //Planed (not included in https://learn.microsoft.com/en-us/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/inmemory-connector?pivots=programming-language-csharp)
211+
MongoDB=10,
212+
Pinecon=11,
213+
Postgres=12,
214+
Qdrant=13,
215+
Redis=14,
216+
SqlServer=15, //Planed
217+
SQLite=16,
218+
VolatileInMemory=17,
219+
Weaviate=18,
220+
Default = InMemory,
218221
}
219222
}
220223
}

src/Senparc.AI/Senparc.AI.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<TargetFramework>netstandard2.1</TargetFramework>
4-
<Version>0.24.1</Version>
4+
<Version>0.24.2</Version>
55
<Nullable>enable</Nullable>
66
<LangVersion>10.0</LangVersion>
77
<AssemblyName>Senparc.AI</AssemblyName>
@@ -55,6 +55,7 @@
5555
[2025-01-19] v0.20.0-beta1 Update Senparc.AI.Agents; Fixed some namespace spelling errors
5656
[2025-01-21] v0.21.0-beta1 Support for DeepSeek
5757
[2025-02-02] v0.22.0 Upgrade support for Ollama, finished test for DeepSeek-r1 and nomic-embed-text:v1.5
58+
[2025-06-05] v0.24.1 Update VectorDBType values
5859
</PackageReleaseNotes>
5960
<RepositoryUrl>https://github.com/Senparc/Senparc.AI</RepositoryUrl>
6061
<Configurations>Debug;Release;Test</Configurations>

0 commit comments

Comments
 (0)