Skip to content

Commit 41885a8

Browse files
adambchoutitzolov
authored andcommitted
Enable updating the pinecone vector store namespace
1 parent 806f5c4 commit 41885a8

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

vector-stores/spring-ai-pinecone/src/main/java/org/springframework/ai/vectorstore/PineconeVectorStore.java

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,19 @@ public class PineconeVectorStore implements VectorStore {
6060

6161
private final PineconeConnection pineconeConnection;
6262

63-
private final String pineconeNamespace;
64-
6563
private final ObjectMapper objectMapper;
6664

65+
private String pineconeNamespace;
66+
67+
/**
68+
* Change the Index Name.
69+
* @param pineconeNamespace The Azure VectorStore index name to use.
70+
*/
71+
public void setPineconeNamespace(String pineconeNamespace) {
72+
Assert.hasText(pineconeNamespace, "The Pinecone namespace can not be empty.");
73+
this.pineconeNamespace = pineconeNamespace;
74+
}
75+
6776
/**
6877
* Configuration class for the PineconeVectorStore.
6978
*/

0 commit comments

Comments
 (0)