weave-typescript 0.50.0 → 0.51.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/weaveapi/consolidation/v1/consolidation.pb.d.ts +13 -14
- package/dist/weaveapi/consolidation/v1/consolidation.pb.js +62 -74
- package/dist/weaveapi/ingestion/v1/ingestion.pb.d.ts +82 -50
- package/dist/weaveapi/ingestion/v1/ingestion.pb.js +708 -216
- package/dist/weaveapi/ingestion/v1/service.pb.d.ts +50 -7
- package/dist/weaveapi/ingestion/v1/service.pb.js +279 -16
- package/dist/weaveapi/ingestion/v1/table.pb.d.ts +121 -0
- package/dist/weaveapi/ingestion/v1/table.pb.js +1478 -0
- package/dist/weaveapi/model/v1/model.pb.d.ts +3 -3
- package/dist/weaveapi/model/v1/model.pb.js +33 -33
- package/dist/weaveapi/model/v1/service.pb.d.ts +3 -3
- package/dist/weaveapi/model/v1/service.pb.js +33 -33
- package/dist/weaveapi/retrieval/v1/retrieval.pb.d.ts +123 -0
- package/dist/weaveapi/retrieval/v1/retrieval.pb.js +2096 -113
- package/dist/weaveapi/retrieval/v1/service.pb.d.ts +29 -1
- package/dist/weaveapi/retrieval/v1/service.pb.js +142 -0
- package/dist/weavesql/weavedb/consolidation_sql.d.ts +33 -33
- package/dist/weavesql/weavedb/consolidation_sql.js +56 -56
- package/dist/weavesql/weavedb/document_table_sql.d.ts +533 -0
- package/dist/weavesql/weavedb/document_table_sql.js +1352 -0
- package/dist/weavesql/weavedb/ingestion_sql.d.ts +67 -34
- package/dist/weavesql/weavedb/ingestion_sql.js +169 -73
- package/dist/weavesql/weavedb/retrieval_sql.d.ts +11 -11
- package/dist/weavesql/weavedb/retrieval_sql.js +13 -13
- package/package.json +1 -1
|
@@ -624,8 +624,8 @@ exports.searchLeafConceptClustersBySimilarityQuery = `-- name: SearchLeafConcept
|
|
|
624
624
|
SELECT
|
|
625
625
|
cc.id,
|
|
626
626
|
cc.organization_id,
|
|
627
|
-
cc.
|
|
628
|
-
cc.
|
|
627
|
+
cc.scope_kind,
|
|
628
|
+
cc.scope_key,
|
|
629
629
|
cc.name,
|
|
630
630
|
cc.description,
|
|
631
631
|
cc.knowledge_type,
|
|
@@ -645,8 +645,8 @@ CROSS JOIN LATERAL (
|
|
|
645
645
|
) AS score
|
|
646
646
|
) similarity
|
|
647
647
|
WHERE cc.organization_id = $2
|
|
648
|
-
AND cc.
|
|
649
|
-
AND cc.
|
|
648
|
+
AND cc.scope_kind = $3
|
|
649
|
+
AND cc.scope_key = $4
|
|
650
650
|
AND cc.level = 0
|
|
651
651
|
AND cc.embedding IS NOT NULL
|
|
652
652
|
AND similarity.score >= $5::double precision
|
|
@@ -655,15 +655,15 @@ LIMIT $6`;
|
|
|
655
655
|
async function searchLeafConceptClustersBySimilarity(client, args) {
|
|
656
656
|
const result = await client.query({
|
|
657
657
|
text: exports.searchLeafConceptClustersBySimilarityQuery,
|
|
658
|
-
values: [args.queryEmbedding, args.organizationId, args.
|
|
658
|
+
values: [args.queryEmbedding, args.organizationId, args.scopeKind, args.scopeKey, args.minSimilarity, args.resultLimit],
|
|
659
659
|
rowMode: "array"
|
|
660
660
|
});
|
|
661
661
|
return result.rows.map(row => {
|
|
662
662
|
return {
|
|
663
663
|
id: row[0],
|
|
664
664
|
organizationId: row[1],
|
|
665
|
-
|
|
666
|
-
|
|
665
|
+
scopeKind: row[2],
|
|
666
|
+
scopeKey: row[3],
|
|
667
667
|
name: row[4],
|
|
668
668
|
description: row[5],
|
|
669
669
|
knowledgeType: row[6],
|
|
@@ -711,8 +711,8 @@ LEFT JOIN LATERAL (
|
|
|
711
711
|
WHERE te.thread_id = t.id
|
|
712
712
|
) entity_data ON TRUE
|
|
713
713
|
WHERE cc.organization_id = $2
|
|
714
|
-
AND cc.
|
|
715
|
-
AND cc.
|
|
714
|
+
AND cc.scope_kind = $3
|
|
715
|
+
AND cc.scope_key = $4
|
|
716
716
|
AND cc.level = 0
|
|
717
717
|
AND cc.embedding IS NOT NULL
|
|
718
718
|
AND t.retrieval_status = 'THREAD_RETRIEVAL_STATUS_APPROVED'
|
|
@@ -722,7 +722,7 @@ LIMIT $6`;
|
|
|
722
722
|
async function searchConceptClusterThreadsBySimilarity(client, args) {
|
|
723
723
|
const result = await client.query({
|
|
724
724
|
text: exports.searchConceptClusterThreadsBySimilarityQuery,
|
|
725
|
-
values: [args.queryEmbedding, args.organizationId, args.
|
|
725
|
+
values: [args.queryEmbedding, args.organizationId, args.scopeKind, args.scopeKey, args.minSimilarity, args.resultLimit],
|
|
726
726
|
rowMode: "array"
|
|
727
727
|
});
|
|
728
728
|
return result.rows.map(row => {
|
|
@@ -778,8 +778,8 @@ LEFT JOIN LATERAL (
|
|
|
778
778
|
WHERE te.thread_id = t.id
|
|
779
779
|
) entity_data ON TRUE
|
|
780
780
|
WHERE cc.organization_id = $2
|
|
781
|
-
AND cc.
|
|
782
|
-
AND cc.
|
|
781
|
+
AND cc.scope_kind = $3
|
|
782
|
+
AND cc.scope_key = $4
|
|
783
783
|
AND cc.level = 0
|
|
784
784
|
AND cc.embedding IS NOT NULL
|
|
785
785
|
AND t.retrieval_status = 'THREAD_RETRIEVAL_STATUS_APPROVED'
|
|
@@ -819,7 +819,7 @@ LIMIT $7`;
|
|
|
819
819
|
async function searchConceptClusterThreadsBySimilarityAndUserPermissions(client, args) {
|
|
820
820
|
const result = await client.query({
|
|
821
821
|
text: exports.searchConceptClusterThreadsBySimilarityAndUserPermissionsQuery,
|
|
822
|
-
values: [args.queryEmbedding, args.organizationId, args.
|
|
822
|
+
values: [args.queryEmbedding, args.organizationId, args.scopeKind, args.scopeKey, args.minSimilarity, args.actingUserId, args.resultLimit],
|
|
823
823
|
rowMode: "array"
|
|
824
824
|
});
|
|
825
825
|
return result.rows.map(row => {
|