You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9bd8b60
Browse filesBrowse the repository at this point in the historyBrowse files
bl knowledge search --query "How does it work" --agent-id aid-xxx --workspace-id ws-xxx --query-history '[{"role":"user","content":"What is RAG"},{"role":"assistant","content":"RAG is retrieval-augmented generation"}]'
Copy file name to clipboardExpand all lines: packages/commands/src/commands/knowledge/search.ts
-25Lines changed: 0 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,6 @@ import {
2
2
defineCommand,
3
3
knowledgeSearchEndpoint,
4
4
detectOutputFormat,
5
-
BailianError,
6
-
ExitCode,
7
5
typeFlagsDef,
8
6
typeKnowledgeSearchRequest,
9
7
typeKnowledgeSearchResponse,
@@ -39,12 +37,6 @@ const SEARCH_FLAGS = {
39
37
valueHint: "<url>",
40
38
description: "Image URL for multimodal retrieval (repeatable)",
41
39
},
42
-
queryHistory: {
43
-
type: "string",
44
-
valueHint: "<json>",
45
-
description:
46
-
'User conversation history JSON for context understanding and query rewriting. Format: \'[{"role":"user","content":"What is RAG"},{"role":"assistant","content":"RAG is..."}]\'',
"Retrieval scope and strategy (multi-index weighting, routing, reranking, etc.) are driven by the agent_id service config. Only query and agent_id are required.",
57
49
"Auth: uses DashScope API Key (Bearer token). Get yours from the console API Key page.",
58
50
"`--workspace-id` can be set via BAILIAN_WORKSPACE_ID env or `kscli config set workspace_id <id>`.",
59
-
"`--query-history` passes prior conversation turns; the server rewrites the query based on context to improve retrieval relevance.",
60
51
"`--agent-version beta` calls the draft config for debugging before it is deployed.",
61
52
],
62
53
exampleArgs: [
63
54
'--query "What is RAG?" --agent-id aid-xxx --workspace-id ws-xxx',
'--query "How does it work" --agent-id aid-xxx --workspace-id ws-xxx --query-history \'[{"role":"user","content":"What is RAG"},{"role":"assistant","content":"RAG is retrieval-augmented generation"}]\'',
66
56
],
67
57
asyncrun(ctx){
68
58
const{ settings, flags }=ctx;
@@ -86,21 +76,6 @@ export default defineCommand({
86
76
body.images=flags.image;
87
77
}
88
78
89
-
// Parse query_history JSON for multi-turn context
|`--query <text>`| string | yes | Search query text (required, cannot be empty) |
913
-
|`--agent-id <id>`| string | yes | Retrieval service ID (find in console knowledge retrieval page) |
914
-
|`--workspace-id <id>`| string | no | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) |
915
-
|`--agent-version <version>`| string | no | Service version to call: beta (draft for debugging) or a published number; default is the latest published version |
916
-
|`--image <url>`| array | no | Image URL for multimodal retrieval (repeatable) |
917
-
|`--query-history <json>`| string | no | User conversation history JSON for context understanding and query rewriting. Format: '[{"role":"user","content":"What is RAG"},{"role":"assistant","content":"RAG is..."}]' |
|`--query <text>`| string | yes | Search query text (required, cannot be empty) |
913
+
|`--agent-id <id>`| string | yes | Retrieval service ID (find in console knowledge retrieval page) |
914
+
|`--workspace-id <id>`| string | no | Workspace ID for API endpoint URL (or set BAILIAN_WORKSPACE_ID) |
915
+
|`--agent-version <version>`| string | no | Service version to call: beta (draft for debugging) or a published number; default is the latest published version |
916
+
|`--image <url>`| array | no | Image URL for multimodal retrieval (repeatable) |
917
+
|`--api-key <key>`| string | no | API key |
918
+
|`--base-url <url>`| string | no | API base URL |
920
919
921
920
#### Notes
922
921
923
922
- Retrieval scope and strategy (multi-index weighting, routing, reranking, etc.) are driven by the agent_id service config. Only query and agent_id are required.
924
923
- Auth: uses DashScope API Key (Bearer token). Get yours from the console API Key page.
925
924
-`--workspace-id` can be set via BAILIAN_WORKSPACE_ID env or `kscli config set workspace_id <id>`.
926
-
-`--query-history` passes prior conversation turns; the server rewrites the query based on context to improve retrieval relevance.
927
925
-`--agent-version beta` calls the draft config for debugging before it is deployed.
bl knowledge search --query "How does it work" --agent-id aid-xxx --workspace-id ws-xxx --query-history '[{"role":"user","content":"What is RAG"},{"role":"assistant","content":"RAG is retrieval-augmented generation"}]'
0 commit comments