@getzep/zep-cloud 1.0.1 → 1.0.3
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/README.md +2 -4
- package/api/resources/document/client/Client.js +13 -13
- package/api/resources/memory/client/Client.d.ts +14 -0
- package/api/resources/memory/client/Client.js +89 -15
- package/api/resources/memory/client/requests/EndSessionRequest.d.ts +10 -0
- package/api/resources/memory/client/requests/EndSessionRequest.js +5 -0
- package/api/resources/memory/client/requests/index.d.ts +1 -0
- package/api/resources/user/client/Client.js +6 -6
- package/api/types/Memory.d.ts +2 -0
- package/api/types/Session.d.ts +1 -0
- package/dist/api/resources/document/client/Client.js +13 -13
- package/dist/api/resources/memory/client/Client.d.ts +14 -0
- package/dist/api/resources/memory/client/Client.js +89 -15
- package/dist/api/resources/memory/client/requests/EndSessionRequest.d.ts +10 -0
- package/dist/api/resources/memory/client/requests/EndSessionRequest.js +5 -0
- package/dist/api/resources/memory/client/requests/index.d.ts +1 -0
- package/dist/api/resources/user/client/Client.js +6 -6
- package/dist/api/types/Memory.d.ts +2 -0
- package/dist/api/types/Session.d.ts +1 -0
- package/dist/serialization/resources/memory/client/requests/EndSessionRequest.d.ts +12 -0
- package/dist/serialization/resources/memory/client/requests/EndSessionRequest.js +33 -0
- package/dist/serialization/resources/memory/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/memory/client/requests/index.js +3 -1
- package/dist/serialization/types/Memory.d.ts +1 -0
- package/dist/serialization/types/Memory.js +1 -0
- package/dist/serialization/types/Session.d.ts +1 -0
- package/dist/serialization/types/Session.js +1 -0
- package/examples/memory/memory_example.ts +8 -0
- package/package.json +1 -1
- package/serialization/resources/memory/client/requests/EndSessionRequest.d.ts +12 -0
- package/serialization/resources/memory/client/requests/EndSessionRequest.js +33 -0
- package/serialization/resources/memory/client/requests/index.d.ts +1 -0
- package/serialization/resources/memory/client/requests/index.js +3 -1
- package/serialization/types/Memory.d.ts +1 -0
- package/serialization/types/Memory.js +1 -0
- package/serialization/types/Session.d.ts +1 -0
- package/serialization/types/Session.js +1 -0
package/README.md
CHANGED
|
@@ -14,10 +14,8 @@ Zep: Long-Term Memory for AI Assistants.
|
|
|
14
14
|
<br />
|
|
15
15
|
|
|
16
16
|
<p align="center">
|
|
17
|
-
<a href="https://
|
|
18
|
-
<a href="https://
|
|
19
|
-
<a href="https://docs.getzep.com/sdk/langchain/">LangChain</a> and
|
|
20
|
-
<a href="https://docs.getzep.com/sdk/langchain/">LlamaIndex</a> Support |
|
|
17
|
+
<a href="https://help.getzep.com">Documentation</a> |
|
|
18
|
+
<a href="https://help.getzep.com/langchain/overview">LangChain</a> |
|
|
21
19
|
<a href="https://discord.gg/W8Kw6bsgXQ">Discord</a><br />
|
|
22
20
|
<a href="https://www.getzep.com">www.getzep.com</a>
|
|
23
21
|
</p>
|
|
@@ -77,7 +77,7 @@ class Document {
|
|
|
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, "collections"),
|
|
79
79
|
method: "GET",
|
|
80
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
80
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
81
81
|
contentType: "application/json",
|
|
82
82
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
83
83
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -151,7 +151,7 @@ class Document {
|
|
|
151
151
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
152
152
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}`),
|
|
153
153
|
method: "GET",
|
|
154
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
154
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
155
155
|
contentType: "application/json",
|
|
156
156
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
157
157
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -242,7 +242,7 @@ class Document {
|
|
|
242
242
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
243
243
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}`),
|
|
244
244
|
method: "POST",
|
|
245
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
245
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
246
246
|
contentType: "application/json",
|
|
247
247
|
body: yield serializers.CreateDocumentCollectionRequest.jsonOrThrow(request, {
|
|
248
248
|
unrecognizedObjectKeys: "strip",
|
|
@@ -335,7 +335,7 @@ class Document {
|
|
|
335
335
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
336
336
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}`),
|
|
337
337
|
method: "DELETE",
|
|
338
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
338
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
339
339
|
contentType: "application/json",
|
|
340
340
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
341
341
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -426,7 +426,7 @@ class Document {
|
|
|
426
426
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
427
427
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}`),
|
|
428
428
|
method: "PATCH",
|
|
429
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
429
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
430
430
|
contentType: "application/json",
|
|
431
431
|
body: yield serializers.UpdateDocumentCollectionRequest.jsonOrThrow(request, {
|
|
432
432
|
unrecognizedObjectKeys: "strip",
|
|
@@ -519,7 +519,7 @@ class Document {
|
|
|
519
519
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
520
520
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}/documents`),
|
|
521
521
|
method: "POST",
|
|
522
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
522
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
523
523
|
contentType: "application/json",
|
|
524
524
|
body: yield serializers.document.addDocuments.Request.jsonOrThrow(request, {
|
|
525
525
|
unrecognizedObjectKeys: "strip",
|
|
@@ -604,7 +604,7 @@ class Document {
|
|
|
604
604
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
605
605
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}/documents/batchDelete`),
|
|
606
606
|
method: "POST",
|
|
607
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
607
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
608
608
|
contentType: "application/json",
|
|
609
609
|
body: yield serializers.document.batchDeleteDocuments.Request.jsonOrThrow(request, {
|
|
610
610
|
unrecognizedObjectKeys: "strip",
|
|
@@ -689,7 +689,7 @@ class Document {
|
|
|
689
689
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
690
690
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}/documents/batchGet`),
|
|
691
691
|
method: "POST",
|
|
692
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
692
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
693
693
|
contentType: "application/json",
|
|
694
694
|
body: yield serializers.GetDocumentListRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
695
695
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -774,7 +774,7 @@ class Document {
|
|
|
774
774
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
775
775
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}/documents/batchUpdate`),
|
|
776
776
|
method: "PATCH",
|
|
777
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
777
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
778
778
|
contentType: "application/json",
|
|
779
779
|
body: yield serializers.document.batchUpdateDocuments.Request.jsonOrThrow(request, {
|
|
780
780
|
unrecognizedObjectKeys: "strip",
|
|
@@ -859,7 +859,7 @@ class Document {
|
|
|
859
859
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
860
860
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}/documents/uuid/${encodeURIComponent(documentUuid)}`),
|
|
861
861
|
method: "GET",
|
|
862
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
862
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
863
863
|
contentType: "application/json",
|
|
864
864
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
865
865
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -942,7 +942,7 @@ class Document {
|
|
|
942
942
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
943
943
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}/documents/uuid/${encodeURIComponent(documentUuid)}`),
|
|
944
944
|
method: "DELETE",
|
|
945
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
945
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
946
946
|
contentType: "application/json",
|
|
947
947
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
948
948
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -1034,7 +1034,7 @@ class Document {
|
|
|
1034
1034
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1035
1035
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}/documents/uuid/${encodeURIComponent(documentUuid)}`),
|
|
1036
1036
|
method: "PATCH",
|
|
1037
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
1037
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
1038
1038
|
contentType: "application/json",
|
|
1039
1039
|
body: yield serializers.UpdateDocumentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
1040
1040
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1130,7 +1130,7 @@ class Document {
|
|
|
1130
1130
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1131
1131
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}/search`),
|
|
1132
1132
|
method: "POST",
|
|
1133
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
1133
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
1134
1134
|
contentType: "application/json",
|
|
1135
1135
|
queryParameters: _queryParams,
|
|
1136
1136
|
body: yield serializers.DocumentSearchPayload.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -93,6 +93,20 @@ export declare class Memory {
|
|
|
93
93
|
* })
|
|
94
94
|
*/
|
|
95
95
|
classifySession(sessionId: string, request: Zep.ClassifySessionRequest, requestOptions?: Memory.RequestOptions): Promise<Zep.ClassifySessionResponse>;
|
|
96
|
+
/**
|
|
97
|
+
* End a session by ID
|
|
98
|
+
*
|
|
99
|
+
* @param {string} sessionId - Session ID
|
|
100
|
+
* @param {Zep.EndSessionRequest} request
|
|
101
|
+
* @param {Memory.RequestOptions} requestOptions - Request-specific configuration.
|
|
102
|
+
*
|
|
103
|
+
* @throws {@link Zep.NotFoundError}
|
|
104
|
+
* @throws {@link Zep.InternalServerError}
|
|
105
|
+
*
|
|
106
|
+
* @example
|
|
107
|
+
* await zep.memory.endSession("sessionId")
|
|
108
|
+
*/
|
|
109
|
+
endSession(sessionId: string, request?: Zep.EndSessionRequest, requestOptions?: Memory.RequestOptions): Promise<Zep.Session>;
|
|
96
110
|
/**
|
|
97
111
|
* extract data from a session by session id
|
|
98
112
|
*
|
|
@@ -80,7 +80,7 @@ class Memory {
|
|
|
80
80
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
81
81
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, "sessions"),
|
|
82
82
|
method: "POST",
|
|
83
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
83
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
84
84
|
contentType: "application/json",
|
|
85
85
|
body: yield serializers.CreateSessionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
86
86
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -167,7 +167,7 @@ class Memory {
|
|
|
167
167
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
168
168
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, "sessions-ordered"),
|
|
169
169
|
method: "GET",
|
|
170
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
170
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
171
171
|
contentType: "application/json",
|
|
172
172
|
queryParameters: _queryParams,
|
|
173
173
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -240,7 +240,7 @@ class Memory {
|
|
|
240
240
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
241
241
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}`),
|
|
242
242
|
method: "GET",
|
|
243
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
243
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
244
244
|
contentType: "application/json",
|
|
245
245
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
246
246
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -316,7 +316,7 @@ class Memory {
|
|
|
316
316
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
317
317
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}`),
|
|
318
318
|
method: "PATCH",
|
|
319
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
319
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
320
320
|
contentType: "application/json",
|
|
321
321
|
body: yield serializers.UpdateSessionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
322
322
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -401,7 +401,7 @@ class Memory {
|
|
|
401
401
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
402
402
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/classify`),
|
|
403
403
|
method: "POST",
|
|
404
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
404
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
405
405
|
contentType: "application/json",
|
|
406
406
|
body: yield serializers.ClassifySessionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
407
407
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -456,6 +456,80 @@ class Memory {
|
|
|
456
456
|
}
|
|
457
457
|
});
|
|
458
458
|
}
|
|
459
|
+
/**
|
|
460
|
+
* End a session by ID
|
|
461
|
+
*
|
|
462
|
+
* @param {string} sessionId - Session ID
|
|
463
|
+
* @param {Zep.EndSessionRequest} request
|
|
464
|
+
* @param {Memory.RequestOptions} requestOptions - Request-specific configuration.
|
|
465
|
+
*
|
|
466
|
+
* @throws {@link Zep.NotFoundError}
|
|
467
|
+
* @throws {@link Zep.InternalServerError}
|
|
468
|
+
*
|
|
469
|
+
* @example
|
|
470
|
+
* await zep.memory.endSession("sessionId")
|
|
471
|
+
*/
|
|
472
|
+
endSession(sessionId, request = {}, requestOptions) {
|
|
473
|
+
var _a, _b;
|
|
474
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
475
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
476
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/end`),
|
|
477
|
+
method: "POST",
|
|
478
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
479
|
+
contentType: "application/json",
|
|
480
|
+
body: yield serializers.EndSessionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
481
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
482
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
483
|
+
});
|
|
484
|
+
if (_response.ok) {
|
|
485
|
+
return yield serializers.Session.parseOrThrow(_response.body, {
|
|
486
|
+
unrecognizedObjectKeys: "passthrough",
|
|
487
|
+
allowUnrecognizedUnionMembers: true,
|
|
488
|
+
allowUnrecognizedEnumValues: true,
|
|
489
|
+
skipValidation: true,
|
|
490
|
+
breadcrumbsPrefix: ["response"],
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
if (_response.error.reason === "status-code") {
|
|
494
|
+
switch (_response.error.statusCode) {
|
|
495
|
+
case 404:
|
|
496
|
+
throw new Zep.NotFoundError(yield serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
497
|
+
unrecognizedObjectKeys: "passthrough",
|
|
498
|
+
allowUnrecognizedUnionMembers: true,
|
|
499
|
+
allowUnrecognizedEnumValues: true,
|
|
500
|
+
skipValidation: true,
|
|
501
|
+
breadcrumbsPrefix: ["response"],
|
|
502
|
+
}));
|
|
503
|
+
case 500:
|
|
504
|
+
throw new Zep.InternalServerError(yield serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
505
|
+
unrecognizedObjectKeys: "passthrough",
|
|
506
|
+
allowUnrecognizedUnionMembers: true,
|
|
507
|
+
allowUnrecognizedEnumValues: true,
|
|
508
|
+
skipValidation: true,
|
|
509
|
+
breadcrumbsPrefix: ["response"],
|
|
510
|
+
}));
|
|
511
|
+
default:
|
|
512
|
+
throw new errors.ZepError({
|
|
513
|
+
statusCode: _response.error.statusCode,
|
|
514
|
+
body: _response.error.body,
|
|
515
|
+
});
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
switch (_response.error.reason) {
|
|
519
|
+
case "non-json":
|
|
520
|
+
throw new errors.ZepError({
|
|
521
|
+
statusCode: _response.error.statusCode,
|
|
522
|
+
body: _response.error.rawBody,
|
|
523
|
+
});
|
|
524
|
+
case "timeout":
|
|
525
|
+
throw new errors.ZepTimeoutError();
|
|
526
|
+
case "unknown":
|
|
527
|
+
throw new errors.ZepError({
|
|
528
|
+
message: _response.error.errorMessage,
|
|
529
|
+
});
|
|
530
|
+
}
|
|
531
|
+
});
|
|
532
|
+
}
|
|
459
533
|
/**
|
|
460
534
|
* extract data from a session by session id
|
|
461
535
|
*
|
|
@@ -477,7 +551,7 @@ class Memory {
|
|
|
477
551
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
478
552
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/extract`),
|
|
479
553
|
method: "POST",
|
|
480
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
554
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
481
555
|
contentType: "application/json",
|
|
482
556
|
body: yield serializers.ModelsExtractDataRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
483
557
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -559,7 +633,7 @@ class Memory {
|
|
|
559
633
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
560
634
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/memory`),
|
|
561
635
|
method: "GET",
|
|
562
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
636
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
563
637
|
contentType: "application/json",
|
|
564
638
|
queryParameters: _queryParams,
|
|
565
639
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -634,7 +708,7 @@ class Memory {
|
|
|
634
708
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
635
709
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/memory`),
|
|
636
710
|
method: "POST",
|
|
637
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
711
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
638
712
|
contentType: "application/json",
|
|
639
713
|
body: yield serializers.AddMemoryRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
640
714
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -699,7 +773,7 @@ class Memory {
|
|
|
699
773
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
700
774
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/memory`),
|
|
701
775
|
method: "DELETE",
|
|
702
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
776
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
703
777
|
contentType: "application/json",
|
|
704
778
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
705
779
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -780,7 +854,7 @@ class Memory {
|
|
|
780
854
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
781
855
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/messages`),
|
|
782
856
|
method: "GET",
|
|
783
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
857
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
784
858
|
contentType: "application/json",
|
|
785
859
|
queryParameters: _queryParams,
|
|
786
860
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -854,7 +928,7 @@ class Memory {
|
|
|
854
928
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
855
929
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/messages/${encodeURIComponent(messageUuid)}`),
|
|
856
930
|
method: "GET",
|
|
857
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
931
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
858
932
|
contentType: "application/json",
|
|
859
933
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
860
934
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -930,7 +1004,7 @@ class Memory {
|
|
|
930
1004
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
931
1005
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/messages/${encodeURIComponent(messageUuid)}`),
|
|
932
1006
|
method: "PATCH",
|
|
933
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
1007
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
934
1008
|
contentType: "application/json",
|
|
935
1009
|
body: yield serializers.ModelsMessageMetadataUpdate.jsonOrThrow(request, {
|
|
936
1010
|
unrecognizedObjectKeys: "strip",
|
|
@@ -1011,7 +1085,7 @@ class Memory {
|
|
|
1011
1085
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1012
1086
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/search`),
|
|
1013
1087
|
method: "POST",
|
|
1014
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
1088
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
1015
1089
|
contentType: "application/json",
|
|
1016
1090
|
queryParameters: _queryParams,
|
|
1017
1091
|
body: yield serializers.MemorySearchPayload.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -1085,7 +1159,7 @@ class Memory {
|
|
|
1085
1159
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1086
1160
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/summary`),
|
|
1087
1161
|
method: "GET",
|
|
1088
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
1162
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
1089
1163
|
contentType: "application/json",
|
|
1090
1164
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
1091
1165
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -1163,7 +1237,7 @@ class Memory {
|
|
|
1163
1237
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1164
1238
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/synthesize_question`),
|
|
1165
1239
|
method: "GET",
|
|
1166
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
1240
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
1167
1241
|
contentType: "application/json",
|
|
1168
1242
|
queryParameters: _queryParams,
|
|
1169
1243
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -2,6 +2,7 @@ export { type CreateSessionRequest } from "./CreateSessionRequest";
|
|
|
2
2
|
export { type MemoryListSessionsRequest } from "./MemoryListSessionsRequest";
|
|
3
3
|
export { type UpdateSessionRequest } from "./UpdateSessionRequest";
|
|
4
4
|
export { type ClassifySessionRequest } from "./ClassifySessionRequest";
|
|
5
|
+
export { type EndSessionRequest } from "./EndSessionRequest";
|
|
5
6
|
export { type ModelsExtractDataRequest } from "./ModelsExtractDataRequest";
|
|
6
7
|
export { type MemoryGetRequest } from "./MemoryGetRequest";
|
|
7
8
|
export { type AddMemoryRequest } from "./AddMemoryRequest";
|
|
@@ -67,7 +67,7 @@ class User {
|
|
|
67
67
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
68
68
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, "users"),
|
|
69
69
|
method: "POST",
|
|
70
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
70
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
71
71
|
contentType: "application/json",
|
|
72
72
|
body: yield serializers.CreateUserRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
73
73
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -148,7 +148,7 @@ class User {
|
|
|
148
148
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
149
149
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, "users-ordered"),
|
|
150
150
|
method: "GET",
|
|
151
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
151
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
152
152
|
contentType: "application/json",
|
|
153
153
|
queryParameters: _queryParams,
|
|
154
154
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -221,7 +221,7 @@ class User {
|
|
|
221
221
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
222
222
|
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)}`),
|
|
223
223
|
method: "GET",
|
|
224
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
224
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
225
225
|
contentType: "application/json",
|
|
226
226
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
227
227
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -293,7 +293,7 @@ class User {
|
|
|
293
293
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
294
294
|
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)}`),
|
|
295
295
|
method: "DELETE",
|
|
296
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
296
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
297
297
|
contentType: "application/json",
|
|
298
298
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
299
299
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -367,7 +367,7 @@ class User {
|
|
|
367
367
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
368
368
|
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)}`),
|
|
369
369
|
method: "PATCH",
|
|
370
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
370
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
371
371
|
contentType: "application/json",
|
|
372
372
|
body: yield serializers.UpdateUserRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
373
373
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -447,7 +447,7 @@ class User {
|
|
|
447
447
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
448
448
|
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`),
|
|
449
449
|
method: "GET",
|
|
450
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
450
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
451
451
|
contentType: "application/json",
|
|
452
452
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
453
453
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
package/api/types/Memory.d.ts
CHANGED
|
@@ -9,6 +9,8 @@ export interface Memory {
|
|
|
9
9
|
messages?: Zep.Message[];
|
|
10
10
|
/** A dictionary containing metadata associated with the memory. */
|
|
11
11
|
metadata?: Record<string, unknown>;
|
|
12
|
+
/** Summary list result from Summary Retriever Memory Type. */
|
|
13
|
+
relevantSummaries?: Zep.Summary[];
|
|
12
14
|
/** A Summary object. */
|
|
13
15
|
summary?: Zep.Summary;
|
|
14
16
|
}
|