INNER CODE UNIT · Java
main
tzolov/playground-flight-booking · src/main/java/ai/spring/demo/ai/playground/Application.java:27
public static void main(String[] args) {
new SpringApplicationBuilder(Application.class).run(args);
}
// Ingest the document into the vector store
@Bean
CommandLineRunner ingestTermOfServiceToVectorStore(VectorStore vectorStore,
@Value("classpath:rag/terms-of-service.txt") Resource termsOfServiceDocs) {
// @formatter:off
return args -> vectorStore.write(
new TokenTextSplitter().transform(
new TextReader(termsOfServiceDocs).read()));
// @formatter:on
}
@Bean
public ChatMemory chatMemory() {