Skip to content

Docs: spring docs retrieval wrong method name #2296

Closed
@yuluo-yx

Description

@yuluo-yx

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions