(fix)(common)Make sure system exemplar gets loaded before demo chats.

This commit is contained in:
jerryjzhang
2024-06-27 11:50:05 +08:00
parent 2bf30bd75e
commit 57a727bdff
6 changed files with 18 additions and 17 deletions

View File

@@ -15,6 +15,7 @@ import dev.langchain4j.store.embedding.RetrieveQueryResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.core.annotation.Order;
import org.springframework.core.io.ClassPathResource;
import org.springframework.stereotype.Service;
@@ -24,6 +25,7 @@ import java.util.List;
@Service
@Slf4j
@Order(0)
public class ExemplarServiceImpl implements ExemplarService, CommandLineRunner {
private static final String SYS_EXEMPLAR_FILE = "s2ql_exemplar.json";

View File

@@ -68,7 +68,7 @@ public class SqlFilterUtils {
joiner.add(SPACE + dealFilter(filter, isBizName) + SPACE);
}
});
log.info("getWhereClause, where sql : {}", joiner);
log.debug("getWhereClause, where sql : {}", joiner);
return joiner.toString();
}
@@ -118,7 +118,7 @@ public class SqlFilterUtils {
}
private String generator(Criterion criterion) {
log.info("criterion :{}", criterion);
log.debug("criterion :{}", criterion);
String sqlPart;
switch (criterion.getOperator()) {
case SQL_PART: