@getzep/zep-cloud 3.22.0 → 3.23.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/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/batch/client/requests/ApidataCreateBatchRequest.d.ts +8 -0
- package/dist/cjs/api/resources/graph/client/Client.d.ts +17 -1
- package/dist/cjs/api/resources/graph/client/Client.js +84 -1
- package/dist/cjs/api/resources/graph/client/requests/AddTripleRequest.d.ts +14 -2
- package/dist/cjs/api/resources/graph/client/requests/GraphSearchQuery.d.ts +3 -4
- package/dist/cjs/api/resources/thread/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/thread/client/Client.js +4 -2
- package/dist/cjs/api/resources/thread/client/requests/ThreadGetRequest.d.ts +1 -1
- package/dist/cjs/api/types/BatchItemDetail.d.ts +6 -0
- package/dist/cjs/api/types/BatchItemStatus.d.ts +2 -1
- package/dist/cjs/api/types/BatchItemStatus.js +1 -0
- package/dist/cjs/api/types/BatchProgress.d.ts +1 -0
- package/dist/cjs/api/types/BatchStatus.d.ts +2 -1
- package/dist/cjs/api/types/BatchStatus.js +1 -0
- package/dist/cjs/api/types/BatchSummary.d.ts +1 -0
- package/dist/cjs/api/types/DerivedNode.d.ts +16 -0
- package/dist/cjs/api/types/GraphSearchResponseMetadata.d.ts +7 -0
- package/dist/cjs/api/types/GraphSearchResponseMetadata.js +5 -0
- package/dist/cjs/api/types/GraphSearchResults.d.ts +1 -0
- package/dist/cjs/api/types/GraphitiSagaNode.d.ts +10 -1
- package/dist/cjs/api/types/ThreadSummary.d.ts +12 -1
- package/dist/cjs/api/types/index.d.ts +1 -0
- package/dist/cjs/api/types/index.js +1 -0
- package/dist/cjs/serialization/resources/batch/client/requests/ApidataCreateBatchRequest.d.ts +2 -0
- package/dist/cjs/serialization/resources/batch/client/requests/ApidataCreateBatchRequest.js +2 -0
- package/dist/cjs/serialization/types/BatchItemStatus.d.ts +1 -1
- package/dist/cjs/serialization/types/BatchItemStatus.js +1 -1
- package/dist/cjs/serialization/types/BatchProgress.d.ts +1 -0
- package/dist/cjs/serialization/types/BatchProgress.js +1 -0
- package/dist/cjs/serialization/types/BatchStatus.d.ts +1 -1
- package/dist/cjs/serialization/types/BatchStatus.js +10 -1
- package/dist/cjs/serialization/types/BatchSummary.d.ts +2 -0
- package/dist/cjs/serialization/types/BatchSummary.js +2 -0
- package/dist/cjs/serialization/types/DerivedNode.d.ts +3 -0
- package/dist/cjs/serialization/types/DerivedNode.js +3 -0
- package/dist/cjs/serialization/types/GraphSearchResponseMetadata.d.ts +12 -0
- package/dist/cjs/serialization/types/GraphSearchResponseMetadata.js +43 -0
- package/dist/cjs/serialization/types/GraphSearchResults.d.ts +2 -0
- package/dist/cjs/serialization/types/GraphSearchResults.js +2 -0
- package/dist/cjs/serialization/types/GraphitiSagaNode.d.ts +1 -0
- package/dist/cjs/serialization/types/GraphitiSagaNode.js +1 -0
- package/dist/cjs/serialization/types/ThreadSummary.d.ts +1 -0
- package/dist/cjs/serialization/types/ThreadSummary.js +1 -0
- package/dist/cjs/serialization/types/index.d.ts +1 -0
- package/dist/cjs/serialization/types/index.js +1 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/batch/client/requests/ApidataCreateBatchRequest.d.mts +8 -0
- package/dist/esm/api/resources/graph/client/Client.d.mts +17 -1
- package/dist/esm/api/resources/graph/client/Client.mjs +84 -1
- package/dist/esm/api/resources/graph/client/requests/AddTripleRequest.d.mts +14 -2
- package/dist/esm/api/resources/graph/client/requests/GraphSearchQuery.d.mts +3 -4
- package/dist/esm/api/resources/thread/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/thread/client/Client.mjs +4 -2
- package/dist/esm/api/resources/thread/client/requests/ThreadGetRequest.d.mts +1 -1
- package/dist/esm/api/types/BatchItemDetail.d.mts +6 -0
- package/dist/esm/api/types/BatchItemStatus.d.mts +2 -1
- package/dist/esm/api/types/BatchItemStatus.mjs +1 -0
- package/dist/esm/api/types/BatchProgress.d.mts +1 -0
- package/dist/esm/api/types/BatchStatus.d.mts +2 -1
- package/dist/esm/api/types/BatchStatus.mjs +1 -0
- package/dist/esm/api/types/BatchSummary.d.mts +1 -0
- package/dist/esm/api/types/DerivedNode.d.mts +16 -0
- package/dist/esm/api/types/GraphSearchResponseMetadata.d.mts +7 -0
- package/dist/esm/api/types/GraphSearchResponseMetadata.mjs +4 -0
- package/dist/esm/api/types/GraphSearchResults.d.mts +1 -0
- package/dist/esm/api/types/GraphitiSagaNode.d.mts +10 -1
- package/dist/esm/api/types/ThreadSummary.d.mts +12 -1
- package/dist/esm/api/types/index.d.mts +1 -0
- package/dist/esm/api/types/index.mjs +1 -0
- package/dist/esm/serialization/resources/batch/client/requests/ApidataCreateBatchRequest.d.mts +2 -0
- package/dist/esm/serialization/resources/batch/client/requests/ApidataCreateBatchRequest.mjs +2 -0
- package/dist/esm/serialization/types/BatchItemStatus.d.mts +1 -1
- package/dist/esm/serialization/types/BatchItemStatus.mjs +1 -1
- package/dist/esm/serialization/types/BatchProgress.d.mts +1 -0
- package/dist/esm/serialization/types/BatchProgress.mjs +1 -0
- package/dist/esm/serialization/types/BatchStatus.d.mts +1 -1
- package/dist/esm/serialization/types/BatchStatus.mjs +10 -1
- package/dist/esm/serialization/types/BatchSummary.d.mts +2 -0
- package/dist/esm/serialization/types/BatchSummary.mjs +2 -0
- package/dist/esm/serialization/types/DerivedNode.d.mts +3 -0
- package/dist/esm/serialization/types/DerivedNode.mjs +3 -0
- package/dist/esm/serialization/types/GraphSearchResponseMetadata.d.mts +12 -0
- package/dist/esm/serialization/types/GraphSearchResponseMetadata.mjs +7 -0
- package/dist/esm/serialization/types/GraphSearchResults.d.mts +2 -0
- package/dist/esm/serialization/types/GraphSearchResults.mjs +2 -0
- package/dist/esm/serialization/types/GraphitiSagaNode.d.mts +1 -0
- package/dist/esm/serialization/types/GraphitiSagaNode.mjs +1 -0
- package/dist/esm/serialization/types/ThreadSummary.d.mts +1 -0
- package/dist/esm/serialization/types/ThreadSummary.mjs +1 -0
- package/dist/esm/serialization/types/index.d.mts +1 -0
- package/dist/esm/serialization/types/index.mjs +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +70 -3
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.GraphSearchResponseMetadata = void 0;
|
|
40
|
+
const core = __importStar(require("../../core/index.js"));
|
|
41
|
+
exports.GraphSearchResponseMetadata = core.serialization.object({
|
|
42
|
+
serverLatencyMs: core.serialization.property("server_latency_ms", core.serialization.number().optional()),
|
|
43
|
+
});
|
|
@@ -8,6 +8,7 @@ import { EntityEdge } from "./EntityEdge.js";
|
|
|
8
8
|
import { Episode } from "./Episode.js";
|
|
9
9
|
import { EntityNode } from "./EntityNode.js";
|
|
10
10
|
import { DerivedNode } from "./DerivedNode.js";
|
|
11
|
+
import { GraphSearchResponseMetadata } from "./GraphSearchResponseMetadata.js";
|
|
11
12
|
import { GraphitiSagaNode } from "./GraphitiSagaNode.js";
|
|
12
13
|
export declare const GraphSearchResults: core.serialization.ObjectSchema<serializers.GraphSearchResults.Raw, Zep.GraphSearchResults>;
|
|
13
14
|
export declare namespace GraphSearchResults {
|
|
@@ -17,6 +18,7 @@ export declare namespace GraphSearchResults {
|
|
|
17
18
|
episodes?: Episode.Raw[] | null;
|
|
18
19
|
nodes?: EntityNode.Raw[] | null;
|
|
19
20
|
observations?: DerivedNode.Raw[] | null;
|
|
21
|
+
response?: GraphSearchResponseMetadata.Raw | null;
|
|
20
22
|
thread_summaries?: GraphitiSagaNode.Raw[] | null;
|
|
21
23
|
}
|
|
22
24
|
}
|
|
@@ -42,6 +42,7 @@ const EntityEdge_js_1 = require("./EntityEdge.js");
|
|
|
42
42
|
const Episode_js_1 = require("./Episode.js");
|
|
43
43
|
const EntityNode_js_1 = require("./EntityNode.js");
|
|
44
44
|
const DerivedNode_js_1 = require("./DerivedNode.js");
|
|
45
|
+
const GraphSearchResponseMetadata_js_1 = require("./GraphSearchResponseMetadata.js");
|
|
45
46
|
const GraphitiSagaNode_js_1 = require("./GraphitiSagaNode.js");
|
|
46
47
|
exports.GraphSearchResults = core.serialization.object({
|
|
47
48
|
context: core.serialization.string().optional(),
|
|
@@ -49,5 +50,6 @@ exports.GraphSearchResults = core.serialization.object({
|
|
|
49
50
|
episodes: core.serialization.list(Episode_js_1.Episode).optional(),
|
|
50
51
|
nodes: core.serialization.list(EntityNode_js_1.EntityNode).optional(),
|
|
51
52
|
observations: core.serialization.list(DerivedNode_js_1.DerivedNode).optional(),
|
|
53
|
+
response: GraphSearchResponseMetadata_js_1.GraphSearchResponseMetadata.optional(),
|
|
52
54
|
threadSummaries: core.serialization.property("thread_summaries", core.serialization.list(GraphitiSagaNode_js_1.GraphitiSagaNode).optional()),
|
|
53
55
|
});
|
|
@@ -42,6 +42,7 @@ exports.GraphitiSagaNode = core.serialization.object({
|
|
|
42
42
|
createdAt: core.serialization.property("created_at", core.serialization.string()),
|
|
43
43
|
labels: core.serialization.list(core.serialization.string()).optional(),
|
|
44
44
|
lastSummarizedAt: core.serialization.property("last_summarized_at", core.serialization.string().optional()),
|
|
45
|
+
lastSummarizedEpisodeValidAt: core.serialization.property("last_summarized_episode_valid_at", core.serialization.string().optional()),
|
|
45
46
|
name: core.serialization.string(),
|
|
46
47
|
relevance: core.serialization.number().optional(),
|
|
47
48
|
score: core.serialization.number().optional(),
|
|
@@ -41,6 +41,7 @@ const core = __importStar(require("../../core/index.js"));
|
|
|
41
41
|
exports.ThreadSummary = core.serialization.object({
|
|
42
42
|
createdAt: core.serialization.property("created_at", core.serialization.string().optional()),
|
|
43
43
|
lastSummarizedAt: core.serialization.property("last_summarized_at", core.serialization.string().optional()),
|
|
44
|
+
lastSummarizedEpisodeValidAt: core.serialization.property("last_summarized_episode_valid_at", core.serialization.string().optional()),
|
|
44
45
|
summary: core.serialization.string().optional(),
|
|
45
46
|
threadId: core.serialization.property("thread_id", core.serialization.string().optional()),
|
|
46
47
|
uuid: core.serialization.string().optional(),
|
|
@@ -31,6 +31,7 @@ export * from "./EpisodeResponse.js";
|
|
|
31
31
|
export * from "./GraphListResponse.js";
|
|
32
32
|
export * from "./GraphNodesRequest.js";
|
|
33
33
|
export * from "./GraphObservationsRequest.js";
|
|
34
|
+
export * from "./GraphSearchResponseMetadata.js";
|
|
34
35
|
export * from "./GraphSearchResults.js";
|
|
35
36
|
export * from "./GraphThreadSummariesRequest.js";
|
|
36
37
|
export * from "./HubDetectConfig.js";
|
|
@@ -47,6 +47,7 @@ __exportStar(require("./EpisodeResponse.js"), exports);
|
|
|
47
47
|
__exportStar(require("./GraphListResponse.js"), exports);
|
|
48
48
|
__exportStar(require("./GraphNodesRequest.js"), exports);
|
|
49
49
|
__exportStar(require("./GraphObservationsRequest.js"), exports);
|
|
50
|
+
__exportStar(require("./GraphSearchResponseMetadata.js"), exports);
|
|
50
51
|
__exportStar(require("./GraphSearchResults.js"), exports);
|
|
51
52
|
__exportStar(require("./GraphThreadSummariesRequest.js"), exports);
|
|
52
53
|
__exportStar(require("./HubDetectConfig.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "3.
|
|
1
|
+
export declare const SDK_VERSION = "3.23.0";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/Client.mjs
CHANGED
|
@@ -15,8 +15,8 @@ export class ZepClient {
|
|
|
15
15
|
this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
|
|
16
16
|
"X-Fern-Language": "JavaScript",
|
|
17
17
|
"X-Fern-SDK-Name": "zep-cloud",
|
|
18
|
-
"X-Fern-SDK-Version": "3.
|
|
19
|
-
"User-Agent": "zep-cloud/3.
|
|
18
|
+
"X-Fern-SDK-Version": "3.23.0",
|
|
19
|
+
"User-Agent": "zep-cloud/3.23.0",
|
|
20
20
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
21
21
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
22
22
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as Zep from "../../../../index.mjs";
|
|
4
5
|
/**
|
|
5
6
|
* @example
|
|
6
7
|
* {}
|
|
7
8
|
*/
|
|
8
9
|
export interface ApidataCreateBatchRequest {
|
|
10
|
+
/**
|
|
11
|
+
* Optional list of message role types to skip during graph ingestion for
|
|
12
|
+
* thread_message items in this batch. The messages are still stored and
|
|
13
|
+
* retained as context, but no graph extraction is performed for them.
|
|
14
|
+
* Has no effect on graph_episode items.
|
|
15
|
+
*/
|
|
16
|
+
ignoreRoles?: Zep.RoleType[];
|
|
9
17
|
metadata?: Record<string, unknown>;
|
|
10
18
|
}
|
|
@@ -147,7 +147,9 @@ export declare class Graph {
|
|
|
147
147
|
add(request: Zep.AddDataRequest, requestOptions?: Graph.RequestOptions): core.HttpResponsePromise<Zep.Episode>;
|
|
148
148
|
private __add;
|
|
149
149
|
/**
|
|
150
|
-
*
|
|
150
|
+
* Deprecated. Use the [Batch API](/adding-batch-data) (`client.batch.*`) instead.
|
|
151
|
+
*
|
|
152
|
+
* Adds data to the graph in batch mode, processing episodes concurrently.
|
|
151
153
|
*
|
|
152
154
|
* @param {Zep.AddDataBatchRequest} request
|
|
153
155
|
* @param {Graph.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -312,6 +314,20 @@ export declare class Graph {
|
|
|
312
314
|
*/
|
|
313
315
|
update(graphId: string, request?: Zep.UpdateGraphRequest, requestOptions?: Graph.RequestOptions): core.HttpResponsePromise<Zep.Graph>;
|
|
314
316
|
private __update;
|
|
317
|
+
/**
|
|
318
|
+
* Hints Zep to warm a graph for low-latency search
|
|
319
|
+
*
|
|
320
|
+
* @param {string} graphId - The graph_id of the graph to warm.
|
|
321
|
+
* @param {Graph.RequestOptions} requestOptions - Request-specific configuration.
|
|
322
|
+
*
|
|
323
|
+
* @throws {@link Zep.NotFoundError}
|
|
324
|
+
* @throws {@link Zep.InternalServerError}
|
|
325
|
+
*
|
|
326
|
+
* @example
|
|
327
|
+
* await client.graph.warm("graphId")
|
|
328
|
+
*/
|
|
329
|
+
warm(graphId: string, requestOptions?: Graph.RequestOptions): core.HttpResponsePromise<Zep.SuccessResponse>;
|
|
330
|
+
private __warm;
|
|
315
331
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
316
332
|
Authorization: string;
|
|
317
333
|
}>;
|
|
@@ -597,7 +597,9 @@ export class Graph {
|
|
|
597
597
|
});
|
|
598
598
|
}
|
|
599
599
|
/**
|
|
600
|
-
*
|
|
600
|
+
* Deprecated. Use the [Batch API](/adding-batch-data) (`client.batch.*`) instead.
|
|
601
|
+
*
|
|
602
|
+
* Adds data to the graph in batch mode, processing episodes concurrently.
|
|
601
603
|
*
|
|
602
604
|
* @param {Zep.AddDataBatchRequest} request
|
|
603
605
|
* @param {Graph.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -1470,6 +1472,87 @@ export class Graph {
|
|
|
1470
1472
|
}
|
|
1471
1473
|
});
|
|
1472
1474
|
}
|
|
1475
|
+
/**
|
|
1476
|
+
* Hints Zep to warm a graph for low-latency search
|
|
1477
|
+
*
|
|
1478
|
+
* @param {string} graphId - The graph_id of the graph to warm.
|
|
1479
|
+
* @param {Graph.RequestOptions} requestOptions - Request-specific configuration.
|
|
1480
|
+
*
|
|
1481
|
+
* @throws {@link Zep.NotFoundError}
|
|
1482
|
+
* @throws {@link Zep.InternalServerError}
|
|
1483
|
+
*
|
|
1484
|
+
* @example
|
|
1485
|
+
* await client.graph.warm("graphId")
|
|
1486
|
+
*/
|
|
1487
|
+
warm(graphId, requestOptions) {
|
|
1488
|
+
return core.HttpResponsePromise.fromPromise(this.__warm(graphId, requestOptions));
|
|
1489
|
+
}
|
|
1490
|
+
__warm(graphId, requestOptions) {
|
|
1491
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1492
|
+
var _a, _b, _c, _d;
|
|
1493
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1494
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ZepEnvironment.Default, `graph/${encodeURIComponent(graphId)}/warm`),
|
|
1495
|
+
method: "GET",
|
|
1496
|
+
headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1497
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
1498
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
1499
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1500
|
+
});
|
|
1501
|
+
if (_response.ok) {
|
|
1502
|
+
return {
|
|
1503
|
+
data: serializers.SuccessResponse.parseOrThrow(_response.body, {
|
|
1504
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1505
|
+
allowUnrecognizedUnionMembers: true,
|
|
1506
|
+
allowUnrecognizedEnumValues: true,
|
|
1507
|
+
skipValidation: true,
|
|
1508
|
+
breadcrumbsPrefix: ["response"],
|
|
1509
|
+
}),
|
|
1510
|
+
rawResponse: _response.rawResponse,
|
|
1511
|
+
};
|
|
1512
|
+
}
|
|
1513
|
+
if (_response.error.reason === "status-code") {
|
|
1514
|
+
switch (_response.error.statusCode) {
|
|
1515
|
+
case 404:
|
|
1516
|
+
throw new Zep.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1517
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1518
|
+
allowUnrecognizedUnionMembers: true,
|
|
1519
|
+
allowUnrecognizedEnumValues: true,
|
|
1520
|
+
skipValidation: true,
|
|
1521
|
+
breadcrumbsPrefix: ["response"],
|
|
1522
|
+
}), _response.rawResponse);
|
|
1523
|
+
case 500:
|
|
1524
|
+
throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1525
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1526
|
+
allowUnrecognizedUnionMembers: true,
|
|
1527
|
+
allowUnrecognizedEnumValues: true,
|
|
1528
|
+
skipValidation: true,
|
|
1529
|
+
breadcrumbsPrefix: ["response"],
|
|
1530
|
+
}), _response.rawResponse);
|
|
1531
|
+
default:
|
|
1532
|
+
throw new errors.ZepError({
|
|
1533
|
+
statusCode: _response.error.statusCode,
|
|
1534
|
+
body: _response.error.body,
|
|
1535
|
+
rawResponse: _response.rawResponse,
|
|
1536
|
+
});
|
|
1537
|
+
}
|
|
1538
|
+
}
|
|
1539
|
+
switch (_response.error.reason) {
|
|
1540
|
+
case "non-json":
|
|
1541
|
+
throw new errors.ZepError({
|
|
1542
|
+
statusCode: _response.error.statusCode,
|
|
1543
|
+
body: _response.error.rawBody,
|
|
1544
|
+
rawResponse: _response.rawResponse,
|
|
1545
|
+
});
|
|
1546
|
+
case "timeout":
|
|
1547
|
+
throw new errors.ZepTimeoutError("Timeout exceeded when calling GET /graph/{graphId}/warm.");
|
|
1548
|
+
case "unknown":
|
|
1549
|
+
throw new errors.ZepError({
|
|
1550
|
+
message: _response.error.errorMessage,
|
|
1551
|
+
rawResponse: _response.rawResponse,
|
|
1552
|
+
});
|
|
1553
|
+
}
|
|
1554
|
+
});
|
|
1555
|
+
}
|
|
1473
1556
|
_getCustomAuthorizationHeaders() {
|
|
1474
1557
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1475
1558
|
var _a;
|
|
@@ -37,7 +37,13 @@ export interface AddTripleRequest {
|
|
|
37
37
|
* Nested objects and arrays are not allowed.
|
|
38
38
|
*/
|
|
39
39
|
sourceNodeAttributes?: Record<string, unknown>;
|
|
40
|
-
/**
|
|
40
|
+
/**
|
|
41
|
+
* The labels for the source node. At most one entity-type label may be
|
|
42
|
+
* provided so that manually-added triples remain consistent with automatic
|
|
43
|
+
* episode extraction, which assigns one best-match entity type per node.
|
|
44
|
+
* The base "Entity" label is added implicitly by the graph layer on save
|
|
45
|
+
* and does not need to be supplied here.
|
|
46
|
+
*/
|
|
41
47
|
sourceNodeLabels?: string[];
|
|
42
48
|
/** The name of the source node to add */
|
|
43
49
|
sourceNodeName?: string;
|
|
@@ -50,7 +56,13 @@ export interface AddTripleRequest {
|
|
|
50
56
|
* Nested objects and arrays are not allowed.
|
|
51
57
|
*/
|
|
52
58
|
targetNodeAttributes?: Record<string, unknown>;
|
|
53
|
-
/**
|
|
59
|
+
/**
|
|
60
|
+
* The labels for the target node. At most one entity-type label may be
|
|
61
|
+
* provided so that manually-added triples remain consistent with automatic
|
|
62
|
+
* episode extraction, which assigns one best-match entity type per node.
|
|
63
|
+
* The base "Entity" label is added implicitly by the graph layer on save
|
|
64
|
+
* and does not need to be supplied here.
|
|
65
|
+
*/
|
|
54
66
|
targetNodeLabels?: string[];
|
|
55
67
|
/** The name of the target node to add */
|
|
56
68
|
targetNodeName?: string;
|
|
@@ -15,7 +15,7 @@ export interface GraphSearchQuery {
|
|
|
15
15
|
centerNodeUuid?: string;
|
|
16
16
|
/** The graph_id to search in. When searching user graph, please use user_id instead. */
|
|
17
17
|
graphId?: string;
|
|
18
|
-
/** The maximum number of facts to retrieve. Defaults to 10. Limited to 50. */
|
|
18
|
+
/** The maximum number of facts to retrieve for non-auto scopes. Defaults to 10. Limited to 50. Ignored when scope=auto. */
|
|
19
19
|
limit?: number;
|
|
20
20
|
/** Maximum total characters across all selected results when scope=auto. Defaults to 2500. Limited to 50000. */
|
|
21
21
|
maxCharacters?: number;
|
|
@@ -24,9 +24,8 @@ export interface GraphSearchQuery {
|
|
|
24
24
|
/** The string to search for (required) */
|
|
25
25
|
query: string;
|
|
26
26
|
/**
|
|
27
|
-
* Defaults to RRF.
|
|
28
|
-
*
|
|
29
|
-
* retrieval uses RRF, and auto search applies its own internal rerank after retrieval.
|
|
27
|
+
* Defaults to RRF. Ignored when scope=auto except node_distance and episode_mentions are rejected;
|
|
28
|
+
* auto search always uses RRF retrieval and applies its own internal rerank after retrieval.
|
|
30
29
|
*/
|
|
31
30
|
reranker?: Zep.Reranker;
|
|
32
31
|
/**
|
|
@@ -111,7 +111,7 @@ export declare class Thread {
|
|
|
111
111
|
* @example
|
|
112
112
|
* await client.thread.get("threadId", {
|
|
113
113
|
* limit: 1,
|
|
114
|
-
* cursor:
|
|
114
|
+
* cursor: 1000000,
|
|
115
115
|
* lastn: 1
|
|
116
116
|
* })
|
|
117
117
|
*/
|
|
@@ -137,7 +137,9 @@ export declare class Thread {
|
|
|
137
137
|
addMessages(threadId: string, request: Zep.AddThreadMessagesRequest, requestOptions?: Thread.RequestOptions): core.HttpResponsePromise<Zep.AddThreadMessagesResponse>;
|
|
138
138
|
private __addMessages;
|
|
139
139
|
/**
|
|
140
|
-
*
|
|
140
|
+
* Deprecated. Use the [Batch API](/adding-batch-data) (`client.batch.*` with `type: "thread_message"`) instead.
|
|
141
|
+
*
|
|
142
|
+
* Adds messages to a thread in batch mode, processing messages concurrently.
|
|
141
143
|
*
|
|
142
144
|
* @param {string} threadId - The ID of the thread to which messages should be added.
|
|
143
145
|
* @param {Zep.AddThreadMessagesRequest} request
|
|
@@ -388,7 +388,7 @@ export class Thread {
|
|
|
388
388
|
* @example
|
|
389
389
|
* await client.thread.get("threadId", {
|
|
390
390
|
* limit: 1,
|
|
391
|
-
* cursor:
|
|
391
|
+
* cursor: 1000000,
|
|
392
392
|
* lastn: 1
|
|
393
393
|
* })
|
|
394
394
|
*/
|
|
@@ -558,7 +558,9 @@ export class Thread {
|
|
|
558
558
|
});
|
|
559
559
|
}
|
|
560
560
|
/**
|
|
561
|
-
*
|
|
561
|
+
* Deprecated. Use the [Batch API](/adding-batch-data) (`client.batch.*` with `type: "thread_message"`) instead.
|
|
562
|
+
*
|
|
563
|
+
* Adds messages to a thread in batch mode, processing messages concurrently.
|
|
562
564
|
*
|
|
563
565
|
* @param {string} threadId - The ID of the thread to which messages should be added.
|
|
564
566
|
* @param {Zep.AddThreadMessagesRequest} request
|
|
@@ -4,6 +4,12 @@
|
|
|
4
4
|
import * as Zep from "../index.mjs";
|
|
5
5
|
export interface BatchItemDetail {
|
|
6
6
|
createdAt?: string;
|
|
7
|
+
/**
|
|
8
|
+
* EpisodeUUID is the UUID of the episode that will be (or has been) created
|
|
9
|
+
* for this batch item. Populated for every item kind and always equal to
|
|
10
|
+
* SourceUUID — the underlying source row's UUID is reused as the episode
|
|
11
|
+
* UUID during processing.
|
|
12
|
+
*/
|
|
7
13
|
episodeUuid?: string;
|
|
8
14
|
error?: Record<string, unknown>;
|
|
9
15
|
graphId?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export type BatchItemStatus = "pending" | "queued" | "processing" | "succeeded" | "failed" | "skipped";
|
|
4
|
+
export type BatchItemStatus = "pending" | "queued" | "processing" | "succeeded" | "failed" | "skipped" | "canceled";
|
|
5
5
|
export declare const BatchItemStatus: {
|
|
6
6
|
readonly Pending: "pending";
|
|
7
7
|
readonly Queued: "queued";
|
|
@@ -9,4 +9,5 @@ export declare const BatchItemStatus: {
|
|
|
9
9
|
readonly Succeeded: "succeeded";
|
|
10
10
|
readonly Failed: "failed";
|
|
11
11
|
readonly Skipped: "skipped";
|
|
12
|
+
readonly Canceled: "canceled";
|
|
12
13
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export type BatchStatus = "draft" | "invalid" | "queued" | "processing" | "succeeded" | "partial" | "failed";
|
|
4
|
+
export type BatchStatus = "draft" | "invalid" | "queued" | "processing" | "succeeded" | "partial" | "failed" | "canceled";
|
|
5
5
|
export declare const BatchStatus: {
|
|
6
6
|
readonly Draft: "draft";
|
|
7
7
|
readonly Invalid: "invalid";
|
|
@@ -10,4 +10,5 @@ export declare const BatchStatus: {
|
|
|
10
10
|
readonly Succeeded: "succeeded";
|
|
11
11
|
readonly Partial: "partial";
|
|
12
12
|
readonly Failed: "failed";
|
|
13
|
+
readonly Canceled: "canceled";
|
|
13
14
|
};
|
|
@@ -6,10 +6,21 @@ export interface DerivedNode {
|
|
|
6
6
|
attributes?: Record<string, unknown>;
|
|
7
7
|
/** Creation time of the node */
|
|
8
8
|
createdAt: string;
|
|
9
|
+
/**
|
|
10
|
+
* EndAt is the close timestamp of the evidence window. Set when the
|
|
11
|
+
* underlying pattern is no longer supported (closed observations);
|
|
12
|
+
* nil for active observations.
|
|
13
|
+
*/
|
|
14
|
+
endAt?: string;
|
|
9
15
|
/** Episode UUIDs that support this observation. Only populated for observation nodes in web API responses. */
|
|
10
16
|
episodeIds?: string[];
|
|
11
17
|
/** Labels associated with the node */
|
|
12
18
|
labels?: string[];
|
|
19
|
+
/**
|
|
20
|
+
* LatestEvidenceAt is the most recent source-episode timestamp from
|
|
21
|
+
* which this observation drew evidence.
|
|
22
|
+
*/
|
|
23
|
+
latestEvidenceAt?: string;
|
|
13
24
|
/** Name of the node */
|
|
14
25
|
name: string;
|
|
15
26
|
/**
|
|
@@ -21,6 +32,11 @@ export interface DerivedNode {
|
|
|
21
32
|
score?: number;
|
|
22
33
|
/** SelectionRank is the global cross-scope rank assigned by auto scope selection. */
|
|
23
34
|
selectionRank?: number;
|
|
35
|
+
/**
|
|
36
|
+
* StartAt is the earliest source-episode timestamp from which this
|
|
37
|
+
* observation was derived. Only populated for observation nodes.
|
|
38
|
+
*/
|
|
39
|
+
startAt?: string;
|
|
24
40
|
/** Region summary of member nodes */
|
|
25
41
|
summary?: string;
|
|
26
42
|
/** UUID of the node */
|
|
@@ -6,8 +6,17 @@ export interface GraphitiSagaNode {
|
|
|
6
6
|
createdAt: string;
|
|
7
7
|
/** Labels associated with the node */
|
|
8
8
|
labels?: string[];
|
|
9
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* Wall-clock timestamp of the most recent summary update. Used internally
|
|
11
|
+
* as the watermark for filtering new episodes by ingestion time.
|
|
12
|
+
*/
|
|
10
13
|
lastSummarizedAt?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Maximum episode reference time (valid_at) covered by the most recent
|
|
16
|
+
* summary. Use this field — not LastSummarizedAt — when answering "how
|
|
17
|
+
* recent is this summary's content in event-time?".
|
|
18
|
+
*/
|
|
19
|
+
lastSummarizedEpisodeValidAt?: string;
|
|
11
20
|
/** Name of the node */
|
|
12
21
|
name: string;
|
|
13
22
|
/**
|
|
@@ -4,8 +4,19 @@
|
|
|
4
4
|
export interface ThreadSummary {
|
|
5
5
|
/** CreatedAt is when the summary node was first created. */
|
|
6
6
|
createdAt?: string;
|
|
7
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* LastSummarizedAt is the wall-clock timestamp of the most recent
|
|
9
|
+
* summary update. This is an ingestion-time watermark; for the
|
|
10
|
+
* event-time recency of the summary's content, use
|
|
11
|
+
* LastSummarizedEpisodeValidAt instead.
|
|
12
|
+
*/
|
|
8
13
|
lastSummarizedAt?: string;
|
|
14
|
+
/**
|
|
15
|
+
* LastSummarizedEpisodeValidAt is the maximum episode reference time
|
|
16
|
+
* (valid_at) covered by the most recent summary. Use this when
|
|
17
|
+
* answering "how recent is this summary's content in event-time?".
|
|
18
|
+
*/
|
|
19
|
+
lastSummarizedEpisodeValidAt?: string;
|
|
9
20
|
/** Summary is the incremental summary content. */
|
|
10
21
|
summary?: string;
|
|
11
22
|
/**
|
|
@@ -31,6 +31,7 @@ export * from "./EpisodeResponse.mjs";
|
|
|
31
31
|
export * from "./GraphListResponse.mjs";
|
|
32
32
|
export * from "./GraphNodesRequest.mjs";
|
|
33
33
|
export * from "./GraphObservationsRequest.mjs";
|
|
34
|
+
export * from "./GraphSearchResponseMetadata.mjs";
|
|
34
35
|
export * from "./GraphSearchResults.mjs";
|
|
35
36
|
export * from "./GraphThreadSummariesRequest.mjs";
|
|
36
37
|
export * from "./HubDetectConfig.mjs";
|
|
@@ -31,6 +31,7 @@ export * from "./EpisodeResponse.mjs";
|
|
|
31
31
|
export * from "./GraphListResponse.mjs";
|
|
32
32
|
export * from "./GraphNodesRequest.mjs";
|
|
33
33
|
export * from "./GraphObservationsRequest.mjs";
|
|
34
|
+
export * from "./GraphSearchResponseMetadata.mjs";
|
|
34
35
|
export * from "./GraphSearchResults.mjs";
|
|
35
36
|
export * from "./GraphThreadSummariesRequest.mjs";
|
|
36
37
|
export * from "./HubDetectConfig.mjs";
|
package/dist/esm/serialization/resources/batch/client/requests/ApidataCreateBatchRequest.d.mts
CHANGED
|
@@ -4,9 +4,11 @@
|
|
|
4
4
|
import * as serializers from "../../../../index.mjs";
|
|
5
5
|
import * as Zep from "../../../../../api/index.mjs";
|
|
6
6
|
import * as core from "../../../../../core/index.mjs";
|
|
7
|
+
import { RoleType } from "../../../../types/RoleType.mjs";
|
|
7
8
|
export declare const ApidataCreateBatchRequest: core.serialization.Schema<serializers.ApidataCreateBatchRequest.Raw, Zep.ApidataCreateBatchRequest>;
|
|
8
9
|
export declare namespace ApidataCreateBatchRequest {
|
|
9
10
|
interface Raw {
|
|
11
|
+
ignore_roles?: RoleType.Raw[] | null;
|
|
10
12
|
metadata?: Record<string, unknown> | null;
|
|
11
13
|
}
|
|
12
14
|
}
|
package/dist/esm/serialization/resources/batch/client/requests/ApidataCreateBatchRequest.mjs
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as core from "../../../../../core/index.mjs";
|
|
5
|
+
import { RoleType } from "../../../../types/RoleType.mjs";
|
|
5
6
|
export const ApidataCreateBatchRequest = core.serialization.object({
|
|
7
|
+
ignoreRoles: core.serialization.property("ignore_roles", core.serialization.list(RoleType).optional()),
|
|
6
8
|
metadata: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(),
|
|
7
9
|
});
|
|
@@ -6,5 +6,5 @@ import * as Zep from "../../api/index.mjs";
|
|
|
6
6
|
import * as core from "../../core/index.mjs";
|
|
7
7
|
export declare const BatchItemStatus: core.serialization.Schema<serializers.BatchItemStatus.Raw, Zep.BatchItemStatus>;
|
|
8
8
|
export declare namespace BatchItemStatus {
|
|
9
|
-
type Raw = "pending" | "queued" | "processing" | "succeeded" | "failed" | "skipped";
|
|
9
|
+
type Raw = "pending" | "queued" | "processing" | "succeeded" | "failed" | "skipped" | "canceled";
|
|
10
10
|
}
|