Migrage reader/transformer/writer packages from core to commons

Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
This commit is contained in:
Soby Chacko
2025-03-31 12:08:06 -04:00
parent 53af6fd5ac
commit 9875aaf1ca
19 changed files with 293 additions and 4 deletions

View File

@@ -42,6 +42,7 @@
<dependencies>
<!-- production dependencies -->
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-core</artifactId>
@@ -132,7 +133,6 @@
<scope>test</scope>
</dependency>
</dependencies>
</project>

View File

@@ -31,7 +31,6 @@ import org.springframework.ai.openai.api.OpenAiApi;
import org.springframework.ai.transformer.ContentFormatTransformer;
import org.springframework.ai.transformer.KeywordMetadataEnricher;
import org.springframework.ai.transformer.SummaryMetadataEnricher;
import org.springframework.ai.transformer.SummaryMetadataEnricher.SummaryType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.test.context.SpringBootTest;
@@ -178,8 +177,8 @@ public class MetadataTransformerIT {
@Bean
public SummaryMetadataEnricher summaryMetadata(OpenAiChatModel chatModel) {
return new SummaryMetadataEnricher(chatModel,
List.of(SummaryType.PREVIOUS, SummaryType.CURRENT, SummaryType.NEXT));
return new SummaryMetadataEnricher(chatModel, List.of(SummaryMetadataEnricher.SummaryType.PREVIOUS,
SummaryMetadataEnricher.SummaryType.CURRENT, SummaryMetadataEnricher.SummaryType.NEXT));
}
@Bean

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2023-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.ai;
import org.springframework.boot.SpringBootConfiguration;
@SpringBootConfiguration
public class TestConfiguration {
}

View File

@@ -23,6 +23,7 @@ import org.junit.jupiter.api.Test;
import org.springframework.ai.document.DefaultContentFormatter;
import org.springframework.ai.document.Document;
import org.springframework.ai.transformer.splitter.TokenTextSplitter;
import static org.assertj.core.api.Assertions.assertThat;

File diff suppressed because one or more lines are too long