mirror of
https://github.com/ccmjga/zhilu-admin
synced 2026-03-31 08:33:41 +08:00
init embedding
This commit is contained in:
@@ -9,6 +9,7 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import org.jooq.Configuration;
|
||||
import org.jooq.Record;
|
||||
import org.jooq.Result;
|
||||
import org.jooq.generated.default_schema.enums.LlmTypeEnum;
|
||||
import org.jooq.generated.mjga.tables.daos.AiLlmConfigDao;
|
||||
import org.jooq.impl.DSL;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -31,6 +32,10 @@ public class LlmRepository extends AiLlmConfigDao {
|
||||
StringUtils.isNotEmpty(llmQueryDto.name())
|
||||
? AI_LLM_CONFIG.NAME.eq(llmQueryDto.name())
|
||||
: noCondition())
|
||||
.and(
|
||||
StringUtils.isNotEmpty(llmQueryDto.type())
|
||||
? AI_LLM_CONFIG.TYPE.eq(LlmTypeEnum.lookupLiteral(llmQueryDto.type()))
|
||||
: noCondition())
|
||||
.orderBy(pageRequestDto.getSortFields())
|
||||
.limit(pageRequestDto.getSize())
|
||||
.offset(pageRequestDto.getOffset())
|
||||
|
||||
Reference in New Issue
Block a user