@usecortex_ai/node 0.3.5 → 0.3.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/dist/api/resources/userMemory/client/requests/AddUserMemoryRequest.d.ts +1 -1
- package/dist/api/types/ChunkGraphRelationsResponse.d.ts +13 -0
- package/dist/api/types/ChunkGraphRelationsResponse.js +5 -0
- package/dist/api/types/ExtendedContext.d.ts +0 -3
- package/dist/api/types/PathTriplet.d.ts +15 -0
- package/dist/api/types/PathTriplet.js +5 -0
- package/dist/api/types/RelationEvidence.d.ts +4 -5
- package/dist/api/types/RetrieveResponse.d.ts +2 -2
- package/dist/api/types/RetrieveUserMemoryResponse.d.ts +2 -2
- package/dist/api/types/ScoredPathResponse.d.ts +18 -0
- package/dist/api/types/ScoredPathResponse.js +5 -0
- package/dist/api/types/ScoredTripletResponse.d.ts +17 -0
- package/dist/api/types/ScoredTripletResponse.js +5 -0
- package/dist/api/types/SearchChunk.d.ts +2 -0
- package/dist/api/types/TripleWithEvidence.d.ts +0 -3
- package/dist/api/types/index.d.ts +4 -0
- package/dist/api/types/index.js +4 -0
- package/package.json +1 -1
|
@@ -14,7 +14,7 @@ export interface AddUserMemoryRequest {
|
|
|
14
14
|
tenant_id: string;
|
|
15
15
|
/** Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used. */
|
|
16
16
|
sub_tenant_id?: string;
|
|
17
|
-
/** Single raw text memory to store */
|
|
17
|
+
/** Single raw text memory to store. If both raw_text and user_assistant_pairs are provided, raw_text will be used. */
|
|
18
18
|
raw_text?: string;
|
|
19
19
|
/** Array of user/assistant conversation pairs to store as a single memory */
|
|
20
20
|
user_assistant_pairs?: CortexAI.UserAssistantPair[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as CortexAI from "../index.js";
|
|
5
|
+
/**
|
|
6
|
+
* Graph relations with group_id -> triplet mapping
|
|
7
|
+
*/
|
|
8
|
+
export interface ChunkGraphRelationsResponse {
|
|
9
|
+
/** Multi-hop paths connecting entities from the query, reranked by relevance. Each path is a chain of connected triplets. */
|
|
10
|
+
entity_paths?: CortexAI.ScoredPathResponse[];
|
|
11
|
+
/** Mapping of group_id to scored triplet. Use chunk.graph_triplet_ids to find which groups belong to a chunk. */
|
|
12
|
+
chunk_triplets?: Record<string, CortexAI.ScoredTripletResponse>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as CortexAI from "../index.js";
|
|
5
|
+
/**
|
|
6
|
+
* Single triplet within a path (without score, as the path is scored as a whole)
|
|
7
|
+
*/
|
|
8
|
+
export interface PathTriplet {
|
|
9
|
+
/** Source entity */
|
|
10
|
+
source: CortexAI.Entity;
|
|
11
|
+
/** Target entity */
|
|
12
|
+
target: CortexAI.Entity;
|
|
13
|
+
/** Relation between entities */
|
|
14
|
+
relation: CortexAI.RelationEvidence;
|
|
15
|
+
}
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
/**
|
|
5
|
-
* Single piece of evidence for a relationship between two entities
|
|
6
|
-
*/
|
|
7
4
|
export interface RelationEvidence {
|
|
5
|
+
/** Unique identifier for this specific relationship edge in the graph. The combination of source entity, target entity, and relationship_id allows disambiguation between multiple relations between the same source and target entities. */
|
|
6
|
+
relationship_id?: string;
|
|
8
7
|
/** Relationship phrase like 'works for', 'reports to' */
|
|
9
8
|
canonical_predicate: string;
|
|
10
9
|
/** Original predicate from text */
|
|
11
10
|
raw_predicate: string;
|
|
12
11
|
/** Rich contextual description of the relationship with surrounding information, details about how/why/when, and any relevant background. Should be comprehensive enough to understand the relationship without referring back to source. */
|
|
13
12
|
context: string;
|
|
14
|
-
/** Confidence score */
|
|
15
|
-
confidence?: number;
|
|
16
13
|
/** Temporal timing information extracted from text (e.g., 'last week', 'in 2023', 'yesterday') */
|
|
17
14
|
temporal_details?: string;
|
|
15
|
+
/** The chunk_id this relation came from */
|
|
16
|
+
chunk_id?: string;
|
|
18
17
|
/** Timestamp when this relation was introduced */
|
|
19
18
|
timestamp?: string;
|
|
20
19
|
}
|
|
@@ -5,8 +5,8 @@ import * as CortexAI from "../index.js";
|
|
|
5
5
|
export interface RetrieveResponse {
|
|
6
6
|
/** Retrieved content chunks */
|
|
7
7
|
chunks?: CortexAI.SearchChunk[];
|
|
8
|
-
/**
|
|
9
|
-
|
|
8
|
+
/** Graph relations with chunk_relations (by chunk_id) and entity_relations (top entity matches) */
|
|
9
|
+
graph_relations?: CortexAI.ChunkGraphRelationsResponse;
|
|
10
10
|
/** Additional metadata about the retrieval run */
|
|
11
11
|
metadata?: Record<string, unknown>;
|
|
12
12
|
}
|
|
@@ -10,6 +10,6 @@ export interface RetrieveUserMemoryResponse {
|
|
|
10
10
|
success: boolean;
|
|
11
11
|
/** Array of user memories ranked by relevance to your search query */
|
|
12
12
|
retrieved_user_memories?: CortexAI.UserMemory[];
|
|
13
|
-
/** Array of relations extracted from the user query */
|
|
14
|
-
relations?: CortexAI.
|
|
13
|
+
/** Array of scored relations extracted from the user query via knowledge graph search */
|
|
14
|
+
relations?: CortexAI.ScoredPathResponse[];
|
|
15
15
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as CortexAI from "../index.js";
|
|
5
|
+
/**
|
|
6
|
+
* A multi-hop path (chain of triplets) with a relevancy score.
|
|
7
|
+
*
|
|
8
|
+
* Represents connected paths like: A --rel1--> B --rel2--> C
|
|
9
|
+
* The triplets list preserves the chain order.
|
|
10
|
+
*/
|
|
11
|
+
export interface ScoredPathResponse {
|
|
12
|
+
/** Merged context from all triplets in the path */
|
|
13
|
+
combined_context?: string;
|
|
14
|
+
/** Ordered list of triplets forming the path chain */
|
|
15
|
+
triplets: CortexAI.PathTriplet[];
|
|
16
|
+
/** Relevancy score for the entire path */
|
|
17
|
+
relevancy_score?: number;
|
|
18
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as CortexAI from "../index.js";
|
|
5
|
+
/**
|
|
6
|
+
* Individual scored triplet for entity-based search results
|
|
7
|
+
*/
|
|
8
|
+
export interface ScoredTripletResponse {
|
|
9
|
+
/** Source entity */
|
|
10
|
+
source: CortexAI.Entity;
|
|
11
|
+
/** Target entity */
|
|
12
|
+
target: CortexAI.Entity;
|
|
13
|
+
/** Relation between entities */
|
|
14
|
+
relation: CortexAI.RelationEvidence;
|
|
15
|
+
/** Relevancy score from reranking */
|
|
16
|
+
relevancy_score?: number;
|
|
17
|
+
}
|
|
@@ -27,4 +27,6 @@ export interface SearchChunk {
|
|
|
27
27
|
tenant_metadata?: Record<string, unknown>;
|
|
28
28
|
/** Additional context for this chunk */
|
|
29
29
|
extra_context?: CortexAI.ExtendedContext;
|
|
30
|
+
/** List of group IDs for triplets linked to this chunk. Lookup triplet data in graph_relations.chunk_relations[group_id] */
|
|
31
|
+
graph_triplet_ids?: string[];
|
|
30
32
|
}
|
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as CortexAI from "../index.js";
|
|
5
|
-
/**
|
|
6
|
-
* Triple with multiple evidence items from different chunks
|
|
7
|
-
*/
|
|
8
5
|
export interface TripleWithEvidence {
|
|
9
6
|
source: CortexAI.Entity;
|
|
10
7
|
target: CortexAI.Entity;
|
|
@@ -6,6 +6,7 @@ export * from "./Bm25OperatorType.js";
|
|
|
6
6
|
export * from "./BatchUploadData.js";
|
|
7
7
|
export * from "./BodyScrapeWebpageUploadScrapeWebpagePost.js";
|
|
8
8
|
export * from "./BodyUpdateScrapeJobUploadUpdateWebpagePatch.js";
|
|
9
|
+
export * from "./ChunkGraphRelationsResponse.js";
|
|
9
10
|
export * from "./ContentModel.js";
|
|
10
11
|
export * from "./DeleteMemoryRequest.js";
|
|
11
12
|
export * from "./DeleteSources.js";
|
|
@@ -25,6 +26,7 @@ export * from "./HttpValidationError.js";
|
|
|
25
26
|
export * from "./ListSourcesResponse.js";
|
|
26
27
|
export * from "./ListUserMemoriesResponse.js";
|
|
27
28
|
export * from "./MarkdownUploadRequest.js";
|
|
29
|
+
export * from "./PathTriplet.js";
|
|
28
30
|
export * from "./ProcessingStatus.js";
|
|
29
31
|
export * from "./RelatedChunk.js";
|
|
30
32
|
export * from "./RelationEvidence.js";
|
|
@@ -32,6 +34,8 @@ export * from "./Relations.js";
|
|
|
32
34
|
export * from "./RetrieveMode.js";
|
|
33
35
|
export * from "./RetrieveResponse.js";
|
|
34
36
|
export * from "./RetrieveUserMemoryResponse.js";
|
|
37
|
+
export * from "./ScoredPathResponse.js";
|
|
38
|
+
export * from "./ScoredTripletResponse.js";
|
|
35
39
|
export * from "./SearchChunk.js";
|
|
36
40
|
export * from "./SingleUploadData.js";
|
|
37
41
|
export * from "./Source.js";
|
package/dist/api/types/index.js
CHANGED
|
@@ -22,6 +22,7 @@ __exportStar(require("./Bm25OperatorType.js"), exports);
|
|
|
22
22
|
__exportStar(require("./BatchUploadData.js"), exports);
|
|
23
23
|
__exportStar(require("./BodyScrapeWebpageUploadScrapeWebpagePost.js"), exports);
|
|
24
24
|
__exportStar(require("./BodyUpdateScrapeJobUploadUpdateWebpagePatch.js"), exports);
|
|
25
|
+
__exportStar(require("./ChunkGraphRelationsResponse.js"), exports);
|
|
25
26
|
__exportStar(require("./ContentModel.js"), exports);
|
|
26
27
|
__exportStar(require("./DeleteMemoryRequest.js"), exports);
|
|
27
28
|
__exportStar(require("./DeleteSources.js"), exports);
|
|
@@ -41,6 +42,7 @@ __exportStar(require("./HttpValidationError.js"), exports);
|
|
|
41
42
|
__exportStar(require("./ListSourcesResponse.js"), exports);
|
|
42
43
|
__exportStar(require("./ListUserMemoriesResponse.js"), exports);
|
|
43
44
|
__exportStar(require("./MarkdownUploadRequest.js"), exports);
|
|
45
|
+
__exportStar(require("./PathTriplet.js"), exports);
|
|
44
46
|
__exportStar(require("./ProcessingStatus.js"), exports);
|
|
45
47
|
__exportStar(require("./RelatedChunk.js"), exports);
|
|
46
48
|
__exportStar(require("./RelationEvidence.js"), exports);
|
|
@@ -48,6 +50,8 @@ __exportStar(require("./Relations.js"), exports);
|
|
|
48
50
|
__exportStar(require("./RetrieveMode.js"), exports);
|
|
49
51
|
__exportStar(require("./RetrieveResponse.js"), exports);
|
|
50
52
|
__exportStar(require("./RetrieveUserMemoryResponse.js"), exports);
|
|
53
|
+
__exportStar(require("./ScoredPathResponse.js"), exports);
|
|
54
|
+
__exportStar(require("./ScoredTripletResponse.js"), exports);
|
|
51
55
|
__exportStar(require("./SearchChunk.js"), exports);
|
|
52
56
|
__exportStar(require("./SingleUploadData.js"), exports);
|
|
53
57
|
__exportStar(require("./Source.js"), exports);
|
package/package.json
CHANGED