Files
modelstudioai__cli/packages/core/src/client/index.ts
T
zeyu.fz 6317da8454 feat(cli): 重构知识库检索命令,支持API-KEY和AK/SK鉴权
- 增加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方法接口调用
2026-06-08 18:43:50 +08:00

28 lines
868 B
TypeScript

export type { AkSignConfig } from "./ak-sign.ts";
export { signRequest } from "./ak-sign.ts";
export {
appCompletionEndpoint,
chatEndpoint,
imageEndpoint,
imageSyncEndpoint,
knowledgeRetrieveEndpoint,
memoryAddEndpoint,
memoryListEndpoint,
memoryNodeEndpoint,
memorySearchEndpoint,
mcpWebSearchEndpoint,
profileSchemaEndpoint,
speechRecognizeEndpoint,
speechSynthesizeEndpoint,
taskEndpoint,
userProfileEndpoint,
videoGenerateEndpoint,
} from "./endpoints.ts";
export { CHANNEL, SOURCE_CONFIG, TAGS, trackingHeaders } from "./headers.ts";
export type { RequestOpts } from "./http.ts";
export { request, requestJson } from "./http.ts";
export type { McpTool, McpToolResult } from "./mcp.ts";
export { McpClient, bailianMcpUrl } from "./mcp.ts";
export type { ServerSentEvent } from "./stream.ts";
export { parseSSE } from "./stream.ts";