@getzep/zep-cloud 2.14.0 → 2.14.1

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.
@@ -41,4 +41,43 @@ export declare class Graph extends BaseGraph {
41
41
  * });
42
42
  */
43
43
  setEntityTypes(entityTypes: Record<string, EntityType>, edgeTypes: Record<string, EdgeType>, requestOptions?: BaseGraph.RequestOptions): Promise<Zep.SuccessResponse>;
44
+ /**
45
+ * Sets the entity and edge types for a project, replacing any existing ones.
46
+ *
47
+ * @param {Record<string, EntityType>} entityTypes
48
+ * @param {Record<string, EdgeType>} edgeTypes
49
+ * @param {Graph.RequestOptions} requestOptions - Request-specific configuration.
50
+ *
51
+ * @throws {@link Zep.BadRequestError}
52
+ * @throws {@link Zep.InternalServerError}
53
+ *
54
+ * @example
55
+ * const travelDestinationSchema: EntityType = {
56
+ * description: "A travel destination entity",
57
+ * fields: {
58
+ * destination_name: entityFields.text("The name of travel destination"),
59
+ * },
60
+ * };
61
+ *
62
+ * const isTravelingTo: EdgeType = {
63
+ * description: "An edge representing a traveler going to a destination.",
64
+ * fields: {
65
+ * travel_date: entityFields.text("The date of the travel"),
66
+ * purpose: entityFields.text("The purpose of the travel"),
67
+ * },
68
+ * sourceTargets: [
69
+ * {
70
+ * source: "User",
71
+ * target: "TravelDestination",
72
+ * }
73
+ * ]
74
+ * }
75
+ *
76
+ * await client.graph.setOntology({
77
+ * TravelDestination: travelDestinationSchema,
78
+ * }, {
79
+ * IS_TRAVELING_TO: isTravelingTo,
80
+ * });
81
+ */
82
+ setOntology(entityTypes: Record<string, EntityType>, edgeTypes: Record<string, EdgeType>, requestOptions?: BaseGraph.RequestOptions): Promise<Zep.SuccessResponse>;
44
83
  }
@@ -67,5 +67,48 @@ class Graph extends Client_1.Graph {
67
67
  }, requestOptions);
68
68
  });
69
69
  }
70
+ /**
71
+ * Sets the entity and edge types for a project, replacing any existing ones.
72
+ *
73
+ * @param {Record<string, EntityType>} entityTypes
74
+ * @param {Record<string, EdgeType>} edgeTypes
75
+ * @param {Graph.RequestOptions} requestOptions - Request-specific configuration.
76
+ *
77
+ * @throws {@link Zep.BadRequestError}
78
+ * @throws {@link Zep.InternalServerError}
79
+ *
80
+ * @example
81
+ * const travelDestinationSchema: EntityType = {
82
+ * description: "A travel destination entity",
83
+ * fields: {
84
+ * destination_name: entityFields.text("The name of travel destination"),
85
+ * },
86
+ * };
87
+ *
88
+ * const isTravelingTo: EdgeType = {
89
+ * description: "An edge representing a traveler going to a destination.",
90
+ * fields: {
91
+ * travel_date: entityFields.text("The date of the travel"),
92
+ * purpose: entityFields.text("The purpose of the travel"),
93
+ * },
94
+ * sourceTargets: [
95
+ * {
96
+ * source: "User",
97
+ * target: "TravelDestination",
98
+ * }
99
+ * ]
100
+ * }
101
+ *
102
+ * await client.graph.setOntology({
103
+ * TravelDestination: travelDestinationSchema,
104
+ * }, {
105
+ * IS_TRAVELING_TO: isTravelingTo,
106
+ * });
107
+ */
108
+ setOntology(entityTypes, edgeTypes, requestOptions) {
109
+ return __awaiter(this, void 0, void 0, function* () {
110
+ return this.setEntityTypes(entityTypes, edgeTypes, requestOptions);
111
+ });
112
+ }
70
113
  }
71
114
  exports.Graph = Graph;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getzep/zep-cloud",
3
- "version": "2.14.0",
3
+ "version": "2.14.1",
4
4
  "private": false,
5
5
  "repository": "https://github.com/getzep/zep-js",
6
6
  "description": "Zep: Fast, scalable building blocks for production LLM apps",
@@ -41,4 +41,43 @@ export declare class Graph extends BaseGraph {
41
41
  * });
42
42
  */
43
43
  setEntityTypes(entityTypes: Record<string, EntityType>, edgeTypes: Record<string, EdgeType>, requestOptions?: BaseGraph.RequestOptions): Promise<Zep.SuccessResponse>;
44
+ /**
45
+ * Sets the entity and edge types for a project, replacing any existing ones.
46
+ *
47
+ * @param {Record<string, EntityType>} entityTypes
48
+ * @param {Record<string, EdgeType>} edgeTypes
49
+ * @param {Graph.RequestOptions} requestOptions - Request-specific configuration.
50
+ *
51
+ * @throws {@link Zep.BadRequestError}
52
+ * @throws {@link Zep.InternalServerError}
53
+ *
54
+ * @example
55
+ * const travelDestinationSchema: EntityType = {
56
+ * description: "A travel destination entity",
57
+ * fields: {
58
+ * destination_name: entityFields.text("The name of travel destination"),
59
+ * },
60
+ * };
61
+ *
62
+ * const isTravelingTo: EdgeType = {
63
+ * description: "An edge representing a traveler going to a destination.",
64
+ * fields: {
65
+ * travel_date: entityFields.text("The date of the travel"),
66
+ * purpose: entityFields.text("The purpose of the travel"),
67
+ * },
68
+ * sourceTargets: [
69
+ * {
70
+ * source: "User",
71
+ * target: "TravelDestination",
72
+ * }
73
+ * ]
74
+ * }
75
+ *
76
+ * await client.graph.setOntology({
77
+ * TravelDestination: travelDestinationSchema,
78
+ * }, {
79
+ * IS_TRAVELING_TO: isTravelingTo,
80
+ * });
81
+ */
82
+ setOntology(entityTypes: Record<string, EntityType>, edgeTypes: Record<string, EdgeType>, requestOptions?: BaseGraph.RequestOptions): Promise<Zep.SuccessResponse>;
44
83
  }
package/wrapper/graph.js CHANGED
@@ -67,5 +67,48 @@ class Graph extends Client_1.Graph {
67
67
  }, requestOptions);
68
68
  });
69
69
  }
70
+ /**
71
+ * Sets the entity and edge types for a project, replacing any existing ones.
72
+ *
73
+ * @param {Record<string, EntityType>} entityTypes
74
+ * @param {Record<string, EdgeType>} edgeTypes
75
+ * @param {Graph.RequestOptions} requestOptions - Request-specific configuration.
76
+ *
77
+ * @throws {@link Zep.BadRequestError}
78
+ * @throws {@link Zep.InternalServerError}
79
+ *
80
+ * @example
81
+ * const travelDestinationSchema: EntityType = {
82
+ * description: "A travel destination entity",
83
+ * fields: {
84
+ * destination_name: entityFields.text("The name of travel destination"),
85
+ * },
86
+ * };
87
+ *
88
+ * const isTravelingTo: EdgeType = {
89
+ * description: "An edge representing a traveler going to a destination.",
90
+ * fields: {
91
+ * travel_date: entityFields.text("The date of the travel"),
92
+ * purpose: entityFields.text("The purpose of the travel"),
93
+ * },
94
+ * sourceTargets: [
95
+ * {
96
+ * source: "User",
97
+ * target: "TravelDestination",
98
+ * }
99
+ * ]
100
+ * }
101
+ *
102
+ * await client.graph.setOntology({
103
+ * TravelDestination: travelDestinationSchema,
104
+ * }, {
105
+ * IS_TRAVELING_TO: isTravelingTo,
106
+ * });
107
+ */
108
+ setOntology(entityTypes, edgeTypes, requestOptions) {
109
+ return __awaiter(this, void 0, void 0, function* () {
110
+ return this.setEntityTypes(entityTypes, edgeTypes, requestOptions);
111
+ });
112
+ }
70
113
  }
71
114
  exports.Graph = Graph;