@relevanceai/sdk 1.85.0 → 1.87.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.
@@ -398,6 +398,14 @@ class DiscoveryApiClient extends BaseClient_1._GenericClient {
398
398
  options
399
399
  });
400
400
  }
401
+ async CreateClusterLabels(input, options) {
402
+ return this.SendRequest({
403
+ input,
404
+ method: 'post',
405
+ path: '/datasets/{dataset_id}/cluster/centroids/labels/create',
406
+ options
407
+ });
408
+ }
401
409
  async ListClusterSummaries(input, options) {
402
410
  return this.SendRequest({
403
411
  input,
@@ -878,6 +886,22 @@ class DiscoveryApiClient extends BaseClient_1._GenericClient {
878
886
  options
879
887
  });
880
888
  }
889
+ async DeleteTags(input, options) {
890
+ return this.SendRequest({
891
+ input,
892
+ method: 'post',
893
+ path: '/datasets/{dataset_id}/tags/delete',
894
+ options
895
+ });
896
+ }
897
+ async MergeTags(input, options) {
898
+ return this.SendRequest({
899
+ input,
900
+ method: 'post',
901
+ path: '/datasets/{dataset_id}/tags/merge',
902
+ options
903
+ });
904
+ }
881
905
  async ListFacets(input, options) {
882
906
  return this.SendRequest({
883
907
  input,
@@ -654,6 +654,18 @@ var DiscoveryApiClient = /** @class */ (function (_super) {
654
654
  });
655
655
  });
656
656
  };
657
+ DiscoveryApiClient.prototype.CreateClusterLabels = function (input, options) {
658
+ return __awaiter(this, void 0, void 0, function () {
659
+ return __generator(this, function (_a) {
660
+ return [2 /*return*/, this.SendRequest({
661
+ input: input,
662
+ method: 'post',
663
+ path: '/datasets/{dataset_id}/cluster/centroids/labels/create',
664
+ options: options
665
+ })];
666
+ });
667
+ });
668
+ };
657
669
  DiscoveryApiClient.prototype.ListClusterSummaries = function (input, options) {
658
670
  return __awaiter(this, void 0, void 0, function () {
659
671
  return __generator(this, function (_a) {
@@ -1374,6 +1386,30 @@ var DiscoveryApiClient = /** @class */ (function (_super) {
1374
1386
  });
1375
1387
  });
1376
1388
  };
1389
+ DiscoveryApiClient.prototype.DeleteTags = function (input, options) {
1390
+ return __awaiter(this, void 0, void 0, function () {
1391
+ return __generator(this, function (_a) {
1392
+ return [2 /*return*/, this.SendRequest({
1393
+ input: input,
1394
+ method: 'post',
1395
+ path: '/datasets/{dataset_id}/tags/delete',
1396
+ options: options
1397
+ })];
1398
+ });
1399
+ });
1400
+ };
1401
+ DiscoveryApiClient.prototype.MergeTags = function (input, options) {
1402
+ return __awaiter(this, void 0, void 0, function () {
1403
+ return __generator(this, function (_a) {
1404
+ return [2 /*return*/, this.SendRequest({
1405
+ input: input,
1406
+ method: 'post',
1407
+ path: '/datasets/{dataset_id}/tags/merge',
1408
+ options: options
1409
+ })];
1410
+ });
1411
+ });
1412
+ };
1377
1413
  DiscoveryApiClient.prototype.ListFacets = function (input, options) {
1378
1414
  return __awaiter(this, void 0, void 0, function () {
1379
1415
  return __generator(this, function (_a) {
@@ -98,6 +98,8 @@ export declare type MergeClustersInput = operations['MergeClusters']['requestBod
98
98
  export declare type MergeClustersOutput = operations['MergeClusters']['responses']['200']['content']['application/json'];
99
99
  export declare type CreateClusterSummariesInput = operations['CreateClusterSummaries']['requestBody']['content']['application/json'];
100
100
  export declare type CreateClusterSummariesOutput = operations['CreateClusterSummaries']['responses']['200']['content']['application/json'];
101
+ export declare type CreateClusterLabelsInput = operations['CreateClusterLabels']['requestBody']['content']['application/json'];
102
+ export declare type CreateClusterLabelsOutput = operations['CreateClusterLabels']['responses']['200']['content']['application/json'];
101
103
  export declare type ListClusterSummariesInput = operations['ListClusterSummaries']['requestBody']['content']['application/json'];
102
104
  export declare type ListClusterSummariesOutput = operations['ListClusterSummaries']['responses']['200']['content']['application/json'];
103
105
  export declare type DeleteClusterSummariesInput = operations['DeleteClusterSummaries']['requestBody']['content']['application/json'];
@@ -218,6 +220,10 @@ export declare type BulkUpdateInput = operations['BulkUpdate']['requestBody']['c
218
220
  export declare type BulkUpdateOutput = operations['BulkUpdate']['responses']['200']['content']['application/json'];
219
221
  export declare type UpdateWhereInput = operations['UpdateWhere']['requestBody']['content']['application/json'];
220
222
  export declare type UpdateWhereOutput = operations['UpdateWhere']['responses']['200']['content']['application/json'];
223
+ export declare type DeleteTagsInput = operations['DeleteTags']['requestBody']['content']['application/json'];
224
+ export declare type DeleteTagsOutput = operations['DeleteTags']['responses']['200']['content']['application/json'];
225
+ export declare type MergeTagsInput = operations['MergeTags']['requestBody']['content']['application/json'];
226
+ export declare type MergeTagsOutput = operations['MergeTags']['responses']['200']['content']['application/json'];
221
227
  export declare type ListFacetsInput = operations['ListFacets']['requestBody']['content']['application/json'];
222
228
  export declare type ListFacetsOutput = operations['ListFacets']['responses']['200']['content']['application/json'];
223
229
  export declare type GetWhereInput = operations['GetWhere']['requestBody']['content']['application/json'];
@@ -327,6 +333,7 @@ export declare class DiscoveryApiClient extends _GenericClient {
327
333
  RealtimeClustering(input: CommandInput<RealtimeClusteringInput>, options?: _GenericMethodOptions): Promise<CommandOutput<RealtimeClusteringOutput>>;
328
334
  MergeClusters(input: CommandInput<MergeClustersInput>, options?: _GenericMethodOptions): Promise<CommandOutput<MergeClustersOutput>>;
329
335
  CreateClusterSummaries(input: CommandInput<CreateClusterSummariesInput>, options?: _GenericMethodOptions): Promise<CommandOutput<CreateClusterSummariesOutput>>;
336
+ CreateClusterLabels(input: CommandInput<CreateClusterLabelsInput>, options?: _GenericMethodOptions): Promise<CommandOutput<CreateClusterLabelsOutput>>;
330
337
  ListClusterSummaries(input: CommandInput<ListClusterSummariesInput>, options?: _GenericMethodOptions): Promise<CommandOutput<ListClusterSummariesOutput>>;
331
338
  DeleteClusterSummaries(input: CommandInput<DeleteClusterSummariesInput>, options?: _GenericMethodOptions): Promise<CommandOutput<DeleteClusterSummariesOutput>>;
332
339
  CreateOrganization(input: CommandInput<CreateOrganizationInput>, options?: _GenericMethodOptions): Promise<CommandOutput<CreateOrganizationOutput>>;
@@ -387,6 +394,8 @@ export declare class DiscoveryApiClient extends _GenericClient {
387
394
  DeleteDocumentFields(input: CommandInput<DeleteDocumentFieldsInput>, options?: _GenericMethodOptions): Promise<CommandOutput<DeleteDocumentFieldsOutput>>;
388
395
  BulkUpdate(input: CommandInput<BulkUpdateInput>, options?: _GenericMethodOptions): Promise<CommandOutput<BulkUpdateOutput>>;
389
396
  UpdateWhere(input: CommandInput<UpdateWhereInput>, options?: _GenericMethodOptions): Promise<CommandOutput<UpdateWhereOutput>>;
397
+ DeleteTags(input: CommandInput<DeleteTagsInput>, options?: _GenericMethodOptions): Promise<CommandOutput<DeleteTagsOutput>>;
398
+ MergeTags(input: CommandInput<MergeTagsInput>, options?: _GenericMethodOptions): Promise<CommandOutput<MergeTagsOutput>>;
390
399
  ListFacets(input: CommandInput<ListFacetsInput>, options?: _GenericMethodOptions): Promise<CommandOutput<ListFacetsOutput>>;
391
400
  GetWhere(input: CommandInput<GetWhereInput>, options?: _GenericMethodOptions): Promise<CommandOutput<GetWhereOutput>>;
392
401
  PaginateDocuments(input: CommandInput<PaginateDocumentsInput>, options?: _GenericMethodOptions): Promise<CommandOutput<PaginateDocumentsOutput>>;
@@ -865,6 +865,25 @@ export interface paths {
865
865
  */
866
866
  post: operations["CreateClusterSummaries"];
867
867
  };
868
+ "/datasets/{dataset_id}/cluster/centroids/labels/create": {
869
+ /**
870
+ * ### Required permissions
871
+ * > [
872
+ * {
873
+ * "actions": [
874
+ * "datasets:read",
875
+ * "datasets:write"
876
+ * ],
877
+ * "datasets": [
878
+ * {
879
+ * "params": "dataset_id"
880
+ * }
881
+ * ]
882
+ * }
883
+ * ]
884
+ */
885
+ post: operations["CreateClusterLabels"];
886
+ };
868
887
  "/datasets/{dataset_id}/cluster/centroids/summaries/list": {
869
888
  /**
870
889
  * ### Required permissions
@@ -1956,6 +1975,46 @@ export interface paths {
1956
1975
  */
1957
1976
  post: operations["UpdateWhere"];
1958
1977
  };
1978
+ "/datasets/{dataset_id}/tags/delete": {
1979
+ /**
1980
+ * Delete tags from tag field by tag value. tag field can be in format ["cat"], or [{"label":"cat"}]
1981
+ *
1982
+ * ### Required permissions
1983
+ * > [
1984
+ * {
1985
+ * "actions": [
1986
+ * "datasets:write"
1987
+ * ],
1988
+ * "datasets": [
1989
+ * {
1990
+ * "params": "dataset_id"
1991
+ * }
1992
+ * ]
1993
+ * }
1994
+ * ]
1995
+ */
1996
+ post: operations["DeleteTags"];
1997
+ };
1998
+ "/datasets/{dataset_id}/tags/merge": {
1999
+ /**
2000
+ * Delete tags from tag field by tag value. tag field can be in format ["cat"], or [{"label":"cat"}]. tags_to_merge should look like {"dog":"pet","cat":"pet"}
2001
+ *
2002
+ * ### Required permissions
2003
+ * > [
2004
+ * {
2005
+ * "actions": [
2006
+ * "datasets:write"
2007
+ * ],
2008
+ * "datasets": [
2009
+ * {
2010
+ * "params": "dataset_id"
2011
+ * }
2012
+ * ]
2013
+ * }
2014
+ * ]
2015
+ */
2016
+ post: operations["MergeTags"];
2017
+ };
1959
2018
  "/datasets/{dataset_id}/facets": {
1960
2019
  /**
1961
2020
  * Takes a high level aggregation of every field, return their unique values and frequencies. This is used to help create the filter bar for search.
@@ -3127,6 +3186,12 @@ export interface components {
3127
3186
  * @default 1
3128
3187
  */
3129
3188
  sentenceWeight?: number;
3189
+ /**
3190
+ * @description Increases or decreases the impact of fuzzy matching when calculating a documents _relevance.
3191
+ * For example, with query "rain", with 0 fuzzy weight, 'brain' would not match.
3192
+ * @default 1
3193
+ */
3194
+ fuzzyWeight?: number;
3130
3195
  };
3131
3196
  /**
3132
3197
  * @description Prioritise the result list of documents based on semantic similarity to "query" provided here.
@@ -3367,6 +3432,12 @@ export interface components {
3367
3432
  * @default 1
3368
3433
  */
3369
3434
  sentenceWeight?: number;
3435
+ /**
3436
+ * @description Increases or decreases the impact of fuzzy matching when calculating a documents _relevance.
3437
+ * For example, with query "rain", with 0 fuzzy weight, 'brain' would not match.
3438
+ * @default 1
3439
+ */
3440
+ fuzzyWeight?: number;
3370
3441
  };
3371
3442
  /**
3372
3443
  * @description Prioritise the result list of documents based on semantic similarity to "query" provided here.
@@ -3613,6 +3684,12 @@ export interface components {
3613
3684
  * @default 1
3614
3685
  */
3615
3686
  sentenceWeight?: number;
3687
+ /**
3688
+ * @description Increases or decreases the impact of fuzzy matching when calculating a documents _relevance.
3689
+ * For example, with query "rain", with 0 fuzzy weight, 'brain' would not match.
3690
+ * @default 1
3691
+ */
3692
+ fuzzyWeight?: number;
3616
3693
  };
3617
3694
  /**
3618
3695
  * @description Prioritise the result list of documents based on semantic similarity to "query" provided here.
@@ -3898,6 +3975,12 @@ export interface components {
3898
3975
  * @default 1
3899
3976
  */
3900
3977
  sentenceWeight?: number;
3978
+ /**
3979
+ * @description Increases or decreases the impact of fuzzy matching when calculating a documents _relevance.
3980
+ * For example, with query "rain", with 0 fuzzy weight, 'brain' would not match.
3981
+ * @default 1
3982
+ */
3983
+ fuzzyWeight?: number;
3901
3984
  };
3902
3985
  /**
3903
3986
  * @description Prioritise the result list of documents based on semantic similarity to "query" provided here.
@@ -4144,6 +4227,12 @@ export interface components {
4144
4227
  * @default 1
4145
4228
  */
4146
4229
  sentenceWeight?: number;
4230
+ /**
4231
+ * @description Increases or decreases the impact of fuzzy matching when calculating a documents _relevance.
4232
+ * For example, with query "rain", with 0 fuzzy weight, 'brain' would not match.
4233
+ * @default 1
4234
+ */
4235
+ fuzzyWeight?: number;
4147
4236
  };
4148
4237
  /**
4149
4238
  * @description Prioritise the result list of documents based on semantic similarity to "query" provided here.
@@ -4365,7 +4454,7 @@ export interface components {
4365
4454
  minimum_cluster_size?: number;
4366
4455
  /**
4367
4456
  * @description Whether to add to list of cluster to show (or), or filter clusters to show based on minimum_cluster_size (and)
4368
- * @default or
4457
+ * @default and
4369
4458
  */
4370
4459
  minimum_cluster_size_filter_type?: "or" | "and";
4371
4460
  cluster_page?: number;
@@ -4388,6 +4477,7 @@ export interface components {
4388
4477
  results: {
4389
4478
  [key: string]: unknown[];
4390
4479
  };
4480
+ cluster_order: string[];
4391
4481
  cluster_stats?: {
4392
4482
  [key: string]: {
4393
4483
  percentage: number;
@@ -4471,6 +4561,12 @@ export interface components {
4471
4561
  * @default 1
4472
4562
  */
4473
4563
  sentenceWeight?: number;
4564
+ /**
4565
+ * @description Increases or decreases the impact of fuzzy matching when calculating a documents _relevance.
4566
+ * For example, with query "rain", with 0 fuzzy weight, 'brain' would not match.
4567
+ * @default 1
4568
+ */
4569
+ fuzzyWeight?: number;
4474
4570
  };
4475
4571
  /**
4476
4572
  * @description Prioritise the result list of documents based on semantic similarity to "query" provided here.
@@ -4717,6 +4813,12 @@ export interface components {
4717
4813
  * @default 1
4718
4814
  */
4719
4815
  sentenceWeight?: number;
4816
+ /**
4817
+ * @description Increases or decreases the impact of fuzzy matching when calculating a documents _relevance.
4818
+ * For example, with query "rain", with 0 fuzzy weight, 'brain' would not match.
4819
+ * @default 1
4820
+ */
4821
+ fuzzyWeight?: number;
4720
4822
  };
4721
4823
  /**
4722
4824
  * @description Prioritise the result list of documents based on semantic similarity to "query" provided here.
@@ -4938,7 +5040,7 @@ export interface components {
4938
5040
  minimum_cluster_size?: number;
4939
5041
  /**
4940
5042
  * @description Whether to add to list of cluster to show (or), or filter clusters to show based on minimum_cluster_size (and)
4941
- * @default or
5043
+ * @default and
4942
5044
  */
4943
5045
  minimum_cluster_size_filter_type?: "or" | "and";
4944
5046
  cluster_page?: number;
@@ -5062,6 +5164,12 @@ export interface components {
5062
5164
  * @default 1
5063
5165
  */
5064
5166
  sentenceWeight?: number;
5167
+ /**
5168
+ * @description Increases or decreases the impact of fuzzy matching when calculating a documents _relevance.
5169
+ * For example, with query "rain", with 0 fuzzy weight, 'brain' would not match.
5170
+ * @default 1
5171
+ */
5172
+ fuzzyWeight?: number;
5065
5173
  };
5066
5174
  /**
5067
5175
  * @description Prioritise the result list of documents based on semantic similarity to "query" provided here.
@@ -5258,7 +5366,7 @@ export interface components {
5258
5366
  minimum_cluster_size?: number;
5259
5367
  /**
5260
5368
  * @description Whether to add to list of cluster to show (or), or filter clusters to show based on minimum_cluster_size (and)
5261
- * @default or
5369
+ * @default and
5262
5370
  */
5263
5371
  minimum_cluster_size_filter_type?: "or" | "and";
5264
5372
  cluster_page?: number;
@@ -5360,6 +5468,12 @@ export interface components {
5360
5468
  * @default 1
5361
5469
  */
5362
5470
  sentenceWeight?: number;
5471
+ /**
5472
+ * @description Increases or decreases the impact of fuzzy matching when calculating a documents _relevance.
5473
+ * For example, with query "rain", with 0 fuzzy weight, 'brain' would not match.
5474
+ * @default 1
5475
+ */
5476
+ fuzzyWeight?: number;
5363
5477
  };
5364
5478
  /**
5365
5479
  * @description Prioritise the result list of documents based on semantic similarity to "query" provided here.
@@ -5556,7 +5670,7 @@ export interface components {
5556
5670
  minimum_cluster_size?: number;
5557
5671
  /**
5558
5672
  * @description Whether to add to list of cluster to show (or), or filter clusters to show based on minimum_cluster_size (and)
5559
- * @default or
5673
+ * @default and
5560
5674
  */
5561
5675
  minimum_cluster_size_filter_type?: "or" | "and";
5562
5676
  cluster_page?: number;
@@ -5688,6 +5802,12 @@ export interface components {
5688
5802
  * ```
5689
5803
  */
5690
5804
  config: {
5805
+ examples?: {
5806
+ /** @description Embedded in prompt as example text that should predict label. */
5807
+ items: string[];
5808
+ /** @description Will embedded in the prompt as the expected target label of the items. */
5809
+ label: string;
5810
+ }[];
5691
5811
  /** @description Text field of clusters to summarize */
5692
5812
  field: string;
5693
5813
  question_prefix?: string;
@@ -5751,6 +5871,160 @@ export interface components {
5751
5871
  * ```
5752
5872
  */
5753
5873
  config: {
5874
+ examples?: {
5875
+ /** @description Embedded in prompt as example text that should predict label. */
5876
+ items: string[];
5877
+ /** @description Will embedded in the prompt as the expected target label of the items. */
5878
+ label: string;
5879
+ }[];
5880
+ /** @description Text field of clusters to summarize */
5881
+ field: string;
5882
+ question_prefix?: string;
5883
+ question_suffix?: string;
5884
+ item_prefix?: string;
5885
+ /**
5886
+ * @description Add 1:,2:,3:... to each item. This makes it more likely output will be numbered.
5887
+ * @default true
5888
+ */
5889
+ items_numbered?: boolean;
5890
+ /**
5891
+ * @description Cluster items provide context to the question. Limiting cluster item char length reduces cost, but may miss end of sentences with context.
5892
+ * @default 200
5893
+ */
5894
+ max_item_length?: number;
5895
+ /**
5896
+ * @description Cluster items provide context to the question. Limiting cluster item count reduces cost, but may miss items with context.
5897
+ * @default 10
5898
+ */
5899
+ max_item_count?: number;
5900
+ /**
5901
+ * @description Controls answer quality. Higher quality answers have exponentially higher cost.
5902
+ * @default 1
5903
+ */
5904
+ accuracy?: 1 | 2 | 3 | 4;
5905
+ /** @default 0.7 */
5906
+ temperature?: number;
5907
+ /**
5908
+ * @description Maximum number of words that will be generated.
5909
+ * @default 60
5910
+ */
5911
+ max_answer_length?: number;
5912
+ /**
5913
+ * @description To avoid overloading our summary API, you can increase / decrease the ms delay between questions.
5914
+ * @default 1000
5915
+ */
5916
+ delay_between_summary_generation?: number;
5917
+ };
5918
+ confidence?: number;
5919
+ retry_count?: number;
5920
+ }[];
5921
+ };
5922
+ };
5923
+ };
5924
+ CreateClusterLabelsInput: {
5925
+ /** @description The vector fields that these centroids are associated with. */
5926
+ vector_fields?: string[];
5927
+ centroid_vector_fields?: string[];
5928
+ /** @description Alias is used to name a cluster. */
5929
+ alias?: string;
5930
+ dataset_id?: string;
5931
+ cluster_ids?: unknown[];
5932
+ /** @description Set to true to only return summaries, not save them. */
5933
+ dont_save_summaries?: boolean;
5934
+ questions: {
5935
+ cluster_ids?: unknown[];
5936
+ /**
5937
+ * @description Summarise the top results in a sentence. Fields will form a string like:
5938
+ * ```
5939
+ * {question_prefix}
5940
+ * {item_prefix} 1:{field_value}
5941
+ * {item_prefix} 2: {field_value_2}
5942
+ * {question_suffix}}
5943
+ * ```
5944
+ * To create a summary on a field name 'feedback' for each cluster, An example payload could be:
5945
+ *
5946
+ * ```
5947
+ * "cluster_text_summary":[
5948
+ * {"item_prefix":"Feedback","question_suffix":"Summarise the feedback in one short sentence.","field":"feedback"}
5949
+ * ]
5950
+ * ```
5951
+ */
5952
+ config: {
5953
+ examples?: {
5954
+ /** @description Embedded in prompt as example text that should predict label. */
5955
+ items: string[];
5956
+ /** @description Will embedded in the prompt as the expected target label of the items. */
5957
+ label: string;
5958
+ }[];
5959
+ /** @description Text field of clusters to summarize */
5960
+ field: string;
5961
+ question_prefix?: string;
5962
+ question_suffix?: string;
5963
+ item_prefix?: string;
5964
+ /**
5965
+ * @description Add 1:,2:,3:... to each item. This makes it more likely output will be numbered.
5966
+ * @default true
5967
+ */
5968
+ items_numbered?: boolean;
5969
+ /**
5970
+ * @description Cluster items provide context to the question. Limiting cluster item char length reduces cost, but may miss end of sentences with context.
5971
+ * @default 200
5972
+ */
5973
+ max_item_length?: number;
5974
+ /**
5975
+ * @description Cluster items provide context to the question. Limiting cluster item count reduces cost, but may miss items with context.
5976
+ * @default 10
5977
+ */
5978
+ max_item_count?: number;
5979
+ /**
5980
+ * @description Controls answer quality. Higher quality answers have exponentially higher cost.
5981
+ * @default 1
5982
+ */
5983
+ accuracy?: 1 | 2 | 3 | 4;
5984
+ /** @default 0.7 */
5985
+ temperature?: number;
5986
+ /**
5987
+ * @description Maximum number of words that will be generated.
5988
+ * @default 60
5989
+ */
5990
+ max_answer_length?: number;
5991
+ /**
5992
+ * @description To avoid overloading our summary API, you can increase / decrease the ms delay between questions.
5993
+ * @default 1000
5994
+ */
5995
+ delay_between_summary_generation?: number;
5996
+ };
5997
+ }[];
5998
+ };
5999
+ CreateClusterLabelsOutput: {
6000
+ results: {
6001
+ [key: string]: {
6002
+ answers: {
6003
+ answer: string;
6004
+ question: string;
6005
+ /**
6006
+ * @description Summarise the top results in a sentence. Fields will form a string like:
6007
+ * ```
6008
+ * {question_prefix}
6009
+ * {item_prefix} 1:{field_value}
6010
+ * {item_prefix} 2: {field_value_2}
6011
+ * {question_suffix}}
6012
+ * ```
6013
+ * To create a summary on a field name 'feedback' for each cluster, An example payload could be:
6014
+ *
6015
+ * ```
6016
+ * "cluster_text_summary":[
6017
+ * {"item_prefix":"Feedback","question_suffix":"Summarise the feedback in one short sentence.","field":"feedback"}
6018
+ * ]
6019
+ * ```
6020
+ */
6021
+ config: {
6022
+ examples?: {
6023
+ /** @description Embedded in prompt as example text that should predict label. */
6024
+ items: string[];
6025
+ /** @description Will embedded in the prompt as the expected target label of the items. */
6026
+ label: string;
6027
+ }[];
5754
6028
  /** @description Text field of clusters to summarize */
5755
6029
  field: string;
5756
6030
  question_prefix?: string;
@@ -5826,6 +6100,12 @@ export interface components {
5826
6100
  * ```
5827
6101
  */
5828
6102
  config: {
6103
+ examples?: {
6104
+ /** @description Embedded in prompt as example text that should predict label. */
6105
+ items: string[];
6106
+ /** @description Will embedded in the prompt as the expected target label of the items. */
6107
+ label: string;
6108
+ }[];
5829
6109
  /** @description Text field of clusters to summarize */
5830
6110
  field: string;
5831
6111
  question_prefix?: string;
@@ -6533,6 +6813,7 @@ export interface components {
6533
6813
  ListWorkflowsOutput: {
6534
6814
  results: ({
6535
6815
  creation_time?: string;
6816
+ completion_time?: string;
6536
6817
  notebook_path?: string;
6537
6818
  instance_type?: string;
6538
6819
  dataset_id?: string;
@@ -6554,6 +6835,7 @@ export interface components {
6554
6835
  GetWorkflowStatusInput: unknown;
6555
6836
  GetWorkflowStatusOutput: {
6556
6837
  creation_time?: string;
6838
+ completion_time?: string;
6557
6839
  notebook_path?: string;
6558
6840
  instance_type?: string;
6559
6841
  dataset_id?: string;
@@ -6896,6 +7178,12 @@ export interface components {
6896
7178
  * @default 1
6897
7179
  */
6898
7180
  sentenceWeight?: number;
7181
+ /**
7182
+ * @description Increases or decreases the impact of fuzzy matching when calculating a documents _relevance.
7183
+ * For example, with query "rain", with 0 fuzzy weight, 'brain' would not match.
7184
+ * @default 1
7185
+ */
7186
+ fuzzyWeight?: number;
6899
7187
  };
6900
7188
  /**
6901
7189
  * @description Prioritise the result list of documents based on semantic similarity to "query" provided here.
@@ -7095,7 +7383,7 @@ export interface components {
7095
7383
  CreateDatasetInput: {
7096
7384
  id?: string;
7097
7385
  schema?: {
7098
- [key: string]: ("binary" | "bool" | "date" | "numeric" | "text" | "dict" | "chunks" | "base64" | "boolean") | {
7386
+ [key: string]: ("binary" | "bool" | "date" | "numeric" | "text" | "dict" | "chunks" | "base64" | "boolean" | "raw") | {
7099
7387
  chunkvector?: number;
7100
7388
  vector?: number;
7101
7389
  } | number;
@@ -7109,7 +7397,7 @@ export interface components {
7109
7397
  CreateDatasetOutput: unknown;
7110
7398
  GetSchemaInput: unknown;
7111
7399
  GetSchemaOutput: {
7112
- [key: string]: ("binary" | "bool" | "date" | "numeric" | "text" | "dict" | "chunks" | "base64" | "boolean") | {
7400
+ [key: string]: ("binary" | "bool" | "date" | "numeric" | "text" | "dict" | "chunks" | "base64" | "boolean" | "raw") | {
7113
7401
  chunkvector?: number;
7114
7402
  vector?: number;
7115
7403
  } | number;
@@ -7199,6 +7487,12 @@ export interface components {
7199
7487
  * @default 1
7200
7488
  */
7201
7489
  sentenceWeight?: number;
7490
+ /**
7491
+ * @description Increases or decreases the impact of fuzzy matching when calculating a documents _relevance.
7492
+ * For example, with query "rain", with 0 fuzzy weight, 'brain' would not match.
7493
+ * @default 1
7494
+ */
7495
+ fuzzyWeight?: number;
7202
7496
  };
7203
7497
  /**
7204
7498
  * @description Prioritise the result list of documents based on semantic similarity to "query" provided here.
@@ -7717,6 +8011,12 @@ export interface components {
7717
8011
  * @default 1
7718
8012
  */
7719
8013
  sentenceWeight?: number;
8014
+ /**
8015
+ * @description Increases or decreases the impact of fuzzy matching when calculating a documents _relevance.
8016
+ * For example, with query "rain", with 0 fuzzy weight, 'brain' would not match.
8017
+ * @default 1
8018
+ */
8019
+ fuzzyWeight?: number;
7720
8020
  };
7721
8021
  /**
7722
8022
  * @description Prioritise the result list of documents based on semantic similarity to "query" provided here.
@@ -7896,6 +8196,18 @@ export interface components {
7896
8196
  /** @description Response message for completion state. */
7897
8197
  message: string;
7898
8198
  };
8199
+ DeleteTagsInput: {
8200
+ field: string;
8201
+ tags_to_delete: string[];
8202
+ };
8203
+ DeleteTagsOutput: unknown;
8204
+ MergeTagsInput: {
8205
+ field: string;
8206
+ tags_to_merge: {
8207
+ [key: string]: string;
8208
+ };
8209
+ };
8210
+ MergeTagsOutput: unknown;
7899
8211
  ListFacetsInput: {
7900
8212
  /** @description Fields to include in the facets, if [] then all */
7901
8213
  fields?: string[];
@@ -8004,6 +8316,12 @@ export interface components {
8004
8316
  * @default 1
8005
8317
  */
8006
8318
  sentenceWeight?: number;
8319
+ /**
8320
+ * @description Increases or decreases the impact of fuzzy matching when calculating a documents _relevance.
8321
+ * For example, with query "rain", with 0 fuzzy weight, 'brain' would not match.
8322
+ * @default 1
8323
+ */
8324
+ fuzzyWeight?: number;
8007
8325
  };
8008
8326
  /**
8009
8327
  * @description Prioritise the result list of documents based on semantic similarity to "query" provided here.
@@ -8285,6 +8603,12 @@ export interface components {
8285
8603
  * @default 1
8286
8604
  */
8287
8605
  sentenceWeight?: number;
8606
+ /**
8607
+ * @description Increases or decreases the impact of fuzzy matching when calculating a documents _relevance.
8608
+ * For example, with query "rain", with 0 fuzzy weight, 'brain' would not match.
8609
+ * @default 1
8610
+ */
8611
+ fuzzyWeight?: number;
8288
8612
  };
8289
8613
  /**
8290
8614
  * @description Prioritise the result list of documents based on semantic similarity to "query" provided here.
@@ -8682,6 +9006,12 @@ export interface components {
8682
9006
  * @default 1
8683
9007
  */
8684
9008
  sentenceWeight?: number;
9009
+ /**
9010
+ * @description Increases or decreases the impact of fuzzy matching when calculating a documents _relevance.
9011
+ * For example, with query "rain", with 0 fuzzy weight, 'brain' would not match.
9012
+ * @default 1
9013
+ */
9014
+ fuzzyWeight?: number;
8685
9015
  };
8686
9016
  /**
8687
9017
  * @description Prioritise the result list of documents based on semantic similarity to "query" provided here.
@@ -8937,6 +9267,12 @@ export interface components {
8937
9267
  * @default 1
8938
9268
  */
8939
9269
  sentenceWeight?: number;
9270
+ /**
9271
+ * @description Increases or decreases the impact of fuzzy matching when calculating a documents _relevance.
9272
+ * For example, with query "rain", with 0 fuzzy weight, 'brain' would not match.
9273
+ * @default 1
9274
+ */
9275
+ fuzzyWeight?: number;
8940
9276
  };
8941
9277
  /**
8942
9278
  * @description Prioritise the result list of documents based on semantic similarity to "query" provided here.
@@ -9126,6 +9462,12 @@ export interface components {
9126
9462
  * @default 1
9127
9463
  */
9128
9464
  sentenceWeight?: number;
9465
+ /**
9466
+ * @description Increases or decreases the impact of fuzzy matching when calculating a documents _relevance.
9467
+ * For example, with query "rain", with 0 fuzzy weight, 'brain' would not match.
9468
+ * @default 1
9469
+ */
9470
+ fuzzyWeight?: number;
9129
9471
  };
9130
9472
  /**
9131
9473
  * @description Prioritise the result list of documents based on semantic similarity to "query" provided here.
@@ -9473,6 +9815,12 @@ export interface components {
9473
9815
  * @default 1
9474
9816
  */
9475
9817
  sentenceWeight?: number;
9818
+ /**
9819
+ * @description Increases or decreases the impact of fuzzy matching when calculating a documents _relevance.
9820
+ * For example, with query "rain", with 0 fuzzy weight, 'brain' would not match.
9821
+ * @default 1
9822
+ */
9823
+ fuzzyWeight?: number;
9476
9824
  };
9477
9825
  /**
9478
9826
  * @description Prioritise the result list of documents based on semantic similarity to "query" provided here.
@@ -9662,6 +10010,12 @@ export interface components {
9662
10010
  * @default 1
9663
10011
  */
9664
10012
  sentenceWeight?: number;
10013
+ /**
10014
+ * @description Increases or decreases the impact of fuzzy matching when calculating a documents _relevance.
10015
+ * For example, with query "rain", with 0 fuzzy weight, 'brain' would not match.
10016
+ * @default 1
10017
+ */
10018
+ fuzzyWeight?: number;
9665
10019
  };
9666
10020
  /**
9667
10021
  * @description Prioritise the result list of documents based on semantic similarity to "query" provided here.
@@ -10021,6 +10375,12 @@ export interface components {
10021
10375
  * @default 1
10022
10376
  */
10023
10377
  sentenceWeight?: number;
10378
+ /**
10379
+ * @description Increases or decreases the impact of fuzzy matching when calculating a documents _relevance.
10380
+ * For example, with query "rain", with 0 fuzzy weight, 'brain' would not match.
10381
+ * @default 1
10382
+ */
10383
+ fuzzyWeight?: number;
10024
10384
  };
10025
10385
  /**
10026
10386
  * @description Prioritise the result list of documents based on semantic similarity to "query" provided here.
@@ -12084,6 +12444,43 @@ export interface operations {
12084
12444
  };
12085
12445
  };
12086
12446
  };
12447
+ /**
12448
+ * ### Required permissions
12449
+ * > [
12450
+ * {
12451
+ * "actions": [
12452
+ * "datasets:read",
12453
+ * "datasets:write"
12454
+ * ],
12455
+ * "datasets": [
12456
+ * {
12457
+ * "params": "dataset_id"
12458
+ * }
12459
+ * ]
12460
+ * }
12461
+ * ]
12462
+ */
12463
+ CreateClusterLabels: {
12464
+ parameters: {
12465
+ path: {
12466
+ /** ID of dataset */
12467
+ dataset_id: string;
12468
+ };
12469
+ };
12470
+ responses: {
12471
+ /** successful operation */
12472
+ 200: {
12473
+ content: {
12474
+ "application/json": components["schemas"]["CreateClusterLabelsOutput"];
12475
+ };
12476
+ };
12477
+ };
12478
+ requestBody: {
12479
+ content: {
12480
+ "application/json": components["schemas"]["CreateClusterLabelsInput"];
12481
+ };
12482
+ };
12483
+ };
12087
12484
  /**
12088
12485
  * ### Required permissions
12089
12486
  * > [
@@ -14100,6 +14497,82 @@ export interface operations {
14100
14497
  };
14101
14498
  };
14102
14499
  };
14500
+ /**
14501
+ * Delete tags from tag field by tag value. tag field can be in format ["cat"], or [{"label":"cat"}]
14502
+ *
14503
+ * ### Required permissions
14504
+ * > [
14505
+ * {
14506
+ * "actions": [
14507
+ * "datasets:write"
14508
+ * ],
14509
+ * "datasets": [
14510
+ * {
14511
+ * "params": "dataset_id"
14512
+ * }
14513
+ * ]
14514
+ * }
14515
+ * ]
14516
+ */
14517
+ DeleteTags: {
14518
+ parameters: {
14519
+ path: {
14520
+ /** ID of dataset */
14521
+ dataset_id: string;
14522
+ };
14523
+ };
14524
+ responses: {
14525
+ /** successful operation */
14526
+ 200: {
14527
+ content: {
14528
+ "application/json": components["schemas"]["DeleteTagsOutput"];
14529
+ };
14530
+ };
14531
+ };
14532
+ requestBody: {
14533
+ content: {
14534
+ "application/json": components["schemas"]["DeleteTagsInput"];
14535
+ };
14536
+ };
14537
+ };
14538
+ /**
14539
+ * Delete tags from tag field by tag value. tag field can be in format ["cat"], or [{"label":"cat"}]. tags_to_merge should look like {"dog":"pet","cat":"pet"}
14540
+ *
14541
+ * ### Required permissions
14542
+ * > [
14543
+ * {
14544
+ * "actions": [
14545
+ * "datasets:write"
14546
+ * ],
14547
+ * "datasets": [
14548
+ * {
14549
+ * "params": "dataset_id"
14550
+ * }
14551
+ * ]
14552
+ * }
14553
+ * ]
14554
+ */
14555
+ MergeTags: {
14556
+ parameters: {
14557
+ path: {
14558
+ /** ID of dataset */
14559
+ dataset_id: string;
14560
+ };
14561
+ };
14562
+ responses: {
14563
+ /** successful operation */
14564
+ 200: {
14565
+ content: {
14566
+ "application/json": components["schemas"]["MergeTagsOutput"];
14567
+ };
14568
+ };
14569
+ };
14570
+ requestBody: {
14571
+ content: {
14572
+ "application/json": components["schemas"]["MergeTagsInput"];
14573
+ };
14574
+ };
14575
+ };
14103
14576
  /**
14104
14577
  * Takes a high level aggregation of every field, return their unique values and frequencies. This is used to help create the filter bar for search.
14105
14578
  *
@@ -14397,6 +14870,12 @@ export interface operations {
14397
14870
  * @default 1
14398
14871
  */
14399
14872
  sentenceWeight?: number;
14873
+ /**
14874
+ * @description Increases or decreases the impact of fuzzy matching when calculating a documents _relevance.
14875
+ * For example, with query "rain", with 0 fuzzy weight, 'brain' would not match.
14876
+ * @default 1
14877
+ */
14878
+ fuzzyWeight?: number;
14400
14879
  };
14401
14880
  /**
14402
14881
  * @description Prioritise the result list of documents based on semantic similarity to "query" provided here.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@relevanceai/sdk",
3
- "version": "1.85.0",
3
+ "version": "1.87.0",
4
4
  "description": "Javascript client for RelevanceAI APIs. Browser, Node.js and typescript support.",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "types": "./dist-types/index.d.ts",