@getzep/zep-cloud 1.0.4 → 1.0.6
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/index.d.ts +1 -1
- package/api/index.js +1 -1
- package/api/resources/document/client/Client.js +13 -13
- package/api/resources/index.d.ts +1 -2
- package/api/resources/index.js +2 -3
- package/api/resources/memory/client/Client.d.ts +18 -0
- package/api/resources/memory/client/Client.js +104 -17
- package/api/resources/memory/client/requests/ExtractDataRequest.d.ts +23 -0
- package/api/resources/memory/client/requests/ExtractDataRequest.js +5 -0
- package/api/resources/memory/client/requests/MemoryGetRequest.d.ts +1 -1
- package/api/resources/memory/client/requests/index.d.ts +1 -0
- package/api/resources/memory/index.d.ts +0 -1
- package/api/resources/memory/index.js +0 -1
- package/api/resources/user/client/Client.js +6 -6
- package/api/types/Fact.d.ts +8 -0
- package/api/types/Fact.js +5 -0
- package/api/{resources/memory/types/MemoryGetRequestMemoryType.d.ts → types/MemoryType.d.ts} +2 -2
- package/api/{resources/memory/types/MemoryGetRequestMemoryType.js → types/MemoryType.js} +2 -2
- package/api/types/SearchScope.d.ts +2 -1
- package/api/types/SearchScope.js +1 -0
- package/api/types/Session.d.ts +1 -0
- package/api/types/SessionSearchResult.d.ts +1 -0
- package/api/types/index.d.ts +2 -0
- package/api/types/index.js +2 -0
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.js +1 -1
- package/dist/api/resources/document/client/Client.js +13 -13
- package/dist/api/resources/index.d.ts +1 -2
- package/dist/api/resources/index.js +2 -3
- package/dist/api/resources/memory/client/Client.d.ts +18 -0
- package/dist/api/resources/memory/client/Client.js +104 -17
- package/dist/api/resources/memory/client/requests/ExtractDataRequest.d.ts +23 -0
- package/dist/api/resources/memory/client/requests/ExtractDataRequest.js +5 -0
- package/dist/api/resources/memory/client/requests/MemoryGetRequest.d.ts +1 -1
- package/dist/api/resources/memory/client/requests/index.d.ts +1 -0
- package/dist/api/resources/memory/index.d.ts +0 -1
- package/dist/api/resources/memory/index.js +0 -1
- package/dist/api/resources/user/client/Client.js +6 -6
- package/dist/api/types/Fact.d.ts +8 -0
- package/dist/api/types/Fact.js +5 -0
- package/dist/api/{resources/memory/types/MemoryGetRequestMemoryType.d.ts → types/MemoryType.d.ts} +2 -2
- package/dist/api/{resources/memory/types/MemoryGetRequestMemoryType.js → types/MemoryType.js} +2 -2
- package/dist/api/types/SearchScope.d.ts +2 -1
- package/dist/api/types/SearchScope.js +1 -0
- package/dist/api/types/Session.d.ts +1 -0
- package/dist/api/types/SessionSearchResult.d.ts +1 -0
- package/dist/api/types/index.d.ts +2 -0
- package/dist/api/types/index.js +2 -0
- package/dist/extractor/base.d.ts +22 -0
- package/dist/extractor/base.js +20 -0
- package/dist/extractor/date.d.ts +24 -0
- package/dist/extractor/date.js +29 -0
- package/dist/extractor/index.d.ts +281 -0
- package/dist/extractor/index.js +31 -0
- package/dist/extractor/number.d.ts +27 -0
- package/dist/extractor/number.js +37 -0
- package/dist/extractor/regex.d.ts +30 -0
- package/dist/extractor/regex.js +29 -0
- package/dist/extractor/text.d.ts +29 -0
- package/dist/extractor/text.js +43 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -1
- package/dist/langchain/message_history.d.ts +2 -2
- package/dist/serialization/index.d.ts +1 -1
- package/dist/serialization/index.js +1 -1
- package/dist/serialization/resources/index.d.ts +1 -2
- package/dist/serialization/resources/index.js +2 -3
- package/dist/serialization/resources/memory/client/extractData.d.ts +9 -0
- package/{serialization/resources/memory/types/MemoryGetRequestMemoryType.js → dist/serialization/resources/memory/client/extractData.js} +2 -2
- package/dist/serialization/resources/memory/client/index.d.ts +1 -0
- package/dist/serialization/resources/memory/client/index.js +2 -1
- package/dist/serialization/resources/memory/client/requests/ExtractDataRequest.d.ts +15 -0
- package/dist/serialization/resources/memory/client/requests/ExtractDataRequest.js +36 -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/resources/memory/index.d.ts +0 -1
- package/dist/serialization/resources/memory/index.js +0 -1
- package/dist/serialization/types/Fact.d.ts +14 -0
- package/dist/serialization/types/Fact.js +35 -0
- package/dist/serialization/types/MemoryType.d.ts +10 -0
- package/dist/serialization/types/MemoryType.js +31 -0
- package/dist/serialization/types/SearchScope.d.ts +1 -1
- package/dist/serialization/types/SearchScope.js +1 -1
- package/dist/serialization/types/Session.d.ts +1 -0
- package/dist/serialization/types/Session.js +1 -0
- package/dist/serialization/types/SessionSearchResult.d.ts +2 -0
- package/dist/serialization/types/SessionSearchResult.js +2 -0
- package/dist/serialization/types/index.d.ts +2 -0
- package/dist/serialization/types/index.js +2 -0
- package/dist/wrapper/index.d.ts +2 -0
- package/dist/wrapper/index.js +4 -0
- package/dist/wrapper/memory.d.ts +35 -0
- package/dist/wrapper/memory.js +59 -0
- package/examples/memory/memory_example.ts +27 -8
- package/examples/memory/structured_data_extraction_example.ts +34 -0
- package/extractor/base.d.ts +22 -0
- package/extractor/base.js +20 -0
- package/extractor/date.d.ts +24 -0
- package/extractor/date.js +29 -0
- package/extractor/index.d.ts +281 -0
- package/extractor/index.js +31 -0
- package/extractor/number.d.ts +27 -0
- package/extractor/number.js +37 -0
- package/extractor/regex.d.ts +30 -0
- package/extractor/regex.js +29 -0
- package/extractor/text.d.ts +29 -0
- package/extractor/text.js +43 -0
- package/index.d.ts +1 -0
- package/index.js +3 -1
- package/langchain/message_history.d.ts +2 -2
- package/package.json +11 -5
- package/serialization/index.d.ts +1 -1
- package/serialization/index.js +1 -1
- package/serialization/resources/index.d.ts +1 -2
- package/serialization/resources/index.js +2 -3
- package/serialization/resources/memory/client/extractData.d.ts +9 -0
- package/{dist/serialization/resources/memory/types/MemoryGetRequestMemoryType.js → serialization/resources/memory/client/extractData.js} +2 -2
- package/serialization/resources/memory/client/index.d.ts +1 -0
- package/serialization/resources/memory/client/index.js +2 -1
- package/serialization/resources/memory/client/requests/ExtractDataRequest.d.ts +15 -0
- package/serialization/resources/memory/client/requests/ExtractDataRequest.js +36 -0
- package/serialization/resources/memory/client/requests/index.d.ts +1 -0
- package/serialization/resources/memory/client/requests/index.js +3 -1
- package/serialization/resources/memory/index.d.ts +0 -1
- package/serialization/resources/memory/index.js +0 -1
- package/serialization/types/Fact.d.ts +14 -0
- package/serialization/types/Fact.js +35 -0
- package/serialization/types/MemoryType.d.ts +10 -0
- package/serialization/types/MemoryType.js +31 -0
- package/serialization/types/SearchScope.d.ts +1 -1
- package/serialization/types/SearchScope.js +1 -1
- package/serialization/types/Session.d.ts +1 -0
- package/serialization/types/Session.js +1 -0
- package/serialization/types/SessionSearchResult.d.ts +2 -0
- package/serialization/types/SessionSearchResult.js +2 -0
- package/serialization/types/index.d.ts +2 -0
- package/serialization/types/index.js +2 -0
- package/wrapper/index.d.ts +2 -0
- package/wrapper/index.js +4 -0
- package/wrapper/memory.d.ts +35 -0
- package/wrapper/memory.js +59 -0
- package/api/resources/memory/types/index.d.ts +0 -1
- package/api/resources/memory/types/index.js +0 -17
- package/dist/api/resources/memory/types/index.d.ts +0 -1
- package/dist/api/resources/memory/types/index.js +0 -17
- package/dist/serialization/resources/memory/types/MemoryGetRequestMemoryType.d.ts +0 -10
- package/dist/serialization/resources/memory/types/index.d.ts +0 -1
- package/dist/serialization/resources/memory/types/index.js +0 -17
- package/serialization/resources/memory/types/MemoryGetRequestMemoryType.d.ts +0 -10
- package/serialization/resources/memory/types/index.d.ts +0 -1
- package/serialization/resources/memory/types/index.js +0 -17
package/api/index.d.ts
CHANGED
package/api/index.js
CHANGED
|
@@ -14,6 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./resources"), exports);
|
|
18
17
|
__exportStar(require("./types"), exports);
|
|
19
18
|
__exportStar(require("./errors"), exports);
|
|
19
|
+
__exportStar(require("./resources"), exports);
|
|
@@ -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.6", "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,
|
|
@@ -152,7 +152,7 @@ class Document {
|
|
|
152
152
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
153
153
|
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)}`),
|
|
154
154
|
method: "GET",
|
|
155
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
155
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
156
156
|
contentType: "application/json",
|
|
157
157
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
158
158
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -244,7 +244,7 @@ class Document {
|
|
|
244
244
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
245
245
|
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)}`),
|
|
246
246
|
method: "POST",
|
|
247
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
247
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
248
248
|
contentType: "application/json",
|
|
249
249
|
body: yield serializers.CreateDocumentCollectionRequest.jsonOrThrow(request, {
|
|
250
250
|
unrecognizedObjectKeys: "strip",
|
|
@@ -338,7 +338,7 @@ class Document {
|
|
|
338
338
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
339
339
|
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)}`),
|
|
340
340
|
method: "DELETE",
|
|
341
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
341
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
342
342
|
contentType: "application/json",
|
|
343
343
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
344
344
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -430,7 +430,7 @@ class Document {
|
|
|
430
430
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
431
431
|
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)}`),
|
|
432
432
|
method: "PATCH",
|
|
433
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
433
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
434
434
|
contentType: "application/json",
|
|
435
435
|
body: yield serializers.UpdateDocumentCollectionRequest.jsonOrThrow(request, {
|
|
436
436
|
unrecognizedObjectKeys: "strip",
|
|
@@ -526,7 +526,7 @@ class Document {
|
|
|
526
526
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
527
527
|
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`),
|
|
528
528
|
method: "POST",
|
|
529
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
529
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
530
530
|
contentType: "application/json",
|
|
531
531
|
body: yield serializers.document.addDocuments.Request.jsonOrThrow(request, {
|
|
532
532
|
unrecognizedObjectKeys: "strip",
|
|
@@ -612,7 +612,7 @@ class Document {
|
|
|
612
612
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
613
613
|
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`),
|
|
614
614
|
method: "POST",
|
|
615
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
615
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
616
616
|
contentType: "application/json",
|
|
617
617
|
body: yield serializers.document.batchDeleteDocuments.Request.jsonOrThrow(request, {
|
|
618
618
|
unrecognizedObjectKeys: "strip",
|
|
@@ -698,7 +698,7 @@ class Document {
|
|
|
698
698
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
699
699
|
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`),
|
|
700
700
|
method: "POST",
|
|
701
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
701
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
702
702
|
contentType: "application/json",
|
|
703
703
|
body: yield serializers.GetDocumentListRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
704
704
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -784,7 +784,7 @@ class Document {
|
|
|
784
784
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
785
785
|
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`),
|
|
786
786
|
method: "PATCH",
|
|
787
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
787
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
788
788
|
contentType: "application/json",
|
|
789
789
|
body: yield serializers.document.batchUpdateDocuments.Request.jsonOrThrow(request, {
|
|
790
790
|
unrecognizedObjectKeys: "strip",
|
|
@@ -870,7 +870,7 @@ class Document {
|
|
|
870
870
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
871
871
|
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)}`),
|
|
872
872
|
method: "GET",
|
|
873
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
873
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
874
874
|
contentType: "application/json",
|
|
875
875
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
876
876
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -954,7 +954,7 @@ class Document {
|
|
|
954
954
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
955
955
|
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)}`),
|
|
956
956
|
method: "DELETE",
|
|
957
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
957
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
958
958
|
contentType: "application/json",
|
|
959
959
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
960
960
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -1047,7 +1047,7 @@ class Document {
|
|
|
1047
1047
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1048
1048
|
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)}`),
|
|
1049
1049
|
method: "PATCH",
|
|
1050
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
1050
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
1051
1051
|
contentType: "application/json",
|
|
1052
1052
|
body: yield serializers.UpdateDocumentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
1053
1053
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1144,7 +1144,7 @@ class Document {
|
|
|
1144
1144
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1145
1145
|
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`),
|
|
1146
1146
|
method: "POST",
|
|
1147
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
1147
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
1148
1148
|
contentType: "application/json",
|
|
1149
1149
|
queryParameters: _queryParams,
|
|
1150
1150
|
body: yield serializers.DocumentSearchPayload.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
|
package/api/resources/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
export * as memory from "./memory";
|
|
2
|
-
export * from "./memory/types";
|
|
3
1
|
export * as document from "./document";
|
|
2
|
+
export * as memory from "./memory";
|
|
4
3
|
export * as user from "./user";
|
|
5
4
|
export * from "./document/client/requests";
|
|
6
5
|
export * from "./memory/client/requests";
|
package/api/resources/index.js
CHANGED
|
@@ -26,10 +26,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
26
26
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.user = exports.
|
|
30
|
-
exports.memory = __importStar(require("./memory"));
|
|
31
|
-
__exportStar(require("./memory/types"), exports);
|
|
29
|
+
exports.user = exports.memory = exports.document = void 0;
|
|
32
30
|
exports.document = __importStar(require("./document"));
|
|
31
|
+
exports.memory = __importStar(require("./memory"));
|
|
33
32
|
exports.user = __importStar(require("./user"));
|
|
34
33
|
__exportStar(require("./document/client/requests"), exports);
|
|
35
34
|
__exportStar(require("./memory/client/requests"), exports);
|
|
@@ -138,6 +138,24 @@ export declare class Memory {
|
|
|
138
138
|
* await zep.memory.endSession("sessionId")
|
|
139
139
|
*/
|
|
140
140
|
endSession(sessionId: string, request?: Zep.EndSessionRequest, requestOptions?: Memory.RequestOptions): Promise<Zep.EndSessionResponse>;
|
|
141
|
+
/**
|
|
142
|
+
* extract data from a session by session id
|
|
143
|
+
*
|
|
144
|
+
* @param {string} sessionId - Session ID
|
|
145
|
+
* @param {Zep.ExtractDataRequest} request
|
|
146
|
+
* @param {Memory.RequestOptions} requestOptions - Request-specific configuration.
|
|
147
|
+
*
|
|
148
|
+
* @throws {@link Zep.BadRequestError}
|
|
149
|
+
* @throws {@link Zep.NotFoundError}
|
|
150
|
+
* @throws {@link Zep.InternalServerError}
|
|
151
|
+
*
|
|
152
|
+
* @example
|
|
153
|
+
* await zep.memory.extractData("sessionId", {
|
|
154
|
+
* lastN: 1,
|
|
155
|
+
* modelSchema: "model_schema"
|
|
156
|
+
* })
|
|
157
|
+
*/
|
|
158
|
+
extractData(sessionId: string, request: Zep.ExtractDataRequest, requestOptions?: Memory.RequestOptions): Promise<Record<string, string>>;
|
|
141
159
|
/**
|
|
142
160
|
* Returns a memory (latest summary, list of messages and facts for models.MemoryTypePerpetual) for a given session
|
|
143
161
|
*
|
|
@@ -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.6", "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,
|
|
@@ -168,7 +168,7 @@ class Memory {
|
|
|
168
168
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
169
169
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, "sessions-ordered"),
|
|
170
170
|
method: "GET",
|
|
171
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
171
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
172
172
|
contentType: "application/json",
|
|
173
173
|
queryParameters: _queryParams,
|
|
174
174
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -245,7 +245,7 @@ class Memory {
|
|
|
245
245
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
246
246
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, "sessions/end"),
|
|
247
247
|
method: "POST",
|
|
248
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
248
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
249
249
|
contentType: "application/json",
|
|
250
250
|
body: yield serializers.EndSessionsRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
251
251
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -331,7 +331,7 @@ class Memory {
|
|
|
331
331
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
332
332
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, "sessions/search"),
|
|
333
333
|
method: "POST",
|
|
334
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
334
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
335
335
|
contentType: "application/json",
|
|
336
336
|
queryParameters: _queryParams,
|
|
337
337
|
body: yield serializers.SessionSearchQuery.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -398,7 +398,7 @@ class Memory {
|
|
|
398
398
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
399
399
|
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)}`),
|
|
400
400
|
method: "GET",
|
|
401
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
401
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
402
402
|
contentType: "application/json",
|
|
403
403
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
404
404
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -476,7 +476,7 @@ class Memory {
|
|
|
476
476
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
477
477
|
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)}`),
|
|
478
478
|
method: "PATCH",
|
|
479
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
479
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
480
480
|
contentType: "application/json",
|
|
481
481
|
body: yield serializers.UpdateSessionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
482
482
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -570,7 +570,7 @@ class Memory {
|
|
|
570
570
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
571
571
|
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`),
|
|
572
572
|
method: "POST",
|
|
573
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
573
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
574
574
|
contentType: "application/json",
|
|
575
575
|
body: yield serializers.ClassifySessionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
576
576
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -646,7 +646,7 @@ class Memory {
|
|
|
646
646
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
647
647
|
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`),
|
|
648
648
|
method: "POST",
|
|
649
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
649
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
650
650
|
contentType: "application/json",
|
|
651
651
|
body: yield serializers.EndSessionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
652
652
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -710,6 +710,93 @@ class Memory {
|
|
|
710
710
|
}
|
|
711
711
|
});
|
|
712
712
|
}
|
|
713
|
+
/**
|
|
714
|
+
* extract data from a session by session id
|
|
715
|
+
*
|
|
716
|
+
* @param {string} sessionId - Session ID
|
|
717
|
+
* @param {Zep.ExtractDataRequest} request
|
|
718
|
+
* @param {Memory.RequestOptions} requestOptions - Request-specific configuration.
|
|
719
|
+
*
|
|
720
|
+
* @throws {@link Zep.BadRequestError}
|
|
721
|
+
* @throws {@link Zep.NotFoundError}
|
|
722
|
+
* @throws {@link Zep.InternalServerError}
|
|
723
|
+
*
|
|
724
|
+
* @example
|
|
725
|
+
* await zep.memory.extractData("sessionId", {
|
|
726
|
+
* lastN: 1,
|
|
727
|
+
* modelSchema: "model_schema"
|
|
728
|
+
* })
|
|
729
|
+
*/
|
|
730
|
+
extractData(sessionId, request, requestOptions) {
|
|
731
|
+
var _a, _b;
|
|
732
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
733
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
734
|
+
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`),
|
|
735
|
+
method: "POST",
|
|
736
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
737
|
+
contentType: "application/json",
|
|
738
|
+
body: yield serializers.ExtractDataRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
739
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
740
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
741
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
742
|
+
});
|
|
743
|
+
if (_response.ok) {
|
|
744
|
+
return yield serializers.memory.extractData.Response.parseOrThrow(_response.body, {
|
|
745
|
+
unrecognizedObjectKeys: "passthrough",
|
|
746
|
+
allowUnrecognizedUnionMembers: true,
|
|
747
|
+
allowUnrecognizedEnumValues: true,
|
|
748
|
+
skipValidation: true,
|
|
749
|
+
breadcrumbsPrefix: ["response"],
|
|
750
|
+
});
|
|
751
|
+
}
|
|
752
|
+
if (_response.error.reason === "status-code") {
|
|
753
|
+
switch (_response.error.statusCode) {
|
|
754
|
+
case 400:
|
|
755
|
+
throw new Zep.BadRequestError(yield serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
756
|
+
unrecognizedObjectKeys: "passthrough",
|
|
757
|
+
allowUnrecognizedUnionMembers: true,
|
|
758
|
+
allowUnrecognizedEnumValues: true,
|
|
759
|
+
skipValidation: true,
|
|
760
|
+
breadcrumbsPrefix: ["response"],
|
|
761
|
+
}));
|
|
762
|
+
case 404:
|
|
763
|
+
throw new Zep.NotFoundError(yield serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
764
|
+
unrecognizedObjectKeys: "passthrough",
|
|
765
|
+
allowUnrecognizedUnionMembers: true,
|
|
766
|
+
allowUnrecognizedEnumValues: true,
|
|
767
|
+
skipValidation: true,
|
|
768
|
+
breadcrumbsPrefix: ["response"],
|
|
769
|
+
}));
|
|
770
|
+
case 500:
|
|
771
|
+
throw new Zep.InternalServerError(yield serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
772
|
+
unrecognizedObjectKeys: "passthrough",
|
|
773
|
+
allowUnrecognizedUnionMembers: true,
|
|
774
|
+
allowUnrecognizedEnumValues: true,
|
|
775
|
+
skipValidation: true,
|
|
776
|
+
breadcrumbsPrefix: ["response"],
|
|
777
|
+
}));
|
|
778
|
+
default:
|
|
779
|
+
throw new errors.ZepError({
|
|
780
|
+
statusCode: _response.error.statusCode,
|
|
781
|
+
body: _response.error.body,
|
|
782
|
+
});
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
switch (_response.error.reason) {
|
|
786
|
+
case "non-json":
|
|
787
|
+
throw new errors.ZepError({
|
|
788
|
+
statusCode: _response.error.statusCode,
|
|
789
|
+
body: _response.error.rawBody,
|
|
790
|
+
});
|
|
791
|
+
case "timeout":
|
|
792
|
+
throw new errors.ZepTimeoutError();
|
|
793
|
+
case "unknown":
|
|
794
|
+
throw new errors.ZepError({
|
|
795
|
+
message: _response.error.errorMessage,
|
|
796
|
+
});
|
|
797
|
+
}
|
|
798
|
+
});
|
|
799
|
+
}
|
|
713
800
|
/**
|
|
714
801
|
* Returns a memory (latest summary, list of messages and facts for models.MemoryTypePerpetual) for a given session
|
|
715
802
|
*
|
|
@@ -737,7 +824,7 @@ class Memory {
|
|
|
737
824
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
738
825
|
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`),
|
|
739
826
|
method: "GET",
|
|
740
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
827
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
741
828
|
contentType: "application/json",
|
|
742
829
|
queryParameters: _queryParams,
|
|
743
830
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -813,7 +900,7 @@ class Memory {
|
|
|
813
900
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
814
901
|
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`),
|
|
815
902
|
method: "POST",
|
|
816
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
903
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
817
904
|
contentType: "application/json",
|
|
818
905
|
body: yield serializers.AddMemoryRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
819
906
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -879,7 +966,7 @@ class Memory {
|
|
|
879
966
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
880
967
|
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`),
|
|
881
968
|
method: "DELETE",
|
|
882
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
969
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
883
970
|
contentType: "application/json",
|
|
884
971
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
885
972
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -961,7 +1048,7 @@ class Memory {
|
|
|
961
1048
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
962
1049
|
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`),
|
|
963
1050
|
method: "GET",
|
|
964
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
1051
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
965
1052
|
contentType: "application/json",
|
|
966
1053
|
queryParameters: _queryParams,
|
|
967
1054
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1036,7 +1123,7 @@ class Memory {
|
|
|
1036
1123
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1037
1124
|
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)}`),
|
|
1038
1125
|
method: "GET",
|
|
1039
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
1126
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
1040
1127
|
contentType: "application/json",
|
|
1041
1128
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
1042
1129
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -1113,7 +1200,7 @@ class Memory {
|
|
|
1113
1200
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1114
1201
|
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)}`),
|
|
1115
1202
|
method: "PATCH",
|
|
1116
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
1203
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
1117
1204
|
contentType: "application/json",
|
|
1118
1205
|
body: yield serializers.ModelsMessageMetadataUpdate.jsonOrThrow(request, {
|
|
1119
1206
|
unrecognizedObjectKeys: "strip",
|
|
@@ -1195,7 +1282,7 @@ class Memory {
|
|
|
1195
1282
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1196
1283
|
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`),
|
|
1197
1284
|
method: "POST",
|
|
1198
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
1285
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
1199
1286
|
contentType: "application/json",
|
|
1200
1287
|
queryParameters: _queryParams,
|
|
1201
1288
|
body: yield serializers.MemorySearchPayload.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -1270,7 +1357,7 @@ class Memory {
|
|
|
1270
1357
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1271
1358
|
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`),
|
|
1272
1359
|
method: "GET",
|
|
1273
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
1360
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
1274
1361
|
contentType: "application/json",
|
|
1275
1362
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
1276
1363
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -1349,7 +1436,7 @@ class Memory {
|
|
|
1349
1436
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1350
1437
|
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`),
|
|
1351
1438
|
method: "GET",
|
|
1352
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
1439
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
1353
1440
|
contentType: "application/json",
|
|
1354
1441
|
queryParameters: _queryParams,
|
|
1355
1442
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* lastN: 1,
|
|
8
|
+
* modelSchema: "model_schema"
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
11
|
+
export interface ExtractDataRequest {
|
|
12
|
+
/** Your current date and time in ISO 8601 format including timezone. This is used for determining relative dates. */
|
|
13
|
+
currentDateTime?: string;
|
|
14
|
+
/** The number of messages in the chat history from which to extract data */
|
|
15
|
+
lastN: number;
|
|
16
|
+
/** The schema describing the data to be extracted. See Zep's SDKs for more details. */
|
|
17
|
+
modelSchema: string;
|
|
18
|
+
/**
|
|
19
|
+
* Validate that the extracted data is present in the dialog and correct per the field description.
|
|
20
|
+
* Mitigates hallucination, but is slower and may result in false negatives.
|
|
21
|
+
*/
|
|
22
|
+
validate?: boolean;
|
|
23
|
+
}
|
|
@@ -10,7 +10,7 @@ export interface MemoryGetRequest {
|
|
|
10
10
|
/**
|
|
11
11
|
* The type of memory to retrieve: perpetual, summary_retriever, or message_window. Defaults to perpetual.
|
|
12
12
|
*/
|
|
13
|
-
memoryType?: Zep.
|
|
13
|
+
memoryType?: Zep.MemoryType;
|
|
14
14
|
/**
|
|
15
15
|
* The number of most recent memory entries to retrieve.
|
|
16
16
|
*/
|
|
@@ -4,6 +4,7 @@ export { type EndSessionsRequest } from "./EndSessionsRequest";
|
|
|
4
4
|
export { type SessionSearchQuery } from "./SessionSearchQuery";
|
|
5
5
|
export { type UpdateSessionRequest } from "./UpdateSessionRequest";
|
|
6
6
|
export { type EndSessionRequest } from "./EndSessionRequest";
|
|
7
|
+
export { type ExtractDataRequest } from "./ExtractDataRequest";
|
|
7
8
|
export { type MemoryGetRequest } from "./MemoryGetRequest";
|
|
8
9
|
export { type AddMemoryRequest } from "./AddMemoryRequest";
|
|
9
10
|
export { type MemoryGetSessionMessagesRequest } from "./MemoryGetSessionMessagesRequest";
|
|
@@ -14,5 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./types"), exports);
|
|
18
17
|
__exportStar(require("./client"), exports);
|
|
@@ -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.6", "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,
|
|
@@ -149,7 +149,7 @@ class User {
|
|
|
149
149
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
150
150
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, "users-ordered"),
|
|
151
151
|
method: "GET",
|
|
152
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
152
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
153
153
|
contentType: "application/json",
|
|
154
154
|
queryParameters: _queryParams,
|
|
155
155
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -223,7 +223,7 @@ class User {
|
|
|
223
223
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
224
224
|
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)}`),
|
|
225
225
|
method: "GET",
|
|
226
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
226
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
227
227
|
contentType: "application/json",
|
|
228
228
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
229
229
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -296,7 +296,7 @@ class User {
|
|
|
296
296
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
297
297
|
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)}`),
|
|
298
298
|
method: "DELETE",
|
|
299
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
299
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
300
300
|
contentType: "application/json",
|
|
301
301
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
302
302
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -371,7 +371,7 @@ class User {
|
|
|
371
371
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
372
372
|
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)}`),
|
|
373
373
|
method: "PATCH",
|
|
374
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
374
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
375
375
|
contentType: "application/json",
|
|
376
376
|
body: yield serializers.UpdateUserRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
377
377
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -452,7 +452,7 @@ class User {
|
|
|
452
452
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
453
453
|
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`),
|
|
454
454
|
method: "GET",
|
|
455
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.
|
|
455
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
456
456
|
contentType: "application/json",
|
|
457
457
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
458
458
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
package/api/{resources/memory/types/MemoryGetRequestMemoryType.d.ts → types/MemoryType.d.ts}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export declare type
|
|
5
|
-
export declare const
|
|
4
|
+
export declare type MemoryType = "perpetual" | "summary_retriever" | "message_window";
|
|
5
|
+
export declare const MemoryType: {
|
|
6
6
|
readonly Perpetual: "perpetual";
|
|
7
7
|
readonly SummaryRetriever: "summary_retriever";
|
|
8
8
|
readonly MessageWindow: "message_window";
|