@getzep/zep-cloud 2.3.1 → 2.5.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/api/resources/document/client/Client.d.ts +4 -4
- package/api/resources/document/client/Client.js +17 -17
- package/api/resources/graph/client/Client.d.ts +18 -1
- package/api/resources/graph/client/Client.js +82 -3
- package/api/resources/graph/client/requests/AddTripleRequest.d.ts +41 -0
- package/api/resources/graph/client/requests/AddTripleRequest.js +5 -0
- package/api/resources/graph/client/requests/GraphSearchQuery.d.ts +3 -1
- package/api/resources/graph/client/requests/index.d.ts +1 -0
- package/api/resources/graph/resources/edge/client/Client.d.ts +4 -4
- package/api/resources/graph/resources/edge/client/Client.js +8 -8
- package/api/resources/graph/resources/episode/client/Client.d.ts +17 -3
- package/api/resources/graph/resources/episode/client/Client.js +89 -6
- package/api/resources/graph/resources/node/client/Client.d.ts +3 -3
- package/api/resources/graph/resources/node/client/Client.js +6 -6
- package/api/resources/group/client/Client.d.ts +24 -9
- package/api/resources/group/client/Client.js +99 -14
- package/api/resources/group/client/requests/CreateGroupRequest.d.ts +0 -1
- package/api/resources/group/client/requests/GetGroupsOrderedRequest.d.ts +2 -2
- package/api/resources/group/client/requests/UpdateGroupRequest.d.ts +13 -0
- package/api/resources/group/client/requests/UpdateGroupRequest.js +5 -0
- package/api/resources/group/client/requests/index.d.ts +1 -0
- package/api/resources/memory/client/Client.d.ts +20 -22
- package/api/resources/memory/client/Client.js +42 -44
- package/api/resources/memory/client/requests/AddMemoryRequest.d.ts +2 -2
- package/api/resources/memory/client/requests/CreateSessionRequest.d.ts +2 -2
- package/api/resources/memory/client/requests/MemoryGetRequest.d.ts +1 -1
- package/api/resources/memory/client/requests/MemoryGetSessionFactsRequest.d.ts +1 -1
- package/api/resources/memory/client/requests/MemoryListSessionsRequest.d.ts +3 -3
- package/api/resources/memory/client/requests/ModelsMessageMetadataUpdate.d.ts +1 -1
- package/api/resources/memory/client/requests/SessionSearchQuery.d.ts +7 -7
- package/api/resources/memory/client/requests/UpdateSessionRequest.d.ts +1 -1
- package/api/resources/user/client/Client.d.ts +20 -7
- package/api/resources/user/client/Client.js +88 -14
- package/api/types/AddTripleResponse.d.ts +9 -0
- package/api/types/AddTripleResponse.js +5 -0
- package/api/types/ClassifySessionRequest.d.ts +2 -2
- package/api/types/EntityNode.d.ts +2 -0
- package/api/types/Fact.d.ts +1 -1
- package/api/types/Group.d.ts +1 -1
- package/api/types/Memory.d.ts +3 -9
- package/api/types/Message.d.ts +3 -3
- package/api/types/SearchFilters.d.ts +7 -0
- package/api/types/SearchFilters.js +5 -0
- package/api/types/Session.d.ts +4 -2
- package/api/types/User.d.ts +3 -0
- package/api/types/UserNodeResponse.d.ts +7 -0
- package/api/types/UserNodeResponse.js +5 -0
- package/api/types/index.d.ts +3 -0
- package/api/types/index.js +3 -0
- package/dist/api/resources/document/client/Client.d.ts +4 -4
- package/dist/api/resources/document/client/Client.js +17 -17
- package/dist/api/resources/graph/client/Client.d.ts +18 -1
- package/dist/api/resources/graph/client/Client.js +82 -3
- package/dist/api/resources/graph/client/requests/AddTripleRequest.d.ts +41 -0
- package/dist/api/resources/graph/client/requests/AddTripleRequest.js +5 -0
- package/dist/api/resources/graph/client/requests/GraphSearchQuery.d.ts +3 -1
- package/dist/api/resources/graph/client/requests/index.d.ts +1 -0
- package/dist/api/resources/graph/resources/edge/client/Client.d.ts +4 -4
- package/dist/api/resources/graph/resources/edge/client/Client.js +8 -8
- package/dist/api/resources/graph/resources/episode/client/Client.d.ts +17 -3
- package/dist/api/resources/graph/resources/episode/client/Client.js +89 -6
- package/dist/api/resources/graph/resources/node/client/Client.d.ts +3 -3
- package/dist/api/resources/graph/resources/node/client/Client.js +6 -6
- package/dist/api/resources/group/client/Client.d.ts +24 -9
- package/dist/api/resources/group/client/Client.js +99 -14
- package/dist/api/resources/group/client/requests/CreateGroupRequest.d.ts +0 -1
- package/dist/api/resources/group/client/requests/GetGroupsOrderedRequest.d.ts +2 -2
- package/dist/api/resources/group/client/requests/UpdateGroupRequest.d.ts +13 -0
- package/dist/api/resources/group/client/requests/UpdateGroupRequest.js +5 -0
- package/dist/api/resources/group/client/requests/index.d.ts +1 -0
- package/dist/api/resources/memory/client/Client.d.ts +20 -22
- package/dist/api/resources/memory/client/Client.js +42 -44
- package/dist/api/resources/memory/client/requests/AddMemoryRequest.d.ts +2 -2
- package/dist/api/resources/memory/client/requests/CreateSessionRequest.d.ts +2 -2
- package/dist/api/resources/memory/client/requests/MemoryGetRequest.d.ts +1 -1
- package/dist/api/resources/memory/client/requests/MemoryGetSessionFactsRequest.d.ts +1 -1
- package/dist/api/resources/memory/client/requests/MemoryListSessionsRequest.d.ts +3 -3
- package/dist/api/resources/memory/client/requests/ModelsMessageMetadataUpdate.d.ts +1 -1
- package/dist/api/resources/memory/client/requests/SessionSearchQuery.d.ts +7 -7
- package/dist/api/resources/memory/client/requests/UpdateSessionRequest.d.ts +1 -1
- package/dist/api/resources/user/client/Client.d.ts +20 -7
- package/dist/api/resources/user/client/Client.js +88 -14
- package/dist/api/types/AddTripleResponse.d.ts +9 -0
- package/dist/api/types/AddTripleResponse.js +5 -0
- package/dist/api/types/ClassifySessionRequest.d.ts +2 -2
- package/dist/api/types/EntityNode.d.ts +2 -0
- package/dist/api/types/Fact.d.ts +1 -1
- package/dist/api/types/Group.d.ts +1 -1
- package/dist/api/types/Memory.d.ts +3 -9
- package/dist/api/types/Message.d.ts +3 -3
- package/dist/api/types/SearchFilters.d.ts +7 -0
- package/dist/api/types/SearchFilters.js +5 -0
- package/dist/api/types/Session.d.ts +4 -2
- package/dist/api/types/User.d.ts +3 -0
- package/dist/api/types/UserNodeResponse.d.ts +7 -0
- package/dist/api/types/UserNodeResponse.js +5 -0
- package/dist/api/types/index.d.ts +3 -0
- package/dist/api/types/index.js +3 -0
- package/dist/serialization/resources/graph/client/requests/AddTripleRequest.d.ts +26 -0
- package/dist/serialization/resources/graph/client/requests/AddTripleRequest.js +57 -0
- package/dist/serialization/resources/graph/client/requests/GraphSearchQuery.d.ts +2 -0
- package/dist/serialization/resources/graph/client/requests/GraphSearchQuery.js +2 -0
- package/dist/serialization/resources/graph/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/graph/client/requests/index.js +3 -1
- package/dist/serialization/resources/group/client/requests/UpdateGroupRequest.d.ts +15 -0
- package/dist/serialization/resources/group/client/requests/UpdateGroupRequest.js +46 -0
- package/dist/serialization/resources/group/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/group/client/requests/index.js +3 -1
- package/dist/serialization/types/AddTripleResponse.d.ts +16 -0
- package/dist/serialization/types/AddTripleResponse.js +47 -0
- package/dist/serialization/types/EntityNode.d.ts +1 -0
- package/dist/serialization/types/EntityNode.js +1 -0
- package/dist/serialization/types/SearchFilters.d.ts +12 -0
- package/dist/serialization/types/SearchFilters.js +43 -0
- package/dist/serialization/types/UserNodeResponse.d.ts +13 -0
- package/dist/serialization/types/UserNodeResponse.js +44 -0
- package/dist/serialization/types/index.d.ts +3 -0
- package/dist/serialization/types/index.js +3 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/examples/graph/user_graph_example.ts +13 -0
- package/package.json +1 -1
- package/reference.md +315 -66
- package/serialization/resources/graph/client/requests/AddTripleRequest.d.ts +26 -0
- package/serialization/resources/graph/client/requests/AddTripleRequest.js +57 -0
- package/serialization/resources/graph/client/requests/GraphSearchQuery.d.ts +2 -0
- package/serialization/resources/graph/client/requests/GraphSearchQuery.js +2 -0
- package/serialization/resources/graph/client/requests/index.d.ts +1 -0
- package/serialization/resources/graph/client/requests/index.js +3 -1
- package/serialization/resources/group/client/requests/UpdateGroupRequest.d.ts +15 -0
- package/serialization/resources/group/client/requests/UpdateGroupRequest.js +46 -0
- package/serialization/resources/group/client/requests/index.d.ts +1 -0
- package/serialization/resources/group/client/requests/index.js +3 -1
- package/serialization/types/AddTripleResponse.d.ts +16 -0
- package/serialization/types/AddTripleResponse.js +47 -0
- package/serialization/types/EntityNode.d.ts +1 -0
- package/serialization/types/EntityNode.js +1 -0
- package/serialization/types/SearchFilters.d.ts +12 -0
- package/serialization/types/SearchFilters.js +43 -0
- package/serialization/types/UserNodeResponse.d.ts +13 -0
- package/serialization/types/UserNodeResponse.js +44 -0
- package/serialization/types/index.d.ts +3 -0
- package/serialization/types/index.js +3 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -13,22 +13,22 @@ export interface SessionSearchQuery {
|
|
|
13
13
|
* The maximum number of search results to return. Defaults to None (no limit).
|
|
14
14
|
*/
|
|
15
15
|
limit?: number;
|
|
16
|
-
/** The minimum fact rating to filter on.
|
|
16
|
+
/** The minimum fact rating to filter on. */
|
|
17
17
|
minFactRating?: number;
|
|
18
|
-
/** The minimum score for search results.
|
|
18
|
+
/** The minimum score for search results. */
|
|
19
19
|
minScore?: number;
|
|
20
|
-
/** The lambda parameter for the MMR Reranking Algorithm.
|
|
20
|
+
/** The lambda parameter for the MMR Reranking Algorithm. */
|
|
21
21
|
mmrLambda?: number;
|
|
22
|
-
/** Record filter on the metadata.
|
|
22
|
+
/** Record filter on the metadata. */
|
|
23
23
|
recordFilter?: Record<string, unknown>;
|
|
24
|
-
/** Search scope.
|
|
24
|
+
/** Search scope. */
|
|
25
25
|
searchScope?: Zep.SearchScope;
|
|
26
|
-
/** Search type.
|
|
26
|
+
/** Search type. */
|
|
27
27
|
searchType?: Zep.SearchType;
|
|
28
28
|
/** the session ids to search */
|
|
29
29
|
sessionIds?: string[];
|
|
30
30
|
/** The search text. */
|
|
31
31
|
text: string;
|
|
32
|
-
/** User ID used to determine which sessions to search.
|
|
32
|
+
/** User ID used to determine which sessions to search. */
|
|
33
33
|
userId?: string;
|
|
34
34
|
}
|
|
@@ -25,7 +25,7 @@ export declare class User {
|
|
|
25
25
|
protected readonly _options: User.Options;
|
|
26
26
|
constructor(_options?: User.Options);
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* Adds a user.
|
|
29
29
|
*
|
|
30
30
|
* @param {Zep.CreateUserRequest} request
|
|
31
31
|
* @param {User.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -38,7 +38,7 @@ export declare class User {
|
|
|
38
38
|
*/
|
|
39
39
|
add(request?: Zep.CreateUserRequest, requestOptions?: User.RequestOptions): Promise<Zep.User>;
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
41
|
+
* Returns all users.
|
|
42
42
|
*
|
|
43
43
|
* @param {Zep.UserListOrderedRequest} request
|
|
44
44
|
* @param {User.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -51,7 +51,7 @@ export declare class User {
|
|
|
51
51
|
*/
|
|
52
52
|
listOrdered(request?: Zep.UserListOrderedRequest, requestOptions?: User.RequestOptions): Promise<Zep.UserListResponse>;
|
|
53
53
|
/**
|
|
54
|
-
*
|
|
54
|
+
* Returns a user.
|
|
55
55
|
*
|
|
56
56
|
* @param {string} userId - The user_id of the user to get.
|
|
57
57
|
* @param {User.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -64,7 +64,7 @@ export declare class User {
|
|
|
64
64
|
*/
|
|
65
65
|
get(userId: string, requestOptions?: User.RequestOptions): Promise<Zep.User>;
|
|
66
66
|
/**
|
|
67
|
-
*
|
|
67
|
+
* Deletes a user.
|
|
68
68
|
*
|
|
69
69
|
* @param {string} userId - User ID
|
|
70
70
|
* @param {User.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -77,7 +77,7 @@ export declare class User {
|
|
|
77
77
|
*/
|
|
78
78
|
delete(userId: string, requestOptions?: User.RequestOptions): Promise<Zep.SuccessResponse>;
|
|
79
79
|
/**
|
|
80
|
-
*
|
|
80
|
+
* Updates a user.
|
|
81
81
|
*
|
|
82
82
|
* @param {string} userId - User ID
|
|
83
83
|
* @param {Zep.UpdateUserRequest} request
|
|
@@ -92,7 +92,7 @@ export declare class User {
|
|
|
92
92
|
*/
|
|
93
93
|
update(userId: string, request?: Zep.UpdateUserRequest, requestOptions?: User.RequestOptions): Promise<Zep.User>;
|
|
94
94
|
/**
|
|
95
|
-
* Get
|
|
95
|
+
* Deprecated: Use Get User Edges instead.
|
|
96
96
|
*
|
|
97
97
|
* @param {string} userId - The user_id of the user to get.
|
|
98
98
|
* @param {User.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -105,7 +105,20 @@ export declare class User {
|
|
|
105
105
|
*/
|
|
106
106
|
getFacts(userId: string, requestOptions?: User.RequestOptions): Promise<Zep.FactsResponse>;
|
|
107
107
|
/**
|
|
108
|
-
*
|
|
108
|
+
* Returns a user's node.
|
|
109
|
+
*
|
|
110
|
+
* @param {string} userId - The user_id of the user to get the node for.
|
|
111
|
+
* @param {User.RequestOptions} requestOptions - Request-specific configuration.
|
|
112
|
+
*
|
|
113
|
+
* @throws {@link Zep.NotFoundError}
|
|
114
|
+
* @throws {@link Zep.InternalServerError}
|
|
115
|
+
*
|
|
116
|
+
* @example
|
|
117
|
+
* await client.user.getNode("userId")
|
|
118
|
+
*/
|
|
119
|
+
getNode(userId: string, requestOptions?: User.RequestOptions): Promise<Zep.UserNodeResponse>;
|
|
120
|
+
/**
|
|
121
|
+
* Returns all sessions for a user.
|
|
109
122
|
*
|
|
110
123
|
* @param {string} userId - User ID
|
|
111
124
|
* @param {User.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -60,7 +60,7 @@ class User {
|
|
|
60
60
|
this._options = _options;
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
|
-
*
|
|
63
|
+
* Adds a user.
|
|
64
64
|
*
|
|
65
65
|
* @param {Zep.CreateUserRequest} request
|
|
66
66
|
* @param {User.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -77,7 +77,7 @@ class User {
|
|
|
77
77
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
78
78
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, "users"),
|
|
79
79
|
method: "POST",
|
|
80
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
80
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.5.0", "User-Agent": "zep-cloud/2.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
81
81
|
contentType: "application/json",
|
|
82
82
|
requestType: "json",
|
|
83
83
|
body: serializers.CreateUserRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -135,7 +135,7 @@ class User {
|
|
|
135
135
|
});
|
|
136
136
|
}
|
|
137
137
|
/**
|
|
138
|
-
*
|
|
138
|
+
* Returns all users.
|
|
139
139
|
*
|
|
140
140
|
* @param {Zep.UserListOrderedRequest} request
|
|
141
141
|
* @param {User.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -160,7 +160,7 @@ class User {
|
|
|
160
160
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
161
161
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, "users-ordered"),
|
|
162
162
|
method: "GET",
|
|
163
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
163
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.5.0", "User-Agent": "zep-cloud/2.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
164
164
|
contentType: "application/json",
|
|
165
165
|
queryParameters: _queryParams,
|
|
166
166
|
requestType: "json",
|
|
@@ -218,7 +218,7 @@ class User {
|
|
|
218
218
|
});
|
|
219
219
|
}
|
|
220
220
|
/**
|
|
221
|
-
*
|
|
221
|
+
* Returns a user.
|
|
222
222
|
*
|
|
223
223
|
* @param {string} userId - The user_id of the user to get.
|
|
224
224
|
* @param {User.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -235,7 +235,7 @@ class User {
|
|
|
235
235
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
236
236
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `users/${encodeURIComponent(userId)}`),
|
|
237
237
|
method: "GET",
|
|
238
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
238
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.5.0", "User-Agent": "zep-cloud/2.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
239
239
|
contentType: "application/json",
|
|
240
240
|
requestType: "json",
|
|
241
241
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -292,7 +292,7 @@ class User {
|
|
|
292
292
|
});
|
|
293
293
|
}
|
|
294
294
|
/**
|
|
295
|
-
*
|
|
295
|
+
* Deletes a user.
|
|
296
296
|
*
|
|
297
297
|
* @param {string} userId - User ID
|
|
298
298
|
* @param {User.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -309,7 +309,7 @@ class User {
|
|
|
309
309
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
310
310
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `users/${encodeURIComponent(userId)}`),
|
|
311
311
|
method: "DELETE",
|
|
312
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
312
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.5.0", "User-Agent": "zep-cloud/2.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
313
313
|
contentType: "application/json",
|
|
314
314
|
requestType: "json",
|
|
315
315
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -366,7 +366,7 @@ class User {
|
|
|
366
366
|
});
|
|
367
367
|
}
|
|
368
368
|
/**
|
|
369
|
-
*
|
|
369
|
+
* Updates a user.
|
|
370
370
|
*
|
|
371
371
|
* @param {string} userId - User ID
|
|
372
372
|
* @param {Zep.UpdateUserRequest} request
|
|
@@ -385,7 +385,7 @@ class User {
|
|
|
385
385
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
386
386
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `users/${encodeURIComponent(userId)}`),
|
|
387
387
|
method: "PATCH",
|
|
388
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
388
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.5.0", "User-Agent": "zep-cloud/2.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
389
389
|
contentType: "application/json",
|
|
390
390
|
requestType: "json",
|
|
391
391
|
body: serializers.UpdateUserRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -451,7 +451,7 @@ class User {
|
|
|
451
451
|
});
|
|
452
452
|
}
|
|
453
453
|
/**
|
|
454
|
-
* Get
|
|
454
|
+
* Deprecated: Use Get User Edges instead.
|
|
455
455
|
*
|
|
456
456
|
* @param {string} userId - The user_id of the user to get.
|
|
457
457
|
* @param {User.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -468,7 +468,7 @@ class User {
|
|
|
468
468
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
469
469
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `users/${encodeURIComponent(userId)}/facts`),
|
|
470
470
|
method: "GET",
|
|
471
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
471
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.5.0", "User-Agent": "zep-cloud/2.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
472
472
|
contentType: "application/json",
|
|
473
473
|
requestType: "json",
|
|
474
474
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -525,7 +525,81 @@ class User {
|
|
|
525
525
|
});
|
|
526
526
|
}
|
|
527
527
|
/**
|
|
528
|
-
*
|
|
528
|
+
* Returns a user's node.
|
|
529
|
+
*
|
|
530
|
+
* @param {string} userId - The user_id of the user to get the node for.
|
|
531
|
+
* @param {User.RequestOptions} requestOptions - Request-specific configuration.
|
|
532
|
+
*
|
|
533
|
+
* @throws {@link Zep.NotFoundError}
|
|
534
|
+
* @throws {@link Zep.InternalServerError}
|
|
535
|
+
*
|
|
536
|
+
* @example
|
|
537
|
+
* await client.user.getNode("userId")
|
|
538
|
+
*/
|
|
539
|
+
getNode(userId, requestOptions) {
|
|
540
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
541
|
+
var _a, _b;
|
|
542
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
543
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `users/${encodeURIComponent(userId)}/node`),
|
|
544
|
+
method: "GET",
|
|
545
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.5.0", "User-Agent": "zep-cloud/2.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
546
|
+
contentType: "application/json",
|
|
547
|
+
requestType: "json",
|
|
548
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
549
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
550
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
551
|
+
});
|
|
552
|
+
if (_response.ok) {
|
|
553
|
+
return serializers.UserNodeResponse.parseOrThrow(_response.body, {
|
|
554
|
+
unrecognizedObjectKeys: "passthrough",
|
|
555
|
+
allowUnrecognizedUnionMembers: true,
|
|
556
|
+
allowUnrecognizedEnumValues: true,
|
|
557
|
+
skipValidation: true,
|
|
558
|
+
breadcrumbsPrefix: ["response"],
|
|
559
|
+
});
|
|
560
|
+
}
|
|
561
|
+
if (_response.error.reason === "status-code") {
|
|
562
|
+
switch (_response.error.statusCode) {
|
|
563
|
+
case 404:
|
|
564
|
+
throw new Zep.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
565
|
+
unrecognizedObjectKeys: "passthrough",
|
|
566
|
+
allowUnrecognizedUnionMembers: true,
|
|
567
|
+
allowUnrecognizedEnumValues: true,
|
|
568
|
+
skipValidation: true,
|
|
569
|
+
breadcrumbsPrefix: ["response"],
|
|
570
|
+
}));
|
|
571
|
+
case 500:
|
|
572
|
+
throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
573
|
+
unrecognizedObjectKeys: "passthrough",
|
|
574
|
+
allowUnrecognizedUnionMembers: true,
|
|
575
|
+
allowUnrecognizedEnumValues: true,
|
|
576
|
+
skipValidation: true,
|
|
577
|
+
breadcrumbsPrefix: ["response"],
|
|
578
|
+
}));
|
|
579
|
+
default:
|
|
580
|
+
throw new errors.ZepError({
|
|
581
|
+
statusCode: _response.error.statusCode,
|
|
582
|
+
body: _response.error.body,
|
|
583
|
+
});
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
switch (_response.error.reason) {
|
|
587
|
+
case "non-json":
|
|
588
|
+
throw new errors.ZepError({
|
|
589
|
+
statusCode: _response.error.statusCode,
|
|
590
|
+
body: _response.error.rawBody,
|
|
591
|
+
});
|
|
592
|
+
case "timeout":
|
|
593
|
+
throw new errors.ZepTimeoutError("Timeout exceeded when calling GET /users/{userId}/node.");
|
|
594
|
+
case "unknown":
|
|
595
|
+
throw new errors.ZepError({
|
|
596
|
+
message: _response.error.errorMessage,
|
|
597
|
+
});
|
|
598
|
+
}
|
|
599
|
+
});
|
|
600
|
+
}
|
|
601
|
+
/**
|
|
602
|
+
* Returns all sessions for a user.
|
|
529
603
|
*
|
|
530
604
|
* @param {string} userId - User ID
|
|
531
605
|
* @param {User.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -541,7 +615,7 @@ class User {
|
|
|
541
615
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
542
616
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `users/${encodeURIComponent(userId)}/sessions`),
|
|
543
617
|
method: "GET",
|
|
544
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
618
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.5.0", "User-Agent": "zep-cloud/2.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
545
619
|
contentType: "application/json",
|
|
546
620
|
requestType: "json",
|
|
547
621
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -8,8 +8,8 @@ export interface ClassifySessionRequest {
|
|
|
8
8
|
instruction?: string;
|
|
9
9
|
/** The number of session messages to consider for classification. Defaults to 4. */
|
|
10
10
|
lastN?: number;
|
|
11
|
-
/** The name of the classifier.
|
|
11
|
+
/** The name of the classifier. */
|
|
12
12
|
name: string;
|
|
13
|
-
/**
|
|
13
|
+
/** Deprecated */
|
|
14
14
|
persist?: boolean;
|
|
15
15
|
}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
export interface EntityNode {
|
|
5
|
+
/** Additional attributes of the node. Dependent on node labels */
|
|
6
|
+
attributes?: Record<string, unknown>;
|
|
5
7
|
/** Creation time of the node */
|
|
6
8
|
createdAt: string;
|
|
7
9
|
/** Labels associated with the node */
|
package/api/types/Fact.d.ts
CHANGED
package/api/types/Group.d.ts
CHANGED
|
@@ -5,10 +5,10 @@ import * as Zep from "../index";
|
|
|
5
5
|
export interface Group {
|
|
6
6
|
createdAt?: string;
|
|
7
7
|
description?: string;
|
|
8
|
+
/** Deprecated */
|
|
8
9
|
externalId?: string;
|
|
9
10
|
factRatingInstruction?: Zep.FactRatingInstruction;
|
|
10
11
|
groupId?: string;
|
|
11
|
-
/** TODO deprecate */
|
|
12
12
|
id?: number;
|
|
13
13
|
name?: string;
|
|
14
14
|
projectUuid?: string;
|
package/api/types/Memory.d.ts
CHANGED
|
@@ -5,20 +5,14 @@ import * as Zep from "../index";
|
|
|
5
5
|
export interface Memory {
|
|
6
6
|
/** Memory context containing relevant facts and entities for the session. Can be put into the prompt directly. */
|
|
7
7
|
context?: string;
|
|
8
|
-
/**
|
|
9
|
-
* Most recent list of facts derived from the session. (cloud only)
|
|
10
|
-
* Deprecated: Facts will be deprecated in future releases and relevant_facts should be used instead.
|
|
11
|
-
*/
|
|
8
|
+
/** Deprecated: Use relevant_facts instead. */
|
|
12
9
|
facts?: string[];
|
|
13
10
|
/** A list of message objects, where each message contains a role and content. Only last_n messages will be returned */
|
|
14
11
|
messages?: Zep.Message[];
|
|
15
|
-
/**
|
|
12
|
+
/** Deprecated */
|
|
16
13
|
metadata?: Record<string, unknown>;
|
|
17
14
|
/** Most relevant facts to the recent messages in the session. */
|
|
18
15
|
relevantFacts?: Zep.Fact[];
|
|
19
|
-
/**
|
|
20
|
-
* The most relevant summaries to the recent conversation. (cloud only)
|
|
21
|
-
* Deprecated: Please use context string instead.
|
|
22
|
-
*/
|
|
16
|
+
/** Deprecated: Use context string instead. */
|
|
23
17
|
summary?: Zep.Summary;
|
|
24
18
|
}
|
package/api/types/Message.d.ts
CHANGED
|
@@ -9,13 +9,13 @@ export interface Message {
|
|
|
9
9
|
createdAt?: string;
|
|
10
10
|
/** The metadata associated with the message. */
|
|
11
11
|
metadata?: Record<string, unknown>;
|
|
12
|
-
/**
|
|
12
|
+
/** Customizable role of the sender of the message (e.g., "john", "sales_agent"). */
|
|
13
13
|
role?: string;
|
|
14
14
|
/** The type of the role (e.g., "user", "system"). */
|
|
15
15
|
roleType: Zep.RoleType;
|
|
16
|
-
/**
|
|
16
|
+
/** Deprecated */
|
|
17
17
|
tokenCount?: number;
|
|
18
|
-
/**
|
|
18
|
+
/** Deprecated */
|
|
19
19
|
updatedAt?: string;
|
|
20
20
|
/** The unique identifier of the message. */
|
|
21
21
|
uuid?: string;
|
package/api/types/Session.d.ts
CHANGED
|
@@ -7,15 +7,17 @@ export interface Session {
|
|
|
7
7
|
createdAt?: string;
|
|
8
8
|
deletedAt?: string;
|
|
9
9
|
endedAt?: string;
|
|
10
|
+
/** Deprecated */
|
|
10
11
|
factRatingInstruction?: Zep.FactRatingInstruction;
|
|
12
|
+
/** Deprecated */
|
|
11
13
|
facts?: string[];
|
|
12
|
-
/** TODO deprecate */
|
|
13
14
|
id?: number;
|
|
15
|
+
/** Deprecated */
|
|
14
16
|
metadata?: Record<string, unknown>;
|
|
15
17
|
projectUuid?: string;
|
|
16
18
|
sessionId?: string;
|
|
19
|
+
/** Deprecated */
|
|
17
20
|
updatedAt?: string;
|
|
18
|
-
/** Must be a pointer to allow for null values */
|
|
19
21
|
userId?: string;
|
|
20
22
|
uuid?: string;
|
|
21
23
|
}
|
package/api/types/User.d.ts
CHANGED
|
@@ -10,9 +10,12 @@ export interface User {
|
|
|
10
10
|
firstName?: string;
|
|
11
11
|
id?: number;
|
|
12
12
|
lastName?: string;
|
|
13
|
+
/** Deprecated */
|
|
13
14
|
metadata?: Record<string, unknown>;
|
|
14
15
|
projectUuid?: string;
|
|
16
|
+
/** Deprecated */
|
|
15
17
|
sessionCount?: number;
|
|
18
|
+
/** Deprecated */
|
|
16
19
|
updatedAt?: string;
|
|
17
20
|
userId?: string;
|
|
18
21
|
uuid?: string;
|
package/api/types/index.d.ts
CHANGED
|
@@ -31,11 +31,14 @@ export * from "./Summary";
|
|
|
31
31
|
export * from "./SummaryListResponse";
|
|
32
32
|
export * from "./User";
|
|
33
33
|
export * from "./UserListResponse";
|
|
34
|
+
export * from "./UserNodeResponse";
|
|
35
|
+
export * from "./AddTripleResponse";
|
|
34
36
|
export * from "./EntityEdge";
|
|
35
37
|
export * from "./EntityNode";
|
|
36
38
|
export * from "./GraphSearchResults";
|
|
37
39
|
export * from "./GraphSearchScope";
|
|
38
40
|
export * from "./Reranker";
|
|
41
|
+
export * from "./SearchFilters";
|
|
39
42
|
export * from "./ClassifySessionRequest";
|
|
40
43
|
export * from "./CreateDocumentRequest";
|
|
41
44
|
export * from "./FactRatingExamples";
|
package/api/types/index.js
CHANGED
|
@@ -47,11 +47,14 @@ __exportStar(require("./Summary"), exports);
|
|
|
47
47
|
__exportStar(require("./SummaryListResponse"), exports);
|
|
48
48
|
__exportStar(require("./User"), exports);
|
|
49
49
|
__exportStar(require("./UserListResponse"), exports);
|
|
50
|
+
__exportStar(require("./UserNodeResponse"), exports);
|
|
51
|
+
__exportStar(require("./AddTripleResponse"), exports);
|
|
50
52
|
__exportStar(require("./EntityEdge"), exports);
|
|
51
53
|
__exportStar(require("./EntityNode"), exports);
|
|
52
54
|
__exportStar(require("./GraphSearchResults"), exports);
|
|
53
55
|
__exportStar(require("./GraphSearchScope"), exports);
|
|
54
56
|
__exportStar(require("./Reranker"), exports);
|
|
57
|
+
__exportStar(require("./SearchFilters"), exports);
|
|
55
58
|
__exportStar(require("./ClassifySessionRequest"), exports);
|
|
56
59
|
__exportStar(require("./CreateDocumentRequest"), exports);
|
|
57
60
|
__exportStar(require("./FactRatingExamples"), exports);
|
|
@@ -174,9 +174,9 @@ export declare class Document {
|
|
|
174
174
|
* @throws {@link Zep.InternalServerError}
|
|
175
175
|
*
|
|
176
176
|
* @example
|
|
177
|
-
* await client.document.
|
|
177
|
+
* await client.document.getsADocumentFromADocumentCollectionByUuid("collectionName", "documentUUID")
|
|
178
178
|
*/
|
|
179
|
-
|
|
179
|
+
getsADocumentFromADocumentCollectionByUuid(collectionName: string, documentUuid: string, requestOptions?: Document.RequestOptions): Promise<Zep.ApidataDocument>;
|
|
180
180
|
/**
|
|
181
181
|
* Delete specified Document from a DocumentCollection.
|
|
182
182
|
*
|
|
@@ -207,9 +207,9 @@ export declare class Document {
|
|
|
207
207
|
* @throws {@link Zep.InternalServerError}
|
|
208
208
|
*
|
|
209
209
|
* @example
|
|
210
|
-
* await client.document.
|
|
210
|
+
* await client.document.updatesADocument("collectionName", "documentUUID")
|
|
211
211
|
*/
|
|
212
|
-
|
|
212
|
+
updatesADocument(collectionName: string, documentUuid: string, request?: Zep.UpdateDocumentRequest, requestOptions?: Document.RequestOptions): Promise<Zep.SuccessResponse>;
|
|
213
213
|
/**
|
|
214
214
|
* Searches over documents in a collection based on provided search criteria. One of text or metadata must be provided. Returns an empty list if no documents are found.
|
|
215
215
|
*
|