(improvement)(chat) Fix the collectionName issue in the memory agent level. (#1300)

This commit is contained in:
lexluo09
2024-06-30 17:55:43 +08:00
committed by GitHub
parent 8bfd80c2c0
commit b56abd7348
7 changed files with 39 additions and 21 deletions

View File

@@ -7,6 +7,10 @@ import org.springframework.context.annotation.Configuration;
@Configuration
@Data
public class EmbeddingConfig {
@Value("${s2.embedding.memory.collection.prefix:memory_}")
private String memoryCollectionPrefix;
@Value("${s2.embedding.preset.collection:preset_query_collection}")
private String presetCollection;
@@ -25,4 +29,8 @@ public class EmbeddingConfig {
@Value("${s2.embedding.metric.analyzeQuery.nResult:5}")
private int metricAnalyzeQueryResultNum;
public String getMemoryCollectionName(Integer agentId) {
return memoryCollectionPrefix + agentId;
}
}