Skip to content

关于文档【文档检索 (Document Retriever)】的反馈 #229

@wyywangyuyang

Description

@wyywangyuyang

var dashScopeApi = new DashScopeApi(System.getenv("DASHSCOPE_API_KEY"));
DocumentRetriever retriever = new DashScopeDocumentRetriever(dashScopeApi,
DashScopeDocumentRetrieverOptions.builder()
.withIndexName("spring-ai知识库")
.build());

List documentList = retriever.retrieve("What's spring ai");

上述代码中,var dashScopeApi = new DashScopeApi(System.getenv("DASHSCOPE_API_KEY"));
应该改写成 var dashScopeApi = DashScopeApi.builder().apiKey(System.getenv("DASHSCOPE_API_KEY")).build();


文档详细信息

请勿编辑此部分。sca.aliyun.com ➟ GitHub 问题链接必须具有此部分。

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