Clean obsolate README files
This commit is contained in:
@@ -198,14 +198,6 @@ image::spring-ai-chat-completions-clients.jpg[align="center", width="800px"]
|
||||
//
|
||||
// TBD
|
||||
|
||||
== API Docs (OUTDATED!!!)
|
||||
|
||||
You can find the Javadoc https://docs.spring.io/spring-ai/docs/current-SNAPSHOT/[here].
|
||||
|
||||
== Feedback and Contributions
|
||||
|
||||
The project's https://github.com/spring-projects/spring-ai/discussions[GitHub discussions] is a great place to send feedback.
|
||||
|
||||
// == Related Resources
|
||||
//
|
||||
// TBD
|
||||
|
||||
@@ -12,6 +12,14 @@ The <<generic-model-api>> can help you understand the basic constructs used impl
|
||||
* xref:api/vectordbs.adoc[Vector Database API]
|
||||
* xref:api/[Image Generation API](WIP)
|
||||
|
||||
== API Docs
|
||||
|
||||
You can find the Javadoc https://docs.spring.io/spring-ai/docs/current-SNAPSHOT/[here].
|
||||
|
||||
== Feedback and Contributions
|
||||
|
||||
The project's https://github.com/spring-projects/spring-ai/discussions[GitHub discussions] is a great place to send feedback.
|
||||
|
||||
== Spring AI Generic Model API [[generic-model-api]]
|
||||
|
||||
image::spring-ai-generic-model-api.jpg[width=900, align="center"]
|
||||
|
||||
1
vector-stores/spring-ai-azure/README.md
Normal file
1
vector-stores/spring-ai-azure/README.md
Normal file
@@ -0,0 +1 @@
|
||||
[Azure AI Search Vector Store Documentation](https://docs.spring.io/spring-ai/reference/api/vectordbs/azure.html)
|
||||
1
vector-stores/spring-ai-chroma/README.md
Normal file
1
vector-stores/spring-ai-chroma/README.md
Normal file
@@ -0,0 +1 @@
|
||||
[Chroma Vector Store Documentation](https://docs.spring.io/spring-ai/reference/api/vectordbs/chroma.html)
|
||||
1
vector-stores/spring-ai-milvus-store/README.md
Normal file
1
vector-stores/spring-ai-milvus-store/README.md
Normal file
@@ -0,0 +1 @@
|
||||
[Milvus Vector Store Documentation](https://docs.spring.io/spring-ai/reference/api/vectordbs/milvus.html)
|
||||
1
vector-stores/spring-ai-neo4j-store/README.md
Normal file
1
vector-stores/spring-ai-neo4j-store/README.md
Normal file
@@ -0,0 +1 @@
|
||||
[Neo4j Vector Store Documentation](https://docs.spring.io/spring-ai/reference/api/vectordbs/neo4j.html)
|
||||
1
vector-stores/spring-ai-pgvector-store/README.md
Normal file
1
vector-stores/spring-ai-pgvector-store/README.md
Normal file
@@ -0,0 +1 @@
|
||||
[PGvector Vector Store Documentation](https://docs.spring.io/spring-ai/reference/api/vectordbs/pgvector.html)
|
||||
@@ -1,125 +1 @@
|
||||
# Pinecone Vector Store
|
||||
|
||||
This readme walks you through setting up the Pinecone `VectorStore` to store document embeddings and perform similarity searches.
|
||||
|
||||
## What is Pinecone?
|
||||
|
||||
[Pinecone](https://www.pinecone.io/) is a popular cloud-based vector database, which allows you to store and search vectors efficiently.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
1. Pinecone Account: Before you start, sign up for a [Pinecone account](https://app.pinecone.io/).
|
||||
2. Pinecone Project: Once registered, create a new project, an index, and generate an API key. You'll need these details for configuration.
|
||||
3. OpenAI Account: Create an account at [OpenAI Signup](https://platform.openai.com/signup) and generate the token at [API Keys](https://platform.openai.com/account/api-keys)
|
||||
|
||||
## Configuration
|
||||
|
||||
To set up `PineconeVectorStore`, gather the following details from your Pinecone account:
|
||||
|
||||
* Pinecone API Key
|
||||
* Pinecone Environment
|
||||
* Pinecone Project ID
|
||||
* Pinecone Index Name
|
||||
* Pinecone Namespace
|
||||
|
||||
> **Note**
|
||||
> This information is available to you in the Pinecone UI portal.
|
||||
|
||||
|
||||
When setting up embeddings, select a vector dimension of `1536`. This matches the dimensionality of OpenAI's model `text-embedding-ada-002`, which we'll be using for this guide.
|
||||
|
||||
Additionally, you'll need to provide your OpenAI API Key. Set it as an environment variable like so:
|
||||
|
||||
```bash
|
||||
export SPRING_AI_OPENAI_API_KEY='Your_OpenAI_API_Key'
|
||||
```
|
||||
|
||||
## Repository
|
||||
|
||||
To acquire Spring AI artifacts, declare the Spring Snapshot repository:
|
||||
|
||||
```xml
|
||||
<repository>
|
||||
<id>spring-snapshots</id>
|
||||
<name>Spring Snapshots</name>
|
||||
<url>https://repo.spring.io/snapshot</url>
|
||||
<releases>
|
||||
<enabled>false</enabled>
|
||||
</releases>
|
||||
</repository>
|
||||
```
|
||||
|
||||
## Dependencies
|
||||
|
||||
Add these dependencies to your project:
|
||||
|
||||
1. OpenAI: Required for calculating embeddings.
|
||||
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>org.springframework.experimental.ai</groupId>
|
||||
<artifactId>spring-ai-openai-spring-boot-starter</artifactId>
|
||||
<version>0.8.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
2. Pinecone
|
||||
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>org.springframework.experimental.ai</groupId>
|
||||
<artifactId>spring-ai-pinecone</artifactId>
|
||||
<version>0.8.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
## Sample Code
|
||||
|
||||
To configure Pinecone in your application, you can use the following setup:
|
||||
|
||||
```java
|
||||
@Bean
|
||||
public PineconeVectorStoreConfig pineconeVectorStoreConfig() {
|
||||
|
||||
return PineconeVectorStoreConfig.builder()
|
||||
.withApiKey(<PINECONE_API_KEY>)
|
||||
.withEnvironment("gcp-starter")
|
||||
.withProjectId("89309e6")
|
||||
.withIndexName("spring-ai-test-index")
|
||||
.withNamespace("") // the free tier doesn't support namespaces.
|
||||
.build();
|
||||
}
|
||||
```
|
||||
|
||||
Integrate with OpenAI's embeddings by adding the Spring Boot OpenAI starter to your project.
|
||||
This provides you with an implementation of the Embeddings client:
|
||||
|
||||
```java
|
||||
@Bean
|
||||
public VectorStore vectorStore(PineconeVectorStoreConfig config, EmbeddingClient embeddingClient) {
|
||||
return new PineconeVectorStore(config, embeddingClient);
|
||||
}
|
||||
```
|
||||
|
||||
In your main code, create some documents:
|
||||
|
||||
```java
|
||||
List<Document> documents = List.of(
|
||||
new Document("Spring AI rocks!! Spring AI rocks!! Spring AI rocks!! Spring AI rocks!! Spring AI rocks!!", Map.of("meta1", "meta1")),
|
||||
new Document("The World is Big and Salvation Lurks Around the Corner"),
|
||||
new Document("You walk forward facing the past and you turn back toward the future.", Map.of("meta2", "meta2")));
|
||||
```
|
||||
|
||||
Add the documents to Pinecone:
|
||||
|
||||
```java
|
||||
vectorStore.add(List.of(document));
|
||||
```
|
||||
|
||||
And finally, retrieve documents similar to a query:
|
||||
|
||||
```java
|
||||
List<Document> results = vectorStore.similaritySearch(SearchRequest.query("Spring").withTopK(5));
|
||||
```
|
||||
|
||||
If all goes well, you should retrieve the document containing the text "Spring AI rocks!!".
|
||||
[Pinecone Vector Store Documentation](https://docs.spring.io/spring-ai/reference/api/vectordbs/pinecone.html)
|
||||
1
vector-stores/spring-ai-redis/README.md
Normal file
1
vector-stores/spring-ai-redis/README.md
Normal file
@@ -0,0 +1 @@
|
||||
[Redis Vector Store Documentation](https://docs.spring.io/spring-ai/reference/api/vectordbs/redis.html)
|
||||
@@ -15,11 +15,11 @@
|
||||
<url>https://github.com/spring-projects/spring-ai</url>
|
||||
|
||||
<scm>
|
||||
<url>https://github.com/spring-projects-experimental/spring-ai</url>
|
||||
<connection>git://github.com/spring-projects-experimental/spring-ai.git</connection>
|
||||
<developerConnection>git@github.com:spring-projects-experimental/spring-ai.git</developerConnection>
|
||||
<url>https://github.com/spring-projects/spring-ai</url>
|
||||
<connection>git://github.com/spring-projects/spring-ai.git</connection>
|
||||
<developerConnection>git@github.com:spring-projects/spring-ai.git</developerConnection>
|
||||
</scm>
|
||||
|
||||
|
||||
<properties>
|
||||
<testcontainers-redis.version>2.0.1</testcontainers-redis.version>
|
||||
<jedis.version>5.1.0</jedis.version>
|
||||
@@ -39,7 +39,7 @@
|
||||
<artifactId>jedis</artifactId>
|
||||
<version>${jedis.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- TESTING -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.ai</groupId>
|
||||
|
||||
1
vector-stores/spring-ai-weaviate/README.md
Normal file
1
vector-stores/spring-ai-weaviate/README.md
Normal file
@@ -0,0 +1 @@
|
||||
[Weaviate Vector Store Documentation](https://docs.spring.io/spring-ai/reference/api/vectordbs/weaviate.html)
|
||||
Reference in New Issue
Block a user