@erdoai/cli 0.265.0 → 0.273.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2453,9 +2453,10 @@ var ErdoClient = class {
|
|
|
2453
2453
|
const qs = params.toString();
|
|
2454
2454
|
return this.request("GET", `/v1/knowledge${qs ? `?${qs}` : ""}`);
|
|
2455
2455
|
}
|
|
2456
|
-
searchKnowledge(query, limit) {
|
|
2456
|
+
searchKnowledge(query, limit, offset) {
|
|
2457
2457
|
const params = new URLSearchParams({ query });
|
|
2458
2458
|
if (limit) params.set("limit", String(limit));
|
|
2459
|
+
if (offset !== void 0) params.set("offset", String(offset));
|
|
2459
2460
|
return this.request("GET", `/v1/knowledge-search?${params.toString()}`);
|
|
2460
2461
|
}
|
|
2461
2462
|
deleteKnowledge(id) {
|
|
@@ -4055,11 +4056,11 @@ id: ${o.id}`);
|
|
|
4055
4056
|
}
|
|
4056
4057
|
});
|
|
4057
4058
|
managed.command("adopt [token]").description(
|
|
4058
|
-
"Take over an existing org: redeem a one-time consent token, or --from-org <slug> for an org you
|
|
4059
|
-
).option("--from-org <slug>", "slug of an org you are an owner of, adopted directly").action(async (token, opts) => {
|
|
4059
|
+
"Take over an existing org: redeem a one-time consent token, or --from-org <slug> for an org you administer yourself (no token needed)"
|
|
4060
|
+
).option("--from-org <slug>", "slug of an org you are an owner or admin of, adopted directly").action(async (token, opts) => {
|
|
4060
4061
|
try {
|
|
4061
4062
|
if (!token && !opts.fromOrg) {
|
|
4062
|
-
fail(new Error("provide a consent token, or --from-org <slug> for an org you
|
|
4063
|
+
fail(new Error("provide a consent token, or --from-org <slug> for an org you administer"));
|
|
4063
4064
|
}
|
|
4064
4065
|
if (token && opts.fromOrg) {
|
|
4065
4066
|
fail(new Error("provide a token or --from-org, not both"));
|
|
@@ -11724,9 +11725,9 @@ knowledgeCmd.command("list").description("List knowledge objects").option(
|
|
|
11724
11725
|
fail(e);
|
|
11725
11726
|
}
|
|
11726
11727
|
});
|
|
11727
|
-
knowledgeCmd.command("search <query>").description("Semantic search over knowledge").option("-l, --limit <n>", "max results", (v) => parseInt(v, 10)).action(async (query, opts) => {
|
|
11728
|
+
knowledgeCmd.command("search <query>").description("Semantic search over knowledge").option("-l, --limit <n>", "max results", (v) => parseInt(v, 10)).option("--offset <n>", "offset within the ranked window", (v) => parseInt(v, 10)).action(async (query, opts) => {
|
|
11728
11729
|
try {
|
|
11729
|
-
print(await new ErdoClient().searchKnowledge(query, opts.limit));
|
|
11730
|
+
print(await new ErdoClient().searchKnowledge(query, opts.limit, opts.offset));
|
|
11730
11731
|
} catch (e) {
|
|
11731
11732
|
fail(e);
|
|
11732
11733
|
}
|