Skip to content

Commit 0d0eafe

Browse files
sobychackoilayaperumalg
authored andcommitted
Update Pinecone vector store docs for the builder pattern
1 parent 86a73f9 commit 0d0eafe

File tree

1 file changed

+10
-7
lines changed
  • spring-ai-docs/src/main/antora/modules/ROOT/pages/api/vectordbs

1 file changed

+10
-7
lines changed

spring-ai-docs/src/main/antora/modules/ROOT/pages/api/vectordbs/pinecone.adoc

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ To set up `PineconeVectorStore`, gather the following details from your Pinecone
2222
[NOTE]
2323
====
2424
This information is available to you in the Pinecone UI portal.
25+
The namespace support is not available in the Pinecone free tier.
2526
====
2627

2728
== Auto-configuration
@@ -154,8 +155,7 @@ NOTE: These filter expressions are converted into the equivalent Pinecone filter
154155

155156
== Manual Configuration
156157

157-
If you prefer to configure the `PineconeVectorStore` manually, you can do so by creating a `PineconeVectorStoreConfig` bean
158-
and passing it to the `PineconeVectorStore` constructor.
158+
If you prefer to configure `PineconeVectorStore` manually, you can do so by using the `PineconeVectorStore#Builder`.
159159

160160
Add these dependencies to your project:
161161

@@ -189,11 +189,14 @@ To configure Pinecone in your application, you can use the following setup:
189189
----
190190
@Bean
191191
public VectorStore pineconeVectorStore(EmbeddingModel embeddingModel) {
192-
return PineconeVectorStore
193-
.builder(embeddingModel, PINECONE_API_KEY, PINECONE_PROJECT_ID, PINECONE_ENVIRONMENT, PINECONE_INDEX_NAME)
194-
.namespace(PINECONE_NAMESPACE) // the free tier doesn't support namespaces.
195-
.contentFieldName(CUSTOM_CONTENT_FIELD_NAME) // optional field to store the original content. Defaults to `document_content`
196-
.build();
192+
return PineconeVectorStore.builder(embeddingModel)
193+
.apiKey(PINECONE_API_KEY)
194+
.projectId(PINECONE_PROJECT_ID)
195+
.environment(PINECONE_ENVIRONMENT)
196+
.indexName(PINECONE_INDEX_NAME)
197+
.namespace(PINECONE_NAMESPACE) // the free tier doesn't support namespaces.
198+
.contentFieldName(CUSTOM_CONTENT_FIELD_NAME) // optional field to store the original content. Defaults to `document_content`
199+
.build();
197200
}
198201
----
199202

0 commit comments

Comments
 (0)