mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-11 12:07:42 +00:00
[improvement](chat) Add persistence to InMemoryEmbeddingStore, fix the issue of PythonServiceS2EmbeddingStore being empty. (#524)
This commit is contained in:
@@ -37,7 +37,7 @@ public class JavaLLMProxy implements LLMProxy {
|
||||
public LLMResp query2sql(LLMReq llmReq, String modelClusterKey) {
|
||||
|
||||
SqlGeneration sqlGeneration = SqlGenerationFactory.get(
|
||||
SqlGenerationMode.valueOf(llmReq.getSqlGenerationMode()));
|
||||
SqlGenerationMode.getMode(llmReq.getSqlGenerationMode()));
|
||||
String modelName = llmReq.getSchema().getModelName();
|
||||
Map<String, Double> sqlWeight = sqlGeneration.generation(llmReq, modelClusterKey);
|
||||
|
||||
|
||||
@@ -69,5 +69,14 @@ public class LLMReq {
|
||||
return name;
|
||||
}
|
||||
|
||||
public static SqlGenerationMode getMode(String name) {
|
||||
for (SqlGenerationMode sqlGenerationMode : SqlGenerationMode.values()) {
|
||||
if (sqlGenerationMode.name.equals(name)) {
|
||||
return sqlGenerationMode;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user