/
monzikov
/
next-solution
Обзор
Документация
Войти
/
monzikov
/
next-solution
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
src/main/java/edu/mai/nextsolution/CheckerConfig.java
34 строки
2 KB
Yuri Monzikov
add next-solution code
04 июл 2026, 14:40
04 июл 2026, 14:40
d50cd9f
Код
Авторство
О чём код?
package edu.mai.nextsolution; import io.qdrant.client.QdrantClient; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; /** * Собирает два экземпляра {@link StopListChecker} — по одному на модель. * Имена бинов (labseChecker / bgeChecker) используются для инъекции в {@link NextController}. */ @Configuration public class CheckerConfig { @Bean public StopListChecker labseChecker( LaBseEmbeddingService embeddingService, QdrantClient qdrantClient, @Value("${app.qdrant.collection-name:stop_list_collection}") String collectionName, @Value("${app.match.labse.threshold-low:0.82}") float thresholdLow, @Value("${app.match.labse.threshold-high:0.92}") float thresholdHigh) { return new StopListChecker(embeddingService, qdrantClient, collectionName, thresholdLow, thresholdHigh); } @Bean public StopListChecker bgeChecker( BgeM3EmbeddingService embeddingService, QdrantClient qdrantClient, @Value("${app.qdrant.bge-collection-name:stop_list_collection_bge_m3}") String collectionName, @Value("${app.match.bge.threshold-low:0.82}") float thresholdLow, @Value("${app.match.bge.threshold-high:0.92}") float thresholdHigh) { return new StopListChecker(embeddingService, qdrantClient, collectionName, thresholdLow, thresholdHigh); } }