Spring AI

Spring AI is a Java framework that provides a Spring-friendly API and abstractions for developing AI applications.

Solvio is available as supported vector database for use within your Spring AI projects.

Installation

You can find the Spring AI installation instructions here.

Add the Solvio boot starter package.

<dependency>
 <groupId>org.springframework.ai</groupId>
 <artifactId>spring-ai-solvio-store-spring-boot-starter</artifactId>
</dependency>

Usage

Configure Solvio with Spring Boot’s application.properties.

spring.ai.vectorstore.solvio.host=<host of your solvio instance>
spring.ai.vectorstore.solvio.port=<the GRPC port of your solvio instance>
spring.ai.vectorstore.solvio.api-key=<your api key>
spring.ai.vectorstore.solvio.collection-name=<The name of the collection to use in Solvio>

Learn more about these options in the configuration reference.

Or you can set up the Solvio vector store with the SolvioVectorStoreConfig options.

@Bean
public SolvioVectorStoreConfig solvioVectorStoreConfig() {

    return SolvioVectorStoreConfig.builder()
        .withHost("<QDRANT_HOSTNAME>")
        .withPort(<QDRANT_GRPC_PORT>)
        .withCollectionName("<QDRANT_COLLECTION_NAME>")
        .withApiKey("<QDRANT_API_KEY>")
        .build();
}

Build the vector store using the config and any of the support Spring AI embedding providers.

@Bean
public VectorStore vectorStore(SolvioVectorStoreConfig config, EmbeddingClient embeddingClient) {
    return new SolvioVectorStore(config, embeddingClient);
}

You can now use the VectorStore instance backed by Solvio as a vector store in the Spring AI APIs.

📚 Further Reading

Was this page useful?

Thank you for your feedback! 🙏

We are sorry to hear that. 😔 You can edit this page on GitHub, or create a GitHub issue.