From 7feb79c8e55fa11e6418ab70ee29f67b38458b9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD?= Date: Wed, 18 Dec 2024 19:49:14 +0100 Subject: [PATCH] #2247 - autoconfig openai maxSegmentsPerBatch --- .../src/main/java/dev/langchain4j/openai/spring/AutoConfig.java | 1 + .../dev/langchain4j/openai/spring/EmbeddingModelProperties.java | 1 + 2 files changed, 2 insertions(+) diff --git a/langchain4j-open-ai-spring-boot-starter/src/main/java/dev/langchain4j/openai/spring/AutoConfig.java b/langchain4j-open-ai-spring-boot-starter/src/main/java/dev/langchain4j/openai/spring/AutoConfig.java index d0db55ac..3feef275 100644 --- a/langchain4j-open-ai-spring-boot-starter/src/main/java/dev/langchain4j/openai/spring/AutoConfig.java +++ b/langchain4j-open-ai-spring-boot-starter/src/main/java/dev/langchain4j/openai/spring/AutoConfig.java @@ -122,6 +122,7 @@ OpenAiEmbeddingModel openAiEmbeddingModel(Properties properties) { .organizationId(embeddingModelProperties.organizationId()) .modelName(embeddingModelProperties.modelName()) .dimensions(embeddingModelProperties.dimensions()) + .maxSegmentsPerBatch(embeddingModelProperties.maxSegmentsPerBatch()) .user(embeddingModelProperties.user()) .timeout(embeddingModelProperties.timeout()) .maxRetries(embeddingModelProperties.maxRetries()) diff --git a/langchain4j-open-ai-spring-boot-starter/src/main/java/dev/langchain4j/openai/spring/EmbeddingModelProperties.java b/langchain4j-open-ai-spring-boot-starter/src/main/java/dev/langchain4j/openai/spring/EmbeddingModelProperties.java index 381d0f34..d790effc 100644 --- a/langchain4j-open-ai-spring-boot-starter/src/main/java/dev/langchain4j/openai/spring/EmbeddingModelProperties.java +++ b/langchain4j-open-ai-spring-boot-starter/src/main/java/dev/langchain4j/openai/spring/EmbeddingModelProperties.java @@ -13,6 +13,7 @@ record EmbeddingModelProperties( String organizationId, String modelName, Integer dimensions, + Integer maxSegmentsPerBatch, String user, Duration timeout, Integer maxRetries,