Feat/knowledge api key#45
Merged
Merged
Conversation
- 增加API-KEY鉴权路径,采用DashScope协议(snake_case)请求后端接口 - 保留AK/SK鉴权路径,但打印废弃警告,采用PascalCase请求后端 - 命令参数调整,新增dense-similarity-top-k、sparse-similarity-top-k等API-KEY专用选项 - 废弃部分旧参数如顶层top-k,提醒用户改用rerank-top-n - 统一输出格式以及静默模式下文本结果的打印逻辑优化 - 添加相关类型定义,完善请求与响应结构的类型支持 - CLI端增加dry-run模式,展示实际请求参数与地址 - E2E测试覆盖API-KEY和AK/SK两条路径,包含帮助提示、错误场景及关键参数测试 - 更新依赖的核心包导出与接口,新增knowledgeRetrieveEndpoint方法接口调用
- 优先使用显式提供的API-Key进行鉴权 - 在无显式API-Key时优先采用显式AK/SK鉴权 - 保持对无显式鉴权信息情况下的自动鉴权兼容 - 重构鉴权判断逻辑以提高代码清晰度和可维护性
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.