Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Edit Auto-configuration Example #1169

Merged
merged 3 commits into from
Aug 12, 2024

Conversation

cyPark95
Copy link
Contributor

@cyPark95 cyPark95 commented Aug 6, 2024

Corrected the variable passed to vectorStore.add() from List.of(document) to documents.

Original Code:

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 Redis
vectorStore.add(List.of(document));

Corrected Code:

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 Redis
vectorStore.add(documents);

@cyPark95 cyPark95 marked this pull request as draft August 12, 2024 01:16
@cyPark95 cyPark95 marked this pull request as ready for review August 12, 2024 01:17
@sobychacko sobychacko added this to the 1.0.0-M2 milestone Aug 12, 2024
@sobychacko sobychacko merged commit e02c691 into spring-projects:main Aug 12, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants