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: spring docs retrieval wrong method name #2296

Open
yuluo-yx opened this issue Feb 23, 2025 · 3 comments
Open

Docs: spring docs retrieval wrong method name #2296

yuluo-yx opened this issue Feb 23, 2025 · 3 comments

Comments

@yuluo-yx
Copy link
Contributor

docs: https://docs.spring.io/spring-ai/reference/api/retrieval-augmented-generation.html#_advanced_rag

Advisor retrievalAugmentationAdvisor = RetrievalAugmentationAdvisor.builder()
        .queryTransformer(RewriteQueryTransformer.builder()
                .chatClientBuilder(chatClientBuilder.build().mutate())
                .build())
        .documentRetriever(VectorStoreDocumentRetriever.builder()
                .similarityThreshold(0.50)
                .vectorStore(vectorStore)
                .build())
        .build();

code: org.springframework.ai.chat.client.advisor.RetrievalAugmentationAdvisor.Builder#queryTransformers(java.util.List<org.springframework.ai.rag.preretrieval.query.transformation.QueryTransformer>)

  public Builder queryTransformers(List<QueryTransformer> queryTransformers) {
      this.queryTransformers = queryTransformers;
      return this;
  }

  public Builder queryTransformers(QueryTransformer... queryTransformers) {
      this.queryTransformers = Arrays.asList(queryTransformers);
      return this;
  }

Image

@dev-jonghoonpark
Copy link
Contributor

To summarize:
The queryTransformer method does not exist.
We should use the queryTransformers method instead.

@yuluo-yx
Copy link
Contributor Author

To summarize: The queryTransformer method does not exist. We should use the queryTransformers method instead.

yep, thank you very much. I was negligent.

@dev-jonghoonpark
Copy link
Contributor

@yuluo-yx
Oh, it's not your negligence!
I just summarized what you wrote.
Thank you!

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

No branches or pull requests

2 participants