@getzep/zep-cloud 3.10.0 → 3.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Client.d.ts +6 -0
- package/dist/cjs/Client.js +20 -10
- package/dist/cjs/api/errors/index.d.ts +1 -1
- package/dist/cjs/api/errors/index.js +1 -1
- package/dist/cjs/api/resources/context/client/Client.d.ts +112 -0
- package/dist/cjs/api/resources/context/client/Client.js +516 -0
- package/dist/cjs/api/resources/context/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/context/client/index.js +17 -0
- package/dist/cjs/api/resources/context/client/requests/CreateContextTemplateRequest.d.ts +16 -0
- package/dist/cjs/api/resources/context/client/requests/CreateContextTemplateRequest.js +5 -0
- package/dist/cjs/api/resources/context/client/requests/UpdateContextTemplateRequest.d.ts +13 -0
- package/dist/cjs/api/resources/context/client/requests/UpdateContextTemplateRequest.js +5 -0
- package/dist/cjs/api/resources/context/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/context/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/context/index.d.ts +1 -0
- package/dist/cjs/api/resources/context/index.js +17 -0
- package/dist/cjs/api/resources/graph/client/Client.d.ts +9 -2
- package/dist/cjs/api/resources/graph/client/Client.js +9 -2
- package/dist/cjs/api/resources/graph/client/requests/AddTripleRequest.d.ts +2 -1
- package/dist/cjs/api/resources/graph/client/requests/GraphListAllRequest.d.ts +4 -1
- package/dist/cjs/api/resources/graph/client/requests/GraphListEntityTypesRequest.d.ts +4 -1
- package/dist/cjs/api/resources/graph/resources/episode/client/Client.d.ts +6 -2
- package/dist/cjs/api/resources/graph/resources/episode/client/Client.js +6 -2
- package/dist/cjs/api/resources/graph/resources/episode/client/requests/EpisodeGetByGraphIdRequest.d.ts +3 -1
- package/dist/cjs/api/resources/graph/resources/episode/client/requests/EpisodeGetByUserIdRequest.d.ts +3 -1
- package/dist/cjs/api/resources/index.d.ts +3 -0
- package/dist/cjs/api/resources/index.js +4 -1
- package/dist/cjs/api/resources/task/client/Client.d.ts +48 -0
- package/dist/cjs/api/resources/task/client/Client.js +148 -0
- package/dist/cjs/api/resources/task/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/task/client/index.js +2 -0
- package/dist/cjs/api/resources/task/index.d.ts +1 -0
- package/dist/cjs/api/resources/task/index.js +17 -0
- package/dist/cjs/api/resources/thread/client/Client.d.ts +16 -3
- package/dist/cjs/api/resources/thread/client/Client.js +20 -4
- package/dist/cjs/api/resources/thread/client/requests/ThreadGetRequest.d.ts +5 -1
- package/dist/cjs/api/resources/thread/client/requests/ThreadGetUserContextRequest.d.ts +10 -2
- package/dist/cjs/api/resources/thread/client/requests/ThreadListAllRequest.d.ts +6 -1
- package/dist/cjs/api/resources/user/client/Client.d.ts +7 -2
- package/dist/cjs/api/resources/user/client/Client.js +7 -2
- package/dist/cjs/api/resources/user/client/requests/UserListOrderedRequest.d.ts +4 -1
- package/dist/cjs/api/resources/user/client/requests/UserListUserSummaryInstructionsRequest.d.ts +3 -1
- package/dist/cjs/api/types/AddThreadMessagesResponse.d.ts +1 -0
- package/dist/cjs/api/types/AddTripleResponse.d.ts +2 -0
- package/dist/cjs/api/types/CloneGraphResponse.d.ts +2 -0
- package/dist/cjs/api/types/ContextTemplateResponse.d.ts +11 -0
- package/dist/cjs/api/types/ContextTemplateResponse.js +5 -0
- package/dist/cjs/api/types/Episode.d.ts +2 -0
- package/dist/cjs/api/types/GetTaskResponse.d.ts +15 -0
- package/dist/cjs/api/types/GetTaskResponse.js +5 -0
- package/dist/cjs/api/types/ListContextTemplatesResponse.d.ts +7 -0
- package/dist/cjs/api/types/ListContextTemplatesResponse.js +5 -0
- package/dist/cjs/api/types/TaskErrorResponse.d.ts +8 -0
- package/dist/cjs/api/types/TaskErrorResponse.js +5 -0
- package/dist/cjs/api/types/TaskProgress.d.ts +7 -0
- package/dist/cjs/api/types/TaskProgress.js +5 -0
- package/dist/cjs/api/types/index.d.ts +5 -0
- package/dist/cjs/api/types/index.js +5 -0
- package/dist/cjs/serialization/resources/context/client/index.d.ts +1 -0
- package/dist/cjs/serialization/resources/context/client/index.js +17 -0
- package/dist/cjs/serialization/resources/context/client/requests/CreateContextTemplateRequest.d.ts +13 -0
- package/dist/cjs/serialization/resources/context/client/requests/CreateContextTemplateRequest.js +44 -0
- package/dist/cjs/serialization/resources/context/client/requests/UpdateContextTemplateRequest.d.ts +12 -0
- package/dist/cjs/serialization/resources/context/client/requests/UpdateContextTemplateRequest.js +43 -0
- package/dist/cjs/serialization/resources/context/client/requests/index.d.ts +2 -0
- package/dist/cjs/serialization/resources/context/client/requests/index.js +7 -0
- package/dist/cjs/serialization/resources/context/index.d.ts +1 -0
- package/dist/cjs/serialization/resources/context/index.js +17 -0
- package/dist/cjs/serialization/resources/graph/client/requests/AddTripleRequest.d.ts +1 -1
- package/dist/cjs/serialization/resources/graph/client/requests/AddTripleRequest.js +1 -1
- package/dist/cjs/serialization/resources/index.d.ts +2 -0
- package/dist/cjs/serialization/resources/index.js +3 -1
- package/dist/cjs/serialization/types/AddThreadMessagesResponse.d.ts +1 -0
- package/dist/cjs/serialization/types/AddThreadMessagesResponse.js +1 -0
- package/dist/cjs/serialization/types/AddTripleResponse.d.ts +1 -0
- package/dist/cjs/serialization/types/AddTripleResponse.js +1 -0
- package/dist/cjs/serialization/types/CloneGraphResponse.d.ts +1 -0
- package/dist/cjs/serialization/types/CloneGraphResponse.js +1 -0
- package/dist/cjs/serialization/types/ContextTemplateResponse.d.ts +14 -0
- package/dist/cjs/serialization/types/ContextTemplateResponse.js +45 -0
- package/dist/cjs/serialization/types/Episode.d.ts +1 -0
- package/dist/cjs/serialization/types/Episode.js +1 -0
- package/dist/cjs/serialization/types/GetTaskResponse.d.ts +22 -0
- package/dist/cjs/serialization/types/GetTaskResponse.js +53 -0
- package/dist/cjs/serialization/types/ListContextTemplatesResponse.d.ts +13 -0
- package/dist/cjs/serialization/types/ListContextTemplatesResponse.js +44 -0
- package/dist/cjs/serialization/types/TaskErrorResponse.d.ts +14 -0
- package/dist/cjs/serialization/types/TaskErrorResponse.js +45 -0
- package/dist/cjs/serialization/types/TaskProgress.d.ts +13 -0
- package/dist/cjs/serialization/types/TaskProgress.js +44 -0
- package/dist/cjs/serialization/types/index.d.ts +5 -0
- package/dist/cjs/serialization/types/index.js +5 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.d.mts +6 -0
- package/dist/esm/Client.mjs +12 -2
- package/dist/esm/api/errors/index.d.mts +1 -1
- package/dist/esm/api/errors/index.mjs +1 -1
- package/dist/esm/api/resources/context/client/Client.d.mts +112 -0
- package/dist/esm/api/resources/context/client/Client.mjs +479 -0
- package/dist/esm/api/resources/context/client/index.d.mts +2 -0
- package/dist/esm/api/resources/context/client/index.mjs +1 -0
- package/dist/esm/api/resources/context/client/requests/CreateContextTemplateRequest.d.mts +16 -0
- package/dist/esm/api/resources/context/client/requests/CreateContextTemplateRequest.mjs +4 -0
- package/dist/esm/api/resources/context/client/requests/UpdateContextTemplateRequest.d.mts +13 -0
- package/dist/esm/api/resources/context/client/requests/UpdateContextTemplateRequest.mjs +4 -0
- package/dist/esm/api/resources/context/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/context/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/context/index.d.mts +1 -0
- package/dist/esm/api/resources/context/index.mjs +1 -0
- package/dist/esm/api/resources/graph/client/Client.d.mts +9 -2
- package/dist/esm/api/resources/graph/client/Client.mjs +9 -2
- package/dist/esm/api/resources/graph/client/requests/AddTripleRequest.d.mts +2 -1
- package/dist/esm/api/resources/graph/client/requests/GraphListAllRequest.d.mts +4 -1
- package/dist/esm/api/resources/graph/client/requests/GraphListEntityTypesRequest.d.mts +4 -1
- package/dist/esm/api/resources/graph/resources/episode/client/Client.d.mts +6 -2
- package/dist/esm/api/resources/graph/resources/episode/client/Client.mjs +6 -2
- package/dist/esm/api/resources/graph/resources/episode/client/requests/EpisodeGetByGraphIdRequest.d.mts +3 -1
- package/dist/esm/api/resources/graph/resources/episode/client/requests/EpisodeGetByUserIdRequest.d.mts +3 -1
- package/dist/esm/api/resources/index.d.mts +3 -0
- package/dist/esm/api/resources/index.mjs +3 -0
- package/dist/esm/api/resources/task/client/Client.d.mts +48 -0
- package/dist/esm/api/resources/task/client/Client.mjs +111 -0
- package/dist/esm/api/resources/task/client/index.d.mts +1 -0
- package/dist/esm/api/resources/task/client/index.mjs +1 -0
- package/dist/esm/api/resources/task/index.d.mts +1 -0
- package/dist/esm/api/resources/task/index.mjs +1 -0
- package/dist/esm/api/resources/thread/client/Client.d.mts +16 -3
- package/dist/esm/api/resources/thread/client/Client.mjs +20 -4
- package/dist/esm/api/resources/thread/client/requests/ThreadGetRequest.d.mts +5 -1
- package/dist/esm/api/resources/thread/client/requests/ThreadGetUserContextRequest.d.mts +10 -2
- package/dist/esm/api/resources/thread/client/requests/ThreadListAllRequest.d.mts +6 -1
- package/dist/esm/api/resources/user/client/Client.d.mts +7 -2
- package/dist/esm/api/resources/user/client/Client.mjs +7 -2
- package/dist/esm/api/resources/user/client/requests/UserListOrderedRequest.d.mts +4 -1
- package/dist/esm/api/resources/user/client/requests/UserListUserSummaryInstructionsRequest.d.mts +3 -1
- package/dist/esm/api/types/AddThreadMessagesResponse.d.mts +1 -0
- package/dist/esm/api/types/AddTripleResponse.d.mts +2 -0
- package/dist/esm/api/types/CloneGraphResponse.d.mts +2 -0
- package/dist/esm/api/types/ContextTemplateResponse.d.mts +11 -0
- package/dist/esm/api/types/ContextTemplateResponse.mjs +4 -0
- package/dist/esm/api/types/Episode.d.mts +2 -0
- package/dist/esm/api/types/GetTaskResponse.d.mts +15 -0
- package/dist/esm/api/types/GetTaskResponse.mjs +4 -0
- package/dist/esm/api/types/ListContextTemplatesResponse.d.mts +7 -0
- package/dist/esm/api/types/ListContextTemplatesResponse.mjs +4 -0
- package/dist/esm/api/types/TaskErrorResponse.d.mts +8 -0
- package/dist/esm/api/types/TaskErrorResponse.mjs +4 -0
- package/dist/esm/api/types/TaskProgress.d.mts +7 -0
- package/dist/esm/api/types/TaskProgress.mjs +4 -0
- package/dist/esm/api/types/index.d.mts +5 -0
- package/dist/esm/api/types/index.mjs +5 -0
- package/dist/esm/serialization/resources/context/client/index.d.mts +1 -0
- package/dist/esm/serialization/resources/context/client/index.mjs +1 -0
- package/dist/esm/serialization/resources/context/client/requests/CreateContextTemplateRequest.d.mts +13 -0
- package/dist/esm/serialization/resources/context/client/requests/CreateContextTemplateRequest.mjs +8 -0
- package/dist/esm/serialization/resources/context/client/requests/UpdateContextTemplateRequest.d.mts +12 -0
- package/dist/esm/serialization/resources/context/client/requests/UpdateContextTemplateRequest.mjs +7 -0
- package/dist/esm/serialization/resources/context/client/requests/index.d.mts +2 -0
- package/dist/esm/serialization/resources/context/client/requests/index.mjs +2 -0
- package/dist/esm/serialization/resources/context/index.d.mts +1 -0
- package/dist/esm/serialization/resources/context/index.mjs +1 -0
- package/dist/esm/serialization/resources/graph/client/requests/AddTripleRequest.d.mts +1 -1
- package/dist/esm/serialization/resources/graph/client/requests/AddTripleRequest.mjs +1 -1
- package/dist/esm/serialization/resources/index.d.mts +2 -0
- package/dist/esm/serialization/resources/index.mjs +2 -0
- package/dist/esm/serialization/types/AddThreadMessagesResponse.d.mts +1 -0
- package/dist/esm/serialization/types/AddThreadMessagesResponse.mjs +1 -0
- package/dist/esm/serialization/types/AddTripleResponse.d.mts +1 -0
- package/dist/esm/serialization/types/AddTripleResponse.mjs +1 -0
- package/dist/esm/serialization/types/CloneGraphResponse.d.mts +1 -0
- package/dist/esm/serialization/types/CloneGraphResponse.mjs +1 -0
- package/dist/esm/serialization/types/ContextTemplateResponse.d.mts +14 -0
- package/dist/esm/serialization/types/ContextTemplateResponse.mjs +9 -0
- package/dist/esm/serialization/types/Episode.d.mts +1 -0
- package/dist/esm/serialization/types/Episode.mjs +1 -0
- package/dist/esm/serialization/types/GetTaskResponse.d.mts +22 -0
- package/dist/esm/serialization/types/GetTaskResponse.mjs +17 -0
- package/dist/esm/serialization/types/ListContextTemplatesResponse.d.mts +13 -0
- package/dist/esm/serialization/types/ListContextTemplatesResponse.mjs +8 -0
- package/dist/esm/serialization/types/TaskErrorResponse.d.mts +14 -0
- package/dist/esm/serialization/types/TaskErrorResponse.mjs +9 -0
- package/dist/esm/serialization/types/TaskProgress.d.mts +13 -0
- package/dist/esm/serialization/types/TaskProgress.mjs +8 -0
- package/dist/esm/serialization/types/index.d.mts +5 -0
- package/dist/esm/serialization/types/index.mjs +5 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +425 -9
|
@@ -39,7 +39,9 @@ export declare class Episode {
|
|
|
39
39
|
* @throws {@link Zep.InternalServerError}
|
|
40
40
|
*
|
|
41
41
|
* @example
|
|
42
|
-
* await client.graph.episode.getByGraphId("graph_id"
|
|
42
|
+
* await client.graph.episode.getByGraphId("graph_id", {
|
|
43
|
+
* lastn: 1
|
|
44
|
+
* })
|
|
43
45
|
*/
|
|
44
46
|
getByGraphId(graphId: string, request?: Zep.graph.EpisodeGetByGraphIdRequest, requestOptions?: Episode.RequestOptions): core.HttpResponsePromise<Zep.EpisodeResponse>;
|
|
45
47
|
private __getByGraphId;
|
|
@@ -54,7 +56,9 @@ export declare class Episode {
|
|
|
54
56
|
* @throws {@link Zep.InternalServerError}
|
|
55
57
|
*
|
|
56
58
|
* @example
|
|
57
|
-
* await client.graph.episode.getByUserId("user_id"
|
|
59
|
+
* await client.graph.episode.getByUserId("user_id", {
|
|
60
|
+
* lastn: 1
|
|
61
|
+
* })
|
|
58
62
|
*/
|
|
59
63
|
getByUserId(userId: string, request?: Zep.graph.EpisodeGetByUserIdRequest, requestOptions?: Episode.RequestOptions): core.HttpResponsePromise<Zep.EpisodeResponse>;
|
|
60
64
|
private __getByUserId;
|
|
@@ -31,7 +31,9 @@ export class Episode {
|
|
|
31
31
|
* @throws {@link Zep.InternalServerError}
|
|
32
32
|
*
|
|
33
33
|
* @example
|
|
34
|
-
* await client.graph.episode.getByGraphId("graph_id"
|
|
34
|
+
* await client.graph.episode.getByGraphId("graph_id", {
|
|
35
|
+
* lastn: 1
|
|
36
|
+
* })
|
|
35
37
|
*/
|
|
36
38
|
getByGraphId(graphId, request = {}, requestOptions) {
|
|
37
39
|
return core.HttpResponsePromise.fromPromise(this.__getByGraphId(graphId, request, requestOptions));
|
|
@@ -119,7 +121,9 @@ export class Episode {
|
|
|
119
121
|
* @throws {@link Zep.InternalServerError}
|
|
120
122
|
*
|
|
121
123
|
* @example
|
|
122
|
-
* await client.graph.episode.getByUserId("user_id"
|
|
124
|
+
* await client.graph.episode.getByUserId("user_id", {
|
|
125
|
+
* lastn: 1
|
|
126
|
+
* })
|
|
123
127
|
*/
|
|
124
128
|
getByUserId(userId, request = {}, requestOptions) {
|
|
125
129
|
return core.HttpResponsePromise.fromPromise(this.__getByUserId(userId, request, requestOptions));
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
export * as thread from "./thread/index.mjs";
|
|
2
2
|
export * from "./thread/types/index.mjs";
|
|
3
|
+
export * as context from "./context/index.mjs";
|
|
3
4
|
export * as graph from "./graph/index.mjs";
|
|
4
5
|
export * as project from "./project/index.mjs";
|
|
6
|
+
export * as task from "./task/index.mjs";
|
|
5
7
|
export * as user from "./user/index.mjs";
|
|
8
|
+
export * from "./context/client/requests/index.mjs";
|
|
6
9
|
export * from "./graph/client/requests/index.mjs";
|
|
7
10
|
export * from "./thread/client/requests/index.mjs";
|
|
8
11
|
export * from "./user/client/requests/index.mjs";
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
export * as thread from "./thread/index.mjs";
|
|
2
2
|
export * from "./thread/types/index.mjs";
|
|
3
|
+
export * as context from "./context/index.mjs";
|
|
3
4
|
export * as graph from "./graph/index.mjs";
|
|
4
5
|
export * as project from "./project/index.mjs";
|
|
6
|
+
export * as task from "./task/index.mjs";
|
|
5
7
|
export * as user from "./user/index.mjs";
|
|
8
|
+
export * from "./context/client/requests/index.mjs";
|
|
6
9
|
export * from "./graph/client/requests/index.mjs";
|
|
7
10
|
export * from "./thread/client/requests/index.mjs";
|
|
8
11
|
export * from "./user/client/requests/index.mjs";
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../environments.mjs";
|
|
5
|
+
import * as core from "../../../../core/index.mjs";
|
|
6
|
+
import * as Zep from "../../../index.mjs";
|
|
7
|
+
export declare namespace Task {
|
|
8
|
+
interface Options {
|
|
9
|
+
environment?: core.Supplier<environments.ZepEnvironment | string>;
|
|
10
|
+
/** Specify a custom URL to connect the client to. */
|
|
11
|
+
baseUrl?: core.Supplier<string>;
|
|
12
|
+
apiKey?: core.Supplier<string | undefined>;
|
|
13
|
+
/** Additional headers to include in requests. */
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
15
|
+
fetcher?: core.FetchFunction;
|
|
16
|
+
}
|
|
17
|
+
interface RequestOptions {
|
|
18
|
+
/** The maximum time to wait for a response in seconds. */
|
|
19
|
+
timeoutInSeconds?: number;
|
|
20
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
21
|
+
maxRetries?: number;
|
|
22
|
+
/** A hook to abort the request. */
|
|
23
|
+
abortSignal?: AbortSignal;
|
|
24
|
+
/** Additional headers to include in the request. */
|
|
25
|
+
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
export declare class Task {
|
|
29
|
+
protected readonly _options: Task.Options;
|
|
30
|
+
constructor(_options?: Task.Options);
|
|
31
|
+
/**
|
|
32
|
+
* Gets a task by its ID
|
|
33
|
+
*
|
|
34
|
+
* @param {string} taskId - Task ID
|
|
35
|
+
* @param {Task.RequestOptions} requestOptions - Request-specific configuration.
|
|
36
|
+
*
|
|
37
|
+
* @throws {@link Zep.NotFoundError}
|
|
38
|
+
* @throws {@link Zep.InternalServerError}
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* await client.task.get("task_id")
|
|
42
|
+
*/
|
|
43
|
+
get(taskId: string, requestOptions?: Task.RequestOptions): core.HttpResponsePromise<Zep.GetTaskResponse>;
|
|
44
|
+
private __get;
|
|
45
|
+
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
46
|
+
Authorization: string;
|
|
47
|
+
}>;
|
|
48
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
5
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
6
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
7
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
8
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
9
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
10
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
import * as environments from "../../../../environments.mjs";
|
|
14
|
+
import * as core from "../../../../core/index.mjs";
|
|
15
|
+
import * as Zep from "../../../index.mjs";
|
|
16
|
+
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
|
|
17
|
+
import * as serializers from "../../../../serialization/index.mjs";
|
|
18
|
+
import * as errors from "../../../../errors/index.mjs";
|
|
19
|
+
export class Task {
|
|
20
|
+
constructor(_options = {}) {
|
|
21
|
+
this._options = _options;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Gets a task by its ID
|
|
25
|
+
*
|
|
26
|
+
* @param {string} taskId - Task ID
|
|
27
|
+
* @param {Task.RequestOptions} requestOptions - Request-specific configuration.
|
|
28
|
+
*
|
|
29
|
+
* @throws {@link Zep.NotFoundError}
|
|
30
|
+
* @throws {@link Zep.InternalServerError}
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* await client.task.get("task_id")
|
|
34
|
+
*/
|
|
35
|
+
get(taskId, requestOptions) {
|
|
36
|
+
return core.HttpResponsePromise.fromPromise(this.__get(taskId, requestOptions));
|
|
37
|
+
}
|
|
38
|
+
__get(taskId, requestOptions) {
|
|
39
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
var _a, _b, _c, _d;
|
|
41
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
42
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ZepEnvironment.Default, `tasks/${encodeURIComponent(taskId)}`),
|
|
43
|
+
method: "GET",
|
|
44
|
+
headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
45
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
46
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
47
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
48
|
+
});
|
|
49
|
+
if (_response.ok) {
|
|
50
|
+
return {
|
|
51
|
+
data: serializers.GetTaskResponse.parseOrThrow(_response.body, {
|
|
52
|
+
unrecognizedObjectKeys: "passthrough",
|
|
53
|
+
allowUnrecognizedUnionMembers: true,
|
|
54
|
+
allowUnrecognizedEnumValues: true,
|
|
55
|
+
skipValidation: true,
|
|
56
|
+
breadcrumbsPrefix: ["response"],
|
|
57
|
+
}),
|
|
58
|
+
rawResponse: _response.rawResponse,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
if (_response.error.reason === "status-code") {
|
|
62
|
+
switch (_response.error.statusCode) {
|
|
63
|
+
case 404:
|
|
64
|
+
throw new Zep.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
65
|
+
unrecognizedObjectKeys: "passthrough",
|
|
66
|
+
allowUnrecognizedUnionMembers: true,
|
|
67
|
+
allowUnrecognizedEnumValues: true,
|
|
68
|
+
skipValidation: true,
|
|
69
|
+
breadcrumbsPrefix: ["response"],
|
|
70
|
+
}), _response.rawResponse);
|
|
71
|
+
case 500:
|
|
72
|
+
throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
73
|
+
unrecognizedObjectKeys: "passthrough",
|
|
74
|
+
allowUnrecognizedUnionMembers: true,
|
|
75
|
+
allowUnrecognizedEnumValues: true,
|
|
76
|
+
skipValidation: true,
|
|
77
|
+
breadcrumbsPrefix: ["response"],
|
|
78
|
+
}), _response.rawResponse);
|
|
79
|
+
default:
|
|
80
|
+
throw new errors.ZepError({
|
|
81
|
+
statusCode: _response.error.statusCode,
|
|
82
|
+
body: _response.error.body,
|
|
83
|
+
rawResponse: _response.rawResponse,
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
switch (_response.error.reason) {
|
|
88
|
+
case "non-json":
|
|
89
|
+
throw new errors.ZepError({
|
|
90
|
+
statusCode: _response.error.statusCode,
|
|
91
|
+
body: _response.error.rawBody,
|
|
92
|
+
rawResponse: _response.rawResponse,
|
|
93
|
+
});
|
|
94
|
+
case "timeout":
|
|
95
|
+
throw new errors.ZepTimeoutError("Timeout exceeded when calling GET /tasks/{task_id}.");
|
|
96
|
+
case "unknown":
|
|
97
|
+
throw new errors.ZepError({
|
|
98
|
+
message: _response.error.errorMessage,
|
|
99
|
+
rawResponse: _response.rawResponse,
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
_getCustomAuthorizationHeaders() {
|
|
105
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
106
|
+
var _a;
|
|
107
|
+
const apiKeyValue = (_a = (yield core.Supplier.get(this._options.apiKey))) !== null && _a !== void 0 ? _a : process === null || process === void 0 ? void 0 : process.env["ZEP_API_KEY"];
|
|
108
|
+
return { Authorization: `Api-Key ${apiKeyValue}` };
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
|
@@ -41,7 +41,12 @@ export declare class Thread {
|
|
|
41
41
|
* @throws {@link Zep.InternalServerError}
|
|
42
42
|
*
|
|
43
43
|
* @example
|
|
44
|
-
* await client.thread.listAll(
|
|
44
|
+
* await client.thread.listAll({
|
|
45
|
+
* pageNumber: 1,
|
|
46
|
+
* pageSize: 1,
|
|
47
|
+
* orderBy: "order_by",
|
|
48
|
+
* asc: true
|
|
49
|
+
* })
|
|
45
50
|
*/
|
|
46
51
|
listAll(request?: Zep.ThreadListAllRequest, requestOptions?: Thread.RequestOptions): core.HttpResponsePromise<Zep.ThreadListResponse>;
|
|
47
52
|
private __listAll;
|
|
@@ -87,7 +92,11 @@ export declare class Thread {
|
|
|
87
92
|
* @throws {@link Zep.InternalServerError}
|
|
88
93
|
*
|
|
89
94
|
* @example
|
|
90
|
-
* await client.thread.getUserContext("threadId"
|
|
95
|
+
* await client.thread.getUserContext("threadId", {
|
|
96
|
+
* minRating: 1.1,
|
|
97
|
+
* templateId: "template_id",
|
|
98
|
+
* mode: "basic"
|
|
99
|
+
* })
|
|
91
100
|
*/
|
|
92
101
|
getUserContext(threadId: string, request?: Zep.ThreadGetUserContextRequest, requestOptions?: Thread.RequestOptions): core.HttpResponsePromise<Zep.ThreadContextResponse>;
|
|
93
102
|
private __getUserContext;
|
|
@@ -102,7 +111,11 @@ export declare class Thread {
|
|
|
102
111
|
* @throws {@link Zep.InternalServerError}
|
|
103
112
|
*
|
|
104
113
|
* @example
|
|
105
|
-
* await client.thread.get("threadId"
|
|
114
|
+
* await client.thread.get("threadId", {
|
|
115
|
+
* limit: 1,
|
|
116
|
+
* cursor: 1,
|
|
117
|
+
* lastn: 1
|
|
118
|
+
* })
|
|
106
119
|
*/
|
|
107
120
|
get(threadId: string, request?: Zep.ThreadGetRequest, requestOptions?: Thread.RequestOptions): core.HttpResponsePromise<Zep.MessageListResponse>;
|
|
108
121
|
private __get;
|
|
@@ -35,7 +35,12 @@ export class Thread {
|
|
|
35
35
|
* @throws {@link Zep.InternalServerError}
|
|
36
36
|
*
|
|
37
37
|
* @example
|
|
38
|
-
* await client.thread.listAll(
|
|
38
|
+
* await client.thread.listAll({
|
|
39
|
+
* pageNumber: 1,
|
|
40
|
+
* pageSize: 1,
|
|
41
|
+
* orderBy: "order_by",
|
|
42
|
+
* asc: true
|
|
43
|
+
* })
|
|
39
44
|
*/
|
|
40
45
|
listAll(request = {}, requestOptions) {
|
|
41
46
|
return core.HttpResponsePromise.fromPromise(this.__listAll(request, requestOptions));
|
|
@@ -303,7 +308,11 @@ export class Thread {
|
|
|
303
308
|
* @throws {@link Zep.InternalServerError}
|
|
304
309
|
*
|
|
305
310
|
* @example
|
|
306
|
-
* await client.thread.getUserContext("threadId"
|
|
311
|
+
* await client.thread.getUserContext("threadId", {
|
|
312
|
+
* minRating: 1.1,
|
|
313
|
+
* templateId: "template_id",
|
|
314
|
+
* mode: "basic"
|
|
315
|
+
* })
|
|
307
316
|
*/
|
|
308
317
|
getUserContext(threadId, request = {}, requestOptions) {
|
|
309
318
|
return core.HttpResponsePromise.fromPromise(this.__getUserContext(threadId, request, requestOptions));
|
|
@@ -311,11 +320,14 @@ export class Thread {
|
|
|
311
320
|
__getUserContext(threadId_1) {
|
|
312
321
|
return __awaiter(this, arguments, void 0, function* (threadId, request = {}, requestOptions) {
|
|
313
322
|
var _a, _b, _c, _d;
|
|
314
|
-
const { minRating, mode } = request;
|
|
323
|
+
const { minRating, templateId, mode } = request;
|
|
315
324
|
const _queryParams = {};
|
|
316
325
|
if (minRating != null) {
|
|
317
326
|
_queryParams["minRating"] = minRating.toString();
|
|
318
327
|
}
|
|
328
|
+
if (templateId != null) {
|
|
329
|
+
_queryParams["template_id"] = templateId;
|
|
330
|
+
}
|
|
319
331
|
if (mode != null) {
|
|
320
332
|
_queryParams["mode"] = serializers.ThreadGetUserContextRequestMode.jsonOrThrow(mode, {
|
|
321
333
|
unrecognizedObjectKeys: "strip",
|
|
@@ -397,7 +409,11 @@ export class Thread {
|
|
|
397
409
|
* @throws {@link Zep.InternalServerError}
|
|
398
410
|
*
|
|
399
411
|
* @example
|
|
400
|
-
* await client.thread.get("threadId"
|
|
412
|
+
* await client.thread.get("threadId", {
|
|
413
|
+
* limit: 1,
|
|
414
|
+
* cursor: 1,
|
|
415
|
+
* lastn: 1
|
|
416
|
+
* })
|
|
401
417
|
*/
|
|
402
418
|
get(threadId, request = {}, requestOptions) {
|
|
403
419
|
return core.HttpResponsePromise.fromPromise(this.__get(threadId, request, requestOptions));
|
|
@@ -4,7 +4,11 @@
|
|
|
4
4
|
import * as Zep from "../../../../index.mjs";
|
|
5
5
|
/**
|
|
6
6
|
* @example
|
|
7
|
-
* {
|
|
7
|
+
* {
|
|
8
|
+
* minRating: 1.1,
|
|
9
|
+
* templateId: "template_id",
|
|
10
|
+
* mode: "basic"
|
|
11
|
+
* }
|
|
8
12
|
*/
|
|
9
13
|
export interface ThreadGetUserContextRequest {
|
|
10
14
|
/**
|
|
@@ -12,7 +16,11 @@ export interface ThreadGetUserContextRequest {
|
|
|
12
16
|
*/
|
|
13
17
|
minRating?: number;
|
|
14
18
|
/**
|
|
15
|
-
*
|
|
19
|
+
* Optional template ID to use for custom context rendering.
|
|
20
|
+
*/
|
|
21
|
+
templateId?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Deprecated, this field will be removed in a future release. Defaults to summary mode. Use basic for lower latency
|
|
16
24
|
*/
|
|
17
25
|
mode?: Zep.ThreadGetUserContextRequestMode;
|
|
18
26
|
}
|
|
@@ -38,7 +38,9 @@ export declare class User {
|
|
|
38
38
|
* @throws {@link Zep.InternalServerError}
|
|
39
39
|
*
|
|
40
40
|
* @example
|
|
41
|
-
* await client.user.listUserSummaryInstructions(
|
|
41
|
+
* await client.user.listUserSummaryInstructions({
|
|
42
|
+
* userId: "user_id"
|
|
43
|
+
* })
|
|
42
44
|
*/
|
|
43
45
|
listUserSummaryInstructions(request?: Zep.UserListUserSummaryInstructionsRequest, requestOptions?: User.RequestOptions): core.HttpResponsePromise<Zep.ListUserInstructionsResponse>;
|
|
44
46
|
private __listUserSummaryInstructions;
|
|
@@ -101,7 +103,10 @@ export declare class User {
|
|
|
101
103
|
* @throws {@link Zep.InternalServerError}
|
|
102
104
|
*
|
|
103
105
|
* @example
|
|
104
|
-
* await client.user.listOrdered(
|
|
106
|
+
* await client.user.listOrdered({
|
|
107
|
+
* pageNumber: 1,
|
|
108
|
+
* pageSize: 1
|
|
109
|
+
* })
|
|
105
110
|
*/
|
|
106
111
|
listOrdered(request?: Zep.UserListOrderedRequest, requestOptions?: User.RequestOptions): core.HttpResponsePromise<Zep.UserListResponse>;
|
|
107
112
|
private __listOrdered;
|
|
@@ -30,7 +30,9 @@ export class User {
|
|
|
30
30
|
* @throws {@link Zep.InternalServerError}
|
|
31
31
|
*
|
|
32
32
|
* @example
|
|
33
|
-
* await client.user.listUserSummaryInstructions(
|
|
33
|
+
* await client.user.listUserSummaryInstructions({
|
|
34
|
+
* userId: "user_id"
|
|
35
|
+
* })
|
|
34
36
|
*/
|
|
35
37
|
listUserSummaryInstructions(request = {}, requestOptions) {
|
|
36
38
|
return core.HttpResponsePromise.fromPromise(this.__listUserSummaryInstructions(request, requestOptions));
|
|
@@ -385,7 +387,10 @@ export class User {
|
|
|
385
387
|
* @throws {@link Zep.InternalServerError}
|
|
386
388
|
*
|
|
387
389
|
* @example
|
|
388
|
-
* await client.user.listOrdered(
|
|
390
|
+
* await client.user.listOrdered({
|
|
391
|
+
* pageNumber: 1,
|
|
392
|
+
* pageSize: 1
|
|
393
|
+
* })
|
|
389
394
|
*/
|
|
390
395
|
listOrdered(request = {}, requestOptions) {
|
|
391
396
|
return core.HttpResponsePromise.fromPromise(this.__listOrdered(request, requestOptions));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export interface ContextTemplateResponse {
|
|
5
|
+
/** The template content. */
|
|
6
|
+
template?: string;
|
|
7
|
+
/** Unique identifier for the template (max 100 characters). */
|
|
8
|
+
templateId?: string;
|
|
9
|
+
/** Unique identifier for the template. */
|
|
10
|
+
uuid?: string;
|
|
11
|
+
}
|
|
@@ -20,6 +20,8 @@ export interface Episode {
|
|
|
20
20
|
score?: number;
|
|
21
21
|
source?: Zep.GraphDataType;
|
|
22
22
|
sourceDescription?: string;
|
|
23
|
+
/** Optional task ID to poll episode processing status. Currently only available for batch ingestion. */
|
|
24
|
+
taskId?: string;
|
|
23
25
|
/** Optional thread ID, will be present if the episode is part of a thread */
|
|
24
26
|
threadId?: string;
|
|
25
27
|
uuid: string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Zep from "../index.mjs";
|
|
5
|
+
export interface GetTaskResponse {
|
|
6
|
+
completedAt?: string;
|
|
7
|
+
createdAt?: string;
|
|
8
|
+
error?: Zep.TaskErrorResponse;
|
|
9
|
+
progress?: Zep.TaskProgress;
|
|
10
|
+
startedAt?: string;
|
|
11
|
+
status?: string;
|
|
12
|
+
taskId?: string;
|
|
13
|
+
type?: string;
|
|
14
|
+
updatedAt?: string;
|
|
15
|
+
}
|
|
@@ -2,6 +2,7 @@ export * from "./ApiError.mjs";
|
|
|
2
2
|
export * from "./AddThreadMessagesRequest.mjs";
|
|
3
3
|
export * from "./AddThreadMessagesResponse.mjs";
|
|
4
4
|
export * from "./CloneGraphResponse.mjs";
|
|
5
|
+
export * from "./ContextTemplateResponse.mjs";
|
|
5
6
|
export * from "./EdgeType.mjs";
|
|
6
7
|
export * from "./EntityEdgeSourceTarget.mjs";
|
|
7
8
|
export * from "./EntityProperty.mjs";
|
|
@@ -11,6 +12,7 @@ export * from "./EpisodeData.mjs";
|
|
|
11
12
|
export * from "./EpisodeMentions.mjs";
|
|
12
13
|
export * from "./FactRatingExamples.mjs";
|
|
13
14
|
export * from "./FactRatingInstruction.mjs";
|
|
15
|
+
export * from "./GetTaskResponse.mjs";
|
|
14
16
|
export * from "./Graph.mjs";
|
|
15
17
|
export * from "./GraphEdgesRequest.mjs";
|
|
16
18
|
export * from "./Episode.mjs";
|
|
@@ -18,11 +20,14 @@ export * from "./EpisodeResponse.mjs";
|
|
|
18
20
|
export * from "./GraphListResponse.mjs";
|
|
19
21
|
export * from "./GraphNodesRequest.mjs";
|
|
20
22
|
export * from "./GraphSearchResults.mjs";
|
|
23
|
+
export * from "./ListContextTemplatesResponse.mjs";
|
|
21
24
|
export * from "./ListUserInstructionsResponse.mjs";
|
|
22
25
|
export * from "./ProjectInfo.mjs";
|
|
23
26
|
export * from "./ProjectInfoResponse.mjs";
|
|
24
27
|
export * from "./RoleType.mjs";
|
|
25
28
|
export * from "./SuccessResponse.mjs";
|
|
29
|
+
export * from "./TaskErrorResponse.mjs";
|
|
30
|
+
export * from "./TaskProgress.mjs";
|
|
26
31
|
export * from "./Thread.mjs";
|
|
27
32
|
export * from "./ThreadContextResponse.mjs";
|
|
28
33
|
export * from "./ThreadListResponse.mjs";
|