tako-sdk 1.0.1 → 1.0.2

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/index.cjs CHANGED
@@ -94,6 +94,14 @@ __export(index_exports, {
94
94
  CardSourcePrivateIndexFromJSONTyped: () => CardSourcePrivateIndexFromJSONTyped,
95
95
  CardSourcePrivateIndexToJSON: () => CardSourcePrivateIndexToJSON,
96
96
  CardSourcePrivateIndexToJSONTyped: () => CardSourcePrivateIndexToJSONTyped,
97
+ ClassifyRequestFromJSON: () => ClassifyRequestFromJSON,
98
+ ClassifyRequestFromJSONTyped: () => ClassifyRequestFromJSONTyped,
99
+ ClassifyRequestToJSON: () => ClassifyRequestToJSON,
100
+ ClassifyRequestToJSONTyped: () => ClassifyRequestToJSONTyped,
101
+ ClassifyResponseFromJSON: () => ClassifyResponseFromJSON,
102
+ ClassifyResponseFromJSONTyped: () => ClassifyResponseFromJSONTyped,
103
+ ClassifyResponseToJSON: () => ClassifyResponseToJSON,
104
+ ClassifyResponseToJSONTyped: () => ClassifyResponseToJSONTyped,
97
105
  ComponentConfigFromJSON: () => ComponentConfigFromJSON,
98
106
  ComponentConfigFromJSONTyped: () => ComponentConfigFromJSONTyped,
99
107
  ComponentConfigToJSON: () => ComponentConfigToJSON,
@@ -180,6 +188,10 @@ __export(index_exports, {
180
188
  OutputSettingsFromJSONTyped: () => OutputSettingsFromJSONTyped,
181
189
  OutputSettingsToJSON: () => OutputSettingsToJSON,
182
190
  OutputSettingsToJSONTyped: () => OutputSettingsToJSONTyped,
191
+ QueryClassificationFromJSON: () => QueryClassificationFromJSON,
192
+ QueryClassificationFromJSONTyped: () => QueryClassificationFromJSONTyped,
193
+ QueryClassificationToJSON: () => QueryClassificationToJSON,
194
+ QueryClassificationToJSONTyped: () => QueryClassificationToJSONTyped,
183
195
  ReasoningEventFromJSON: () => ReasoningEventFromJSON,
184
196
  ReasoningEventFromJSONTyped: () => ReasoningEventFromJSONTyped,
185
197
  ReasoningEventKindEnum: () => ReasoningEventKindEnum,
@@ -299,6 +311,8 @@ __export(index_exports, {
299
311
  instanceOfCardSourceIndex: () => instanceOfCardSourceIndex,
300
312
  instanceOfCardSourceIndexSegment: () => instanceOfCardSourceIndexSegment,
301
313
  instanceOfCardSourcePrivateIndex: () => instanceOfCardSourcePrivateIndex,
314
+ instanceOfClassifyRequest: () => instanceOfClassifyRequest,
315
+ instanceOfClassifyResponse: () => instanceOfClassifyResponse,
302
316
  instanceOfComponentConfig: () => instanceOfComponentConfig,
303
317
  instanceOfComponentTypeEnum: () => instanceOfComponentTypeEnum,
304
318
  instanceOfContentFormat: () => instanceOfContentFormat,
@@ -318,6 +332,7 @@ __export(index_exports, {
318
332
  instanceOfKnowledgeCardSource: () => instanceOfKnowledgeCardSource,
319
333
  instanceOfKnowledgeCardSourceIndexesInner: () => instanceOfKnowledgeCardSourceIndexesInner,
320
334
  instanceOfOutputSettings: () => instanceOfOutputSettings,
335
+ instanceOfQueryClassification: () => instanceOfQueryClassification,
321
336
  instanceOfReasoningEvent: () => instanceOfReasoningEvent,
322
337
  instanceOfResultContent: () => instanceOfResultContent,
323
338
  instanceOfSearchEffortLevel: () => instanceOfSearchEffortLevel,
@@ -929,7 +944,8 @@ function TakoCardFromJSONTyped(json, ignoreDiscriminator) {
929
944
  "source_indexes": json["source_indexes"] == null ? void 0 : json["source_indexes"].map(KnowledgeCardSourceIndexesInnerFromJSON),
930
945
  "card_type": json["card_type"] == null ? void 0 : json["card_type"],
931
946
  "relevance": json["relevance"] == null ? void 0 : KnowledgeCardRelevanceFromJSON(json["relevance"]),
932
- "content": json["content"] == null ? void 0 : ResultContentFromJSON(json["content"])
947
+ "content": json["content"] == null ? void 0 : ResultContentFromJSON(json["content"]),
948
+ "relevance_score": json["relevance_score"] == null ? void 0 : json["relevance_score"]
933
949
  };
934
950
  }
935
951
  function TakoCardToJSON(json) {
@@ -952,7 +968,8 @@ function TakoCardToJSONTyped(value, ignoreDiscriminator = false) {
952
968
  "source_indexes": value["source_indexes"] == null ? void 0 : value["source_indexes"].map(KnowledgeCardSourceIndexesInnerToJSON),
953
969
  "card_type": value["card_type"],
954
970
  "relevance": KnowledgeCardRelevanceToJSON(value["relevance"]),
955
- "content": ResultContentToJSON(value["content"])
971
+ "content": ResultContentToJSON(value["content"]),
972
+ "relevance_score": value["relevance_score"]
956
973
  };
957
974
  }
958
975
 
@@ -1194,7 +1211,7 @@ function AgentOutputSettingsToJSONTyped(value, ignoreDiscriminator = false) {
1194
1211
 
1195
1212
  // src/generated/models/AgentRunRequest.ts
1196
1213
  var AgentRunRequestSourceIndexesEnum = {
1197
- Tako: "tako",
1214
+ Data: "data",
1198
1215
  Web: "web"
1199
1216
  };
1200
1217
  function instanceOfAgentRunRequest(value) {
@@ -1357,6 +1374,95 @@ function AnswerResponseToJSONTyped(value, ignoreDiscriminator = false) {
1357
1374
  };
1358
1375
  }
1359
1376
 
1377
+ // src/generated/models/ClassifyRequest.ts
1378
+ function instanceOfClassifyRequest(value) {
1379
+ if (!("queries" in value) || value["queries"] === void 0) return false;
1380
+ return true;
1381
+ }
1382
+ function ClassifyRequestFromJSON(json) {
1383
+ return ClassifyRequestFromJSONTyped(json, false);
1384
+ }
1385
+ function ClassifyRequestFromJSONTyped(json, ignoreDiscriminator) {
1386
+ if (json == null) {
1387
+ return json;
1388
+ }
1389
+ return {
1390
+ "queries": json["queries"]
1391
+ };
1392
+ }
1393
+ function ClassifyRequestToJSON(json) {
1394
+ return ClassifyRequestToJSONTyped(json, false);
1395
+ }
1396
+ function ClassifyRequestToJSONTyped(value, ignoreDiscriminator = false) {
1397
+ if (value == null) {
1398
+ return value;
1399
+ }
1400
+ return {
1401
+ "queries": value["queries"]
1402
+ };
1403
+ }
1404
+
1405
+ // src/generated/models/QueryClassification.ts
1406
+ function instanceOfQueryClassification(value) {
1407
+ if (!("query" in value) || value["query"] === void 0) return false;
1408
+ if (!("score" in value) || value["score"] === void 0) return false;
1409
+ if (!("keep" in value) || value["keep"] === void 0) return false;
1410
+ return true;
1411
+ }
1412
+ function QueryClassificationFromJSON(json) {
1413
+ return QueryClassificationFromJSONTyped(json, false);
1414
+ }
1415
+ function QueryClassificationFromJSONTyped(json, ignoreDiscriminator) {
1416
+ if (json == null) {
1417
+ return json;
1418
+ }
1419
+ return {
1420
+ "query": json["query"],
1421
+ "score": json["score"],
1422
+ "keep": json["keep"]
1423
+ };
1424
+ }
1425
+ function QueryClassificationToJSON(json) {
1426
+ return QueryClassificationToJSONTyped(json, false);
1427
+ }
1428
+ function QueryClassificationToJSONTyped(value, ignoreDiscriminator = false) {
1429
+ if (value == null) {
1430
+ return value;
1431
+ }
1432
+ return {
1433
+ "query": value["query"],
1434
+ "score": value["score"],
1435
+ "keep": value["keep"]
1436
+ };
1437
+ }
1438
+
1439
+ // src/generated/models/ClassifyResponse.ts
1440
+ function instanceOfClassifyResponse(value) {
1441
+ return true;
1442
+ }
1443
+ function ClassifyResponseFromJSON(json) {
1444
+ return ClassifyResponseFromJSONTyped(json, false);
1445
+ }
1446
+ function ClassifyResponseFromJSONTyped(json, ignoreDiscriminator) {
1447
+ if (json == null) {
1448
+ return json;
1449
+ }
1450
+ return {
1451
+ "results": json["results"] == null ? void 0 : json["results"].map(QueryClassificationFromJSON)
1452
+ };
1453
+ }
1454
+ function ClassifyResponseToJSON(json) {
1455
+ return ClassifyResponseToJSONTyped(json, false);
1456
+ }
1457
+ function ClassifyResponseToJSONTyped(value, ignoreDiscriminator = false) {
1458
+ if (value == null) {
1459
+ return value;
1460
+ }
1461
+ return {
1462
+ "results": value["results"] == null ? void 0 : value["results"].map(QueryClassificationToJSON)
1463
+ };
1464
+ }
1465
+
1360
1466
  // src/generated/models/ContentsDeliveryMode.ts
1361
1467
  var ContentsDeliveryMode = {
1362
1468
  Url: "url",
@@ -1713,7 +1819,8 @@ function KnowledgeCardToJSONTyped(value, ignoreDiscriminator = false) {
1713
1819
  // src/generated/models/SearchEffortLevel.ts
1714
1820
  var SearchEffortLevel = {
1715
1821
  Fast: "fast",
1716
- Instant: "instant"
1822
+ Instant: "instant",
1823
+ Deep: "deep"
1717
1824
  };
1718
1825
  function instanceOfSearchEffortLevel(value) {
1719
1826
  for (const key in SearchEffortLevel) {
@@ -1839,7 +1946,7 @@ function SourcesFromJSONTyped(json, ignoreDiscriminator) {
1839
1946
  return json;
1840
1947
  }
1841
1948
  return {
1842
- "tako": json["tako"] == null ? void 0 : TakoSourceSettingsFromJSON(json["tako"]),
1949
+ "data": json["data"] == null ? void 0 : TakoSourceSettingsFromJSON(json["data"]),
1843
1950
  "web": json["web"] == null ? void 0 : SourceSettingsFromJSON(json["web"])
1844
1951
  };
1845
1952
  }
@@ -1851,7 +1958,7 @@ function SourcesToJSONTyped(value, ignoreDiscriminator = false) {
1851
1958
  return value;
1852
1959
  }
1853
1960
  return {
1854
- "tako": TakoSourceSettingsToJSON(value["tako"]),
1961
+ "data": TakoSourceSettingsToJSON(value["data"]),
1855
1962
  "web": SourceSettingsToJSON(value["web"])
1856
1963
  };
1857
1964
  }
@@ -1968,6 +2075,42 @@ var TakoApi = class extends BaseAPI {
1968
2075
  const response = await this.answerRaw(requestParameters, initOverrides);
1969
2076
  return await response.value();
1970
2077
  }
2078
+ /**
2079
+ * Creates request options for classify without sending the request
2080
+ */
2081
+ async classifyRequestOpts(requestParameters) {
2082
+ const queryParameters = {};
2083
+ const headerParameters = {};
2084
+ headerParameters["Content-Type"] = "application/json";
2085
+ if (this.configuration && this.configuration.apiKey) {
2086
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
2087
+ }
2088
+ let urlPath = `/v1/classify`;
2089
+ return {
2090
+ path: urlPath,
2091
+ method: "POST",
2092
+ headers: headerParameters,
2093
+ query: queryParameters,
2094
+ body: ClassifyRequestToJSON(requestParameters["classifyRequest"])
2095
+ };
2096
+ }
2097
+ /**
2098
+ * Score a batch of queries for whether Tako search will return a result. Returns a probability and a recall-skewed keep flag per query. Free; intended for pre-filtering before /v3/search.
2099
+ * Classify queries
2100
+ */
2101
+ async classifyRaw(requestParameters, initOverrides) {
2102
+ const requestOptions = await this.classifyRequestOpts(requestParameters);
2103
+ const response = await this.request(requestOptions, initOverrides);
2104
+ return new JSONApiResponse(response, (jsonValue) => ClassifyResponseFromJSON(jsonValue));
2105
+ }
2106
+ /**
2107
+ * Score a batch of queries for whether Tako search will return a result. Returns a probability and a recall-skewed keep flag per query. Free; intended for pre-filtering before /v3/search.
2108
+ * Classify queries
2109
+ */
2110
+ async classify(requestParameters = {}, initOverrides) {
2111
+ const response = await this.classifyRaw(requestParameters, initOverrides);
2112
+ return await response.value();
2113
+ }
1971
2114
  /**
1972
2115
  * Creates request options for contents without sending the request
1973
2116
  */
@@ -3146,6 +3289,14 @@ var Tako = class {
3146
3289
  CardSourcePrivateIndexFromJSONTyped,
3147
3290
  CardSourcePrivateIndexToJSON,
3148
3291
  CardSourcePrivateIndexToJSONTyped,
3292
+ ClassifyRequestFromJSON,
3293
+ ClassifyRequestFromJSONTyped,
3294
+ ClassifyRequestToJSON,
3295
+ ClassifyRequestToJSONTyped,
3296
+ ClassifyResponseFromJSON,
3297
+ ClassifyResponseFromJSONTyped,
3298
+ ClassifyResponseToJSON,
3299
+ ClassifyResponseToJSONTyped,
3149
3300
  ComponentConfigFromJSON,
3150
3301
  ComponentConfigFromJSONTyped,
3151
3302
  ComponentConfigToJSON,
@@ -3232,6 +3383,10 @@ var Tako = class {
3232
3383
  OutputSettingsFromJSONTyped,
3233
3384
  OutputSettingsToJSON,
3234
3385
  OutputSettingsToJSONTyped,
3386
+ QueryClassificationFromJSON,
3387
+ QueryClassificationFromJSONTyped,
3388
+ QueryClassificationToJSON,
3389
+ QueryClassificationToJSONTyped,
3235
3390
  ReasoningEventFromJSON,
3236
3391
  ReasoningEventFromJSONTyped,
3237
3392
  ReasoningEventKindEnum,
@@ -3351,6 +3506,8 @@ var Tako = class {
3351
3506
  instanceOfCardSourceIndex,
3352
3507
  instanceOfCardSourceIndexSegment,
3353
3508
  instanceOfCardSourcePrivateIndex,
3509
+ instanceOfClassifyRequest,
3510
+ instanceOfClassifyResponse,
3354
3511
  instanceOfComponentConfig,
3355
3512
  instanceOfComponentTypeEnum,
3356
3513
  instanceOfContentFormat,
@@ -3370,6 +3527,7 @@ var Tako = class {
3370
3527
  instanceOfKnowledgeCardSource,
3371
3528
  instanceOfKnowledgeCardSourceIndexesInner,
3372
3529
  instanceOfOutputSettings,
3530
+ instanceOfQueryClassification,
3373
3531
  instanceOfReasoningEvent,
3374
3532
  instanceOfResultContent,
3375
3533
  instanceOfSearchEffortLevel,
package/dist/index.d.cts CHANGED
@@ -609,6 +609,12 @@ interface TakoCard {
609
609
  * @memberof TakoCard
610
610
  */
611
611
  content?: ResultContent | null;
612
+ /**
613
+ * Numeric relevance of this card to the query on a 1.0-5.0 scale (5.0 = exact match; higher is more relevant). Only populated for entitled accounts; null otherwise.
614
+ * @type {number}
615
+ * @memberof TakoCard
616
+ */
617
+ relevance_score?: number | null;
612
618
  }
613
619
  /**
614
620
  * Check if a given object implements the TakoCard interface.
@@ -993,7 +999,7 @@ interface AgentRunRequest {
993
999
  */
994
1000
  effort?: AgentEffortLevel;
995
1001
  /**
996
- * Which sources the agent may use: 'tako' (connected data) and/or 'web' (open-web search). Defaults to ['tako'].
1002
+ * Which sources the agent may use: 'data' (curated knowledge) and/or 'web' (open-web search). Defaults to ['data', 'web']. The legacy value 'tako' is accepted as a synonym for 'data'.
997
1003
  * @type {Array<AgentRunRequestSourceIndexesEnum>}
998
1004
  * @memberof AgentRunRequest
999
1005
  */
@@ -1021,7 +1027,7 @@ interface AgentRunRequest {
1021
1027
  * @export
1022
1028
  */
1023
1029
  declare const AgentRunRequestSourceIndexesEnum: {
1024
- readonly Tako: "tako";
1030
+ readonly Data: "data";
1025
1031
  readonly Web: "web";
1026
1032
  };
1027
1033
  type AgentRunRequestSourceIndexesEnum = typeof AgentRunRequestSourceIndexesEnum[keyof typeof AgentRunRequestSourceIndexesEnum];
@@ -1197,6 +1203,119 @@ declare function AnswerResponseFromJSONTyped(json: any, ignoreDiscriminator: boo
1197
1203
  declare function AnswerResponseToJSON(json: any): AnswerResponse;
1198
1204
  declare function AnswerResponseToJSONTyped(value?: AnswerResponse | null, ignoreDiscriminator?: boolean): any;
1199
1205
 
1206
+ /**
1207
+ * Knowledge Search API
1208
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
1209
+ *
1210
+ * The version of the OpenAPI document: 1.0.0
1211
+ *
1212
+ *
1213
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1214
+ * https://openapi-generator.tech
1215
+ * Do not edit the class manually.
1216
+ */
1217
+ /**
1218
+ * Request for POST /api/v1/classify — a batch of queries to score.
1219
+ * @export
1220
+ * @interface ClassifyRequest
1221
+ */
1222
+ interface ClassifyRequest {
1223
+ /**
1224
+ * Queries to classify (1..200). Each is scored independently.
1225
+ * @type {Array<string>}
1226
+ * @memberof ClassifyRequest
1227
+ */
1228
+ queries: Array<string>;
1229
+ }
1230
+ /**
1231
+ * Check if a given object implements the ClassifyRequest interface.
1232
+ */
1233
+ declare function instanceOfClassifyRequest(value: object): value is ClassifyRequest;
1234
+ declare function ClassifyRequestFromJSON(json: any): ClassifyRequest;
1235
+ declare function ClassifyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClassifyRequest;
1236
+ declare function ClassifyRequestToJSON(json: any): ClassifyRequest;
1237
+ declare function ClassifyRequestToJSONTyped(value?: ClassifyRequest | null, ignoreDiscriminator?: boolean): any;
1238
+
1239
+ /**
1240
+ * Knowledge Search API
1241
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
1242
+ *
1243
+ * The version of the OpenAPI document: 1.0.0
1244
+ *
1245
+ *
1246
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1247
+ * https://openapi-generator.tech
1248
+ * Do not edit the class manually.
1249
+ */
1250
+ /**
1251
+ *
1252
+ * @export
1253
+ * @interface QueryClassification
1254
+ */
1255
+ interface QueryClassification {
1256
+ /**
1257
+ *
1258
+ * @type {string}
1259
+ * @memberof QueryClassification
1260
+ */
1261
+ query: string;
1262
+ /**
1263
+ *
1264
+ * @type {number}
1265
+ * @memberof QueryClassification
1266
+ */
1267
+ score: number;
1268
+ /**
1269
+ *
1270
+ * @type {boolean}
1271
+ * @memberof QueryClassification
1272
+ */
1273
+ keep: boolean;
1274
+ }
1275
+ /**
1276
+ * Check if a given object implements the QueryClassification interface.
1277
+ */
1278
+ declare function instanceOfQueryClassification(value: object): value is QueryClassification;
1279
+ declare function QueryClassificationFromJSON(json: any): QueryClassification;
1280
+ declare function QueryClassificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): QueryClassification;
1281
+ declare function QueryClassificationToJSON(json: any): QueryClassification;
1282
+ declare function QueryClassificationToJSONTyped(value?: QueryClassification | null, ignoreDiscriminator?: boolean): any;
1283
+
1284
+ /**
1285
+ * Knowledge Search API
1286
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
1287
+ *
1288
+ * The version of the OpenAPI document: 1.0.0
1289
+ *
1290
+ *
1291
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1292
+ * https://openapi-generator.tech
1293
+ * Do not edit the class manually.
1294
+ */
1295
+
1296
+ /**
1297
+ * Response for POST /api/v1/classify — one classification per input query,
1298
+ * in request order.
1299
+ * @export
1300
+ * @interface ClassifyResponse
1301
+ */
1302
+ interface ClassifyResponse {
1303
+ /**
1304
+ *
1305
+ * @type {Array<QueryClassification>}
1306
+ * @memberof ClassifyResponse
1307
+ */
1308
+ results?: Array<QueryClassification>;
1309
+ }
1310
+ /**
1311
+ * Check if a given object implements the ClassifyResponse interface.
1312
+ */
1313
+ declare function instanceOfClassifyResponse(value: object): value is ClassifyResponse;
1314
+ declare function ClassifyResponseFromJSON(json: any): ClassifyResponse;
1315
+ declare function ClassifyResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClassifyResponse;
1316
+ declare function ClassifyResponseToJSON(json: any): ClassifyResponse;
1317
+ declare function ClassifyResponseToJSONTyped(value?: ClassifyResponse | null, ignoreDiscriminator?: boolean): any;
1318
+
1200
1319
  /**
1201
1320
  * Knowledge Search API
1202
1321
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
@@ -1790,14 +1909,16 @@ declare function KnowledgeCardToJSONTyped(value?: KnowledgeCard | null, ignoreDi
1790
1909
  /**
1791
1910
  * Public effort taxonomy for the new endpoints. FAST is the default. INSTANT
1792
1911
  * serves cached embeds without re-running data retrieval and is available in all
1793
- * environments. Cannot be combined with sources.tako.defer_data_retrieval.
1794
- * The generated OpenAPI/SDK advertises exactly these members, so we add values
1795
- * only as the pipeline gains support.
1912
+ * environments (cannot be combined with sources.data.defer_data_retrieval).
1913
+ * DEEP widens TAKO retrieval and adds an LLM rerank for higher-quality results
1914
+ * (slower; billed at a premium tier). The generated OpenAPI/SDK advertises
1915
+ * exactly these members, so we add values only as the pipeline gains support.
1796
1916
  * @export
1797
1917
  */
1798
1918
  declare const SearchEffortLevel: {
1799
1919
  readonly Fast: "fast";
1800
1920
  readonly Instant: "instant";
1921
+ readonly Deep: "deep";
1801
1922
  };
1802
1923
  type SearchEffortLevel = typeof SearchEffortLevel[keyof typeof SearchEffortLevel];
1803
1924
  declare function instanceOfSearchEffortLevel(value: any): boolean;
@@ -1943,16 +2064,19 @@ declare function SourceSettingsToJSONTyped(value?: SourceSettings | null, ignore
1943
2064
 
1944
2065
  /**
1945
2066
  * Per-source settings. An index is searched iff its field is present.
2067
+ *
2068
+ * The Tako data source is named `data`. The legacy key `tako` is still
2069
+ * accepted as a synonym (mapped to `data` before validation).
1946
2070
  * @export
1947
2071
  * @interface Sources
1948
2072
  */
1949
2073
  interface Sources {
1950
2074
  /**
1951
- * Tako card source. Searched iff present.
2075
+ * Tako data source (curated knowledge). Searched iff present. The legacy key 'tako' is accepted as a synonym.
1952
2076
  * @type {TakoSourceSettings}
1953
2077
  * @memberof Sources
1954
2078
  */
1955
- tako?: TakoSourceSettings | null;
2079
+ data?: TakoSourceSettings | null;
1956
2080
  /**
1957
2081
  * Web source. Searched iff present.
1958
2082
  * @type {SourceSettings}
@@ -1994,13 +2118,13 @@ interface SearchRequest {
1994
2118
  */
1995
2119
  query: string;
1996
2120
  /**
1997
- * Search effort level. Only 'fast' is currently supported.
2121
+ * Search effort level: 'fast' (default), 'instant', or 'deep'.
1998
2122
  * @type {SearchEffortLevel}
1999
2123
  * @memberof SearchRequest
2000
2124
  */
2001
2125
  effort?: SearchEffortLevel;
2002
2126
  /**
2003
- * Per-source settings. An index is searched iff its key is present; defaults to {tako:{}} (tako-only, count 5).
2127
+ * Per-source settings. An index is searched iff its key is present; defaults to {data:{}, web:{}} (data + web, count 5 each). The legacy key 'tako' is accepted as a synonym for 'data'.
2004
2128
  * @type {Sources}
2005
2129
  * @memberof SearchRequest
2006
2130
  */
@@ -2106,6 +2230,9 @@ declare function SearchResponseToJSONTyped(value?: SearchResponse | null, ignore
2106
2230
  interface AnswerRequest {
2107
2231
  searchRequest?: SearchRequest;
2108
2232
  }
2233
+ interface ClassifyOperationRequest {
2234
+ classifyRequest?: ClassifyRequest;
2235
+ }
2109
2236
  interface ContentsOperationRequest {
2110
2237
  contentsRequest?: ContentsRequest;
2111
2238
  }
@@ -2143,6 +2270,27 @@ interface TakoApiInterface {
2143
2270
  * Answer
2144
2271
  */
2145
2272
  answer(requestParameters: AnswerRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<AnswerResponse>;
2273
+ /**
2274
+ * Creates request options for classify without sending the request
2275
+ * @param {ClassifyRequest} [classifyRequest]
2276
+ * @throws {RequiredError}
2277
+ * @memberof TakoApiInterface
2278
+ */
2279
+ classifyRequestOpts(requestParameters: ClassifyOperationRequest): Promise<RequestOpts>;
2280
+ /**
2281
+ * Score a batch of queries for whether Tako search will return a result. Returns a probability and a recall-skewed keep flag per query. Free; intended for pre-filtering before /v3/search.
2282
+ * @summary Classify queries
2283
+ * @param {ClassifyRequest} [classifyRequest]
2284
+ * @param {*} [options] Override http request option.
2285
+ * @throws {RequiredError}
2286
+ * @memberof TakoApiInterface
2287
+ */
2288
+ classifyRaw(requestParameters: ClassifyOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<ClassifyResponse>>;
2289
+ /**
2290
+ * Score a batch of queries for whether Tako search will return a result. Returns a probability and a recall-skewed keep flag per query. Free; intended for pre-filtering before /v3/search.
2291
+ * Classify queries
2292
+ */
2293
+ classify(requestParameters: ClassifyOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ClassifyResponse>;
2146
2294
  /**
2147
2295
  * Creates request options for contents without sending the request
2148
2296
  * @param {ContentsRequest} [contentsRequest]
@@ -2223,6 +2371,20 @@ declare class TakoApi extends BaseAPI implements TakoApiInterface {
2223
2371
  * Answer
2224
2372
  */
2225
2373
  answer(requestParameters?: AnswerRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<AnswerResponse>;
2374
+ /**
2375
+ * Creates request options for classify without sending the request
2376
+ */
2377
+ classifyRequestOpts(requestParameters: ClassifyOperationRequest): Promise<RequestOpts>;
2378
+ /**
2379
+ * Score a batch of queries for whether Tako search will return a result. Returns a probability and a recall-skewed keep flag per query. Free; intended for pre-filtering before /v3/search.
2380
+ * Classify queries
2381
+ */
2382
+ classifyRaw(requestParameters: ClassifyOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<ClassifyResponse>>;
2383
+ /**
2384
+ * Score a batch of queries for whether Tako search will return a result. Returns a probability and a recall-skewed keep flag per query. Free; intended for pre-filtering before /v3/search.
2385
+ * Classify queries
2386
+ */
2387
+ classify(requestParameters?: ClassifyOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ClassifyResponse>;
2226
2388
  /**
2227
2389
  * Creates request options for contents without sending the request
2228
2390
  */
@@ -3416,4 +3578,4 @@ declare class Tako {
3416
3578
  createCard(request: CreateCardRequest): Promise<KnowledgeCard>;
3417
3579
  }
3418
3580
 
3419
- export { APIErrorType, APIErrorTypeFromJSON, APIErrorTypeFromJSONTyped, APIErrorTypeToJSON, APIErrorTypeToJSONTyped, AgentApi, type AgentApiInterface, AgentEffortLevel, AgentEffortLevelFromJSON, AgentEffortLevelFromJSONTyped, AgentEffortLevelToJSON, AgentEffortLevelToJSONTyped, type AgentOutputSettings, AgentOutputSettingsFromJSON, AgentOutputSettingsFromJSONTyped, AgentOutputSettingsToJSON, AgentOutputSettingsToJSONTyped, AgentResource, type AgentResult, type AgentResultEvent, AgentResultEventFromJSON, AgentResultEventFromJSONTyped, AgentResultEventKindEnum, AgentResultEventToJSON, AgentResultEventToJSONTyped, AgentResultFromJSON, AgentResultFromJSONTyped, AgentResultToJSON, AgentResultToJSONTyped, type AgentRun, AgentRunFromJSON, AgentRunFromJSONTyped, AgentRunObjectEnum, type AgentRunRequest, AgentRunRequestFromJSON, AgentRunRequestFromJSONTyped, AgentRunRequestSourceIndexesEnum, AgentRunRequestToJSON, AgentRunRequestToJSONTyped, AgentRunStatus, AgentRunStatusFromJSON, AgentRunStatusFromJSONTyped, AgentRunStatusToJSON, AgentRunStatusToJSONTyped, AgentRunToJSON, AgentRunToJSONTyped, AgentStream, type AgentStreamEnvelope, AgentStreamEnvelopeFromJSON, AgentStreamEnvelopeFromJSONTyped, AgentStreamEnvelopeToJSON, AgentStreamEnvelopeToJSONTyped, type AgentStreamOptions, type AnswerRequest, type AnswerResponse, AnswerResponseFromJSON, AnswerResponseFromJSONTyped, AnswerResponseToJSON, AnswerResponseToJSONTyped, type ApiResponse, BASE_PATH, BaseAPI, type BaseAPIError, BaseAPIErrorFromJSON, BaseAPIErrorFromJSONTyped, BaseAPIErrorToJSON, BaseAPIErrorToJSONTyped, BlobApiResponse, type Block, BlockFromJSON, BlockFromJSONTyped, BlockToJSON, BlockToJSONTyped, COLLECTION_FORMATS, CardSourceIndex, CardSourceIndexFromJSON, CardSourceIndexFromJSONTyped, type CardSourceIndexSegment, CardSourceIndexSegmentFromJSON, CardSourceIndexSegmentFromJSONTyped, CardSourceIndexSegmentToJSON, CardSourceIndexSegmentToJSONTyped, CardSourceIndexToJSON, CardSourceIndexToJSONTyped, type CardSourcePrivateIndex, CardSourcePrivateIndexFromJSON, CardSourcePrivateIndexFromJSONTyped, CardSourcePrivateIndexToJSON, CardSourcePrivateIndexToJSONTyped, type ComponentConfig, ComponentConfigFromJSON, ComponentConfigFromJSONTyped, ComponentConfigToJSON, ComponentConfigToJSONTyped, ComponentTypeEnum, ComponentTypeEnumFromJSON, ComponentTypeEnumFromJSONTyped, ComponentTypeEnumToJSON, ComponentTypeEnumToJSONTyped, Configuration, type ConfigurationParameters, type Consume, ContentFormat, ContentFormatFromJSON, ContentFormatFromJSONTyped, ContentFormatToJSON, ContentFormatToJSONTyped, type ContentItem, ContentItemFromJSON, ContentItemFromJSONTyped, ContentItemToJSON, ContentItemToJSONTyped, ContentsDeliveryMode, ContentsDeliveryModeFromJSON, ContentsDeliveryModeFromJSONTyped, ContentsDeliveryModeToJSON, ContentsDeliveryModeToJSONTyped, type ContentsOperationRequest, type ContentsRequest, ContentsRequestFromJSON, ContentsRequestFromJSONTyped, ContentsRequestToJSON, ContentsRequestToJSONTyped, type ContentsResponse, ContentsResponseFromJSON, ContentsResponseFromJSONTyped, ContentsResponseToJSON, ContentsResponseToJSONTyped, type CreateAgentRunRequest, type CreateCard400Response, CreateCard400ResponseFromJSON, CreateCard400ResponseFromJSONTyped, CreateCard400ResponseToJSON, CreateCard400ResponseToJSONTyped, type CreateCardOperationRequest, type CreateCardRequest, CreateCardRequestFromJSON, CreateCardRequestFromJSONTyped, CreateCardRequestToJSON, CreateCardRequestToJSONTyped, type DataPipelineAnswerEvent, DataPipelineAnswerEventFromJSON, DataPipelineAnswerEventFromJSONTyped, DataPipelineAnswerEventKindEnum, DataPipelineAnswerEventToJSON, DataPipelineAnswerEventToJSONTyped, DefaultConfig, type ErrorContext, type ErrorObject, ErrorObjectFromJSON, ErrorObjectFromJSONTyped, ErrorObjectToJSON, ErrorObjectToJSONTyped, type FetchAPI, FetchError, type FetchParams, type GetAgentRunRequest, type HTTPBody, type HTTPHeaders, type HTTPMethod, type HTTPQuery, type HTTPRequestInit, type HeartbeatEvent, HeartbeatEventFromJSON, HeartbeatEventFromJSONTyped, HeartbeatEventKindEnum, HeartbeatEventToJSON, HeartbeatEventToJSONTyped, type IdealVizDecision, IdealVizDecisionFromJSON, IdealVizDecisionFromJSONTyped, IdealVizDecisionToJSON, IdealVizDecisionToJSONTyped, type InitOverrideFunction, JSONApiResponse, type Json, type KnowledgeCard, KnowledgeCardFromJSON, KnowledgeCardFromJSONTyped, type KnowledgeCardMethodology, KnowledgeCardMethodologyFromJSON, KnowledgeCardMethodologyFromJSONTyped, KnowledgeCardMethodologyToJSON, KnowledgeCardMethodologyToJSONTyped, KnowledgeCardRelevance, KnowledgeCardRelevanceFromJSON, KnowledgeCardRelevanceFromJSONTyped, KnowledgeCardRelevanceToJSON, KnowledgeCardRelevanceToJSONTyped, type KnowledgeCardSource, KnowledgeCardSourceFromJSON, KnowledgeCardSourceFromJSONTyped, type KnowledgeCardSourceIndexesInner, KnowledgeCardSourceIndexesInnerFromJSON, KnowledgeCardSourceIndexesInnerFromJSONTyped, KnowledgeCardSourceIndexesInnerToJSON, KnowledgeCardSourceIndexesInnerToJSONTyped, KnowledgeCardSourceToJSON, KnowledgeCardSourceToJSONTyped, KnowledgeCardToJSON, KnowledgeCardToJSONTyped, type Middleware, type ModelPropertyNaming, type OutputSettings, OutputSettingsFromJSON, OutputSettingsFromJSONTyped, OutputSettingsToJSON, OutputSettingsToJSONTyped, type ReasoningEvent, ReasoningEventFromJSON, ReasoningEventFromJSONTyped, ReasoningEventKindEnum, ReasoningEventToJSON, ReasoningEventToJSONTyped, type RequestContext, type RequestOpts, RequiredError, type ResponseContext, ResponseError, type ResponseTransformer, type ResultContent, ResultContentFromJSON, ResultContentFromJSONTyped, ResultContentToJSON, ResultContentToJSONTyped, SearchEffortLevel, SearchEffortLevelFromJSON, SearchEffortLevelFromJSONTyped, SearchEffortLevelToJSON, SearchEffortLevelToJSONTyped, type SearchOperationRequest, type SearchRequest, SearchRequestFromJSON, SearchRequestFromJSONTyped, SearchRequestToJSON, SearchRequestToJSONTyped, type SearchResponse, SearchResponseFromJSON, SearchResponseFromJSONTyped, SearchResponseToJSON, SearchResponseToJSONTyped, type SourceIndex, SourceIndexFromJSON, SourceIndexFromJSONTyped, SourceIndexToJSON, SourceIndexToJSONTyped, type SourceSettings, SourceSettingsFromJSON, SourceSettingsFromJSONTyped, SourceSettingsToJSON, SourceSettingsToJSONTyped, type Sources, SourcesFromJSON, SourcesFromJSONTyped, SourcesToJSON, SourcesToJSONTyped, type StatusEvent, StatusEventFromJSON, StatusEventFromJSONTyped, StatusEventKindEnum, StatusEventToJSON, StatusEventToJSONTyped, StreamCategory, StreamCategoryFromJSON, StreamCategoryFromJSONTyped, StreamCategoryToJSON, StreamCategoryToJSONTyped, type StreamDoneEvent, StreamDoneEventFromJSON, StreamDoneEventFromJSONTyped, StreamDoneEventKindEnum, StreamDoneEventToJSON, StreamDoneEventToJSONTyped, type StreamResetEvent, StreamResetEventFromJSON, StreamResetEventFromJSONTyped, StreamResetEventKindEnum, StreamResetEventToJSON, StreamResetEventToJSONTyped, type SubagentEvent, SubagentEventEventEnum, SubagentEventFromJSON, SubagentEventFromJSONTyped, SubagentEventKindEnum, SubagentEventToJSON, SubagentEventToJSONTyped, Tako, TakoApi, type TakoApiInterface, type TakoCard, TakoCardFromJSON, TakoCardFromJSONTyped, TakoCardToJSON, TakoCardToJSONTyped, type TakoOptions, type TakoSourceSettings, TakoSourceSettingsFromJSON, TakoSourceSettingsFromJSONTyped, TakoSourceSettingsToJSON, TakoSourceSettingsToJSONTyped, TextApiResponse, type TextEvent, TextEventFromJSON, TextEventFromJSONTyped, TextEventKindEnum, TextEventToJSON, TextEventToJSONTyped, type ToolCallEvent, ToolCallEventFromJSON, ToolCallEventFromJSONTyped, ToolCallEventKindEnum, ToolCallEventToJSON, ToolCallEventToJSONTyped, type ToolErrorEvent, ToolErrorEventFromJSON, ToolErrorEventFromJSONTyped, ToolErrorEventKindEnum, ToolErrorEventToJSON, ToolErrorEventToJSONTyped, type ToolResultEvent, ToolResultEventFromJSON, ToolResultEventFromJSONTyped, ToolResultEventKindEnum, ToolResultEventToJSON, ToolResultEventToJSONTyped, type ToolRetryEvent, ToolRetryEventFromJSON, ToolRetryEventFromJSONTyped, ToolRetryEventKindEnum, ToolRetryEventToJSON, ToolRetryEventToJSONTyped, VoidApiResponse, type WebResult, WebResultFromJSON, WebResultFromJSONTyped, WebResultToJSON, WebResultToJSONTyped, canConsumeForm, exists, instanceOfAPIErrorType, instanceOfAgentEffortLevel, instanceOfAgentOutputSettings, instanceOfAgentResult, instanceOfAgentResultEvent, instanceOfAgentRun, instanceOfAgentRunRequest, instanceOfAgentRunStatus, instanceOfAgentStreamEnvelope, instanceOfAnswerResponse, instanceOfBaseAPIError, instanceOfCardSourceIndex, instanceOfCardSourceIndexSegment, instanceOfCardSourcePrivateIndex, instanceOfComponentConfig, instanceOfComponentTypeEnum, instanceOfContentFormat, instanceOfContentItem, instanceOfContentsDeliveryMode, instanceOfContentsRequest, instanceOfContentsResponse, instanceOfCreateCard400Response, instanceOfCreateCardRequest, instanceOfDataPipelineAnswerEvent, instanceOfErrorObject, instanceOfHeartbeatEvent, instanceOfIdealVizDecision, instanceOfKnowledgeCard, instanceOfKnowledgeCardMethodology, instanceOfKnowledgeCardRelevance, instanceOfKnowledgeCardSource, instanceOfKnowledgeCardSourceIndexesInner, instanceOfOutputSettings, instanceOfReasoningEvent, instanceOfResultContent, instanceOfSearchEffortLevel, instanceOfSearchRequest, instanceOfSearchResponse, instanceOfSourceIndex, instanceOfSourceSettings, instanceOfSources, instanceOfStatusEvent, instanceOfStreamCategory, instanceOfStreamDoneEvent, instanceOfStreamResetEvent, instanceOfSubagentEvent, instanceOfTakoCard, instanceOfTakoSourceSettings, instanceOfTextEvent, instanceOfToolCallEvent, instanceOfToolErrorEvent, instanceOfToolResultEvent, instanceOfToolRetryEvent, instanceOfWebResult, mapValues, querystring };
3581
+ export { APIErrorType, APIErrorTypeFromJSON, APIErrorTypeFromJSONTyped, APIErrorTypeToJSON, APIErrorTypeToJSONTyped, AgentApi, type AgentApiInterface, AgentEffortLevel, AgentEffortLevelFromJSON, AgentEffortLevelFromJSONTyped, AgentEffortLevelToJSON, AgentEffortLevelToJSONTyped, type AgentOutputSettings, AgentOutputSettingsFromJSON, AgentOutputSettingsFromJSONTyped, AgentOutputSettingsToJSON, AgentOutputSettingsToJSONTyped, AgentResource, type AgentResult, type AgentResultEvent, AgentResultEventFromJSON, AgentResultEventFromJSONTyped, AgentResultEventKindEnum, AgentResultEventToJSON, AgentResultEventToJSONTyped, AgentResultFromJSON, AgentResultFromJSONTyped, AgentResultToJSON, AgentResultToJSONTyped, type AgentRun, AgentRunFromJSON, AgentRunFromJSONTyped, AgentRunObjectEnum, type AgentRunRequest, AgentRunRequestFromJSON, AgentRunRequestFromJSONTyped, AgentRunRequestSourceIndexesEnum, AgentRunRequestToJSON, AgentRunRequestToJSONTyped, AgentRunStatus, AgentRunStatusFromJSON, AgentRunStatusFromJSONTyped, AgentRunStatusToJSON, AgentRunStatusToJSONTyped, AgentRunToJSON, AgentRunToJSONTyped, AgentStream, type AgentStreamEnvelope, AgentStreamEnvelopeFromJSON, AgentStreamEnvelopeFromJSONTyped, AgentStreamEnvelopeToJSON, AgentStreamEnvelopeToJSONTyped, type AgentStreamOptions, type AnswerRequest, type AnswerResponse, AnswerResponseFromJSON, AnswerResponseFromJSONTyped, AnswerResponseToJSON, AnswerResponseToJSONTyped, type ApiResponse, BASE_PATH, BaseAPI, type BaseAPIError, BaseAPIErrorFromJSON, BaseAPIErrorFromJSONTyped, BaseAPIErrorToJSON, BaseAPIErrorToJSONTyped, BlobApiResponse, type Block, BlockFromJSON, BlockFromJSONTyped, BlockToJSON, BlockToJSONTyped, COLLECTION_FORMATS, CardSourceIndex, CardSourceIndexFromJSON, CardSourceIndexFromJSONTyped, type CardSourceIndexSegment, CardSourceIndexSegmentFromJSON, CardSourceIndexSegmentFromJSONTyped, CardSourceIndexSegmentToJSON, CardSourceIndexSegmentToJSONTyped, CardSourceIndexToJSON, CardSourceIndexToJSONTyped, type CardSourcePrivateIndex, CardSourcePrivateIndexFromJSON, CardSourcePrivateIndexFromJSONTyped, CardSourcePrivateIndexToJSON, CardSourcePrivateIndexToJSONTyped, type ClassifyOperationRequest, type ClassifyRequest, ClassifyRequestFromJSON, ClassifyRequestFromJSONTyped, ClassifyRequestToJSON, ClassifyRequestToJSONTyped, type ClassifyResponse, ClassifyResponseFromJSON, ClassifyResponseFromJSONTyped, ClassifyResponseToJSON, ClassifyResponseToJSONTyped, type ComponentConfig, ComponentConfigFromJSON, ComponentConfigFromJSONTyped, ComponentConfigToJSON, ComponentConfigToJSONTyped, ComponentTypeEnum, ComponentTypeEnumFromJSON, ComponentTypeEnumFromJSONTyped, ComponentTypeEnumToJSON, ComponentTypeEnumToJSONTyped, Configuration, type ConfigurationParameters, type Consume, ContentFormat, ContentFormatFromJSON, ContentFormatFromJSONTyped, ContentFormatToJSON, ContentFormatToJSONTyped, type ContentItem, ContentItemFromJSON, ContentItemFromJSONTyped, ContentItemToJSON, ContentItemToJSONTyped, ContentsDeliveryMode, ContentsDeliveryModeFromJSON, ContentsDeliveryModeFromJSONTyped, ContentsDeliveryModeToJSON, ContentsDeliveryModeToJSONTyped, type ContentsOperationRequest, type ContentsRequest, ContentsRequestFromJSON, ContentsRequestFromJSONTyped, ContentsRequestToJSON, ContentsRequestToJSONTyped, type ContentsResponse, ContentsResponseFromJSON, ContentsResponseFromJSONTyped, ContentsResponseToJSON, ContentsResponseToJSONTyped, type CreateAgentRunRequest, type CreateCard400Response, CreateCard400ResponseFromJSON, CreateCard400ResponseFromJSONTyped, CreateCard400ResponseToJSON, CreateCard400ResponseToJSONTyped, type CreateCardOperationRequest, type CreateCardRequest, CreateCardRequestFromJSON, CreateCardRequestFromJSONTyped, CreateCardRequestToJSON, CreateCardRequestToJSONTyped, type DataPipelineAnswerEvent, DataPipelineAnswerEventFromJSON, DataPipelineAnswerEventFromJSONTyped, DataPipelineAnswerEventKindEnum, DataPipelineAnswerEventToJSON, DataPipelineAnswerEventToJSONTyped, DefaultConfig, type ErrorContext, type ErrorObject, ErrorObjectFromJSON, ErrorObjectFromJSONTyped, ErrorObjectToJSON, ErrorObjectToJSONTyped, type FetchAPI, FetchError, type FetchParams, type GetAgentRunRequest, type HTTPBody, type HTTPHeaders, type HTTPMethod, type HTTPQuery, type HTTPRequestInit, type HeartbeatEvent, HeartbeatEventFromJSON, HeartbeatEventFromJSONTyped, HeartbeatEventKindEnum, HeartbeatEventToJSON, HeartbeatEventToJSONTyped, type IdealVizDecision, IdealVizDecisionFromJSON, IdealVizDecisionFromJSONTyped, IdealVizDecisionToJSON, IdealVizDecisionToJSONTyped, type InitOverrideFunction, JSONApiResponse, type Json, type KnowledgeCard, KnowledgeCardFromJSON, KnowledgeCardFromJSONTyped, type KnowledgeCardMethodology, KnowledgeCardMethodologyFromJSON, KnowledgeCardMethodologyFromJSONTyped, KnowledgeCardMethodologyToJSON, KnowledgeCardMethodologyToJSONTyped, KnowledgeCardRelevance, KnowledgeCardRelevanceFromJSON, KnowledgeCardRelevanceFromJSONTyped, KnowledgeCardRelevanceToJSON, KnowledgeCardRelevanceToJSONTyped, type KnowledgeCardSource, KnowledgeCardSourceFromJSON, KnowledgeCardSourceFromJSONTyped, type KnowledgeCardSourceIndexesInner, KnowledgeCardSourceIndexesInnerFromJSON, KnowledgeCardSourceIndexesInnerFromJSONTyped, KnowledgeCardSourceIndexesInnerToJSON, KnowledgeCardSourceIndexesInnerToJSONTyped, KnowledgeCardSourceToJSON, KnowledgeCardSourceToJSONTyped, KnowledgeCardToJSON, KnowledgeCardToJSONTyped, type Middleware, type ModelPropertyNaming, type OutputSettings, OutputSettingsFromJSON, OutputSettingsFromJSONTyped, OutputSettingsToJSON, OutputSettingsToJSONTyped, type QueryClassification, QueryClassificationFromJSON, QueryClassificationFromJSONTyped, QueryClassificationToJSON, QueryClassificationToJSONTyped, type ReasoningEvent, ReasoningEventFromJSON, ReasoningEventFromJSONTyped, ReasoningEventKindEnum, ReasoningEventToJSON, ReasoningEventToJSONTyped, type RequestContext, type RequestOpts, RequiredError, type ResponseContext, ResponseError, type ResponseTransformer, type ResultContent, ResultContentFromJSON, ResultContentFromJSONTyped, ResultContentToJSON, ResultContentToJSONTyped, SearchEffortLevel, SearchEffortLevelFromJSON, SearchEffortLevelFromJSONTyped, SearchEffortLevelToJSON, SearchEffortLevelToJSONTyped, type SearchOperationRequest, type SearchRequest, SearchRequestFromJSON, SearchRequestFromJSONTyped, SearchRequestToJSON, SearchRequestToJSONTyped, type SearchResponse, SearchResponseFromJSON, SearchResponseFromJSONTyped, SearchResponseToJSON, SearchResponseToJSONTyped, type SourceIndex, SourceIndexFromJSON, SourceIndexFromJSONTyped, SourceIndexToJSON, SourceIndexToJSONTyped, type SourceSettings, SourceSettingsFromJSON, SourceSettingsFromJSONTyped, SourceSettingsToJSON, SourceSettingsToJSONTyped, type Sources, SourcesFromJSON, SourcesFromJSONTyped, SourcesToJSON, SourcesToJSONTyped, type StatusEvent, StatusEventFromJSON, StatusEventFromJSONTyped, StatusEventKindEnum, StatusEventToJSON, StatusEventToJSONTyped, StreamCategory, StreamCategoryFromJSON, StreamCategoryFromJSONTyped, StreamCategoryToJSON, StreamCategoryToJSONTyped, type StreamDoneEvent, StreamDoneEventFromJSON, StreamDoneEventFromJSONTyped, StreamDoneEventKindEnum, StreamDoneEventToJSON, StreamDoneEventToJSONTyped, type StreamResetEvent, StreamResetEventFromJSON, StreamResetEventFromJSONTyped, StreamResetEventKindEnum, StreamResetEventToJSON, StreamResetEventToJSONTyped, type SubagentEvent, SubagentEventEventEnum, SubagentEventFromJSON, SubagentEventFromJSONTyped, SubagentEventKindEnum, SubagentEventToJSON, SubagentEventToJSONTyped, Tako, TakoApi, type TakoApiInterface, type TakoCard, TakoCardFromJSON, TakoCardFromJSONTyped, TakoCardToJSON, TakoCardToJSONTyped, type TakoOptions, type TakoSourceSettings, TakoSourceSettingsFromJSON, TakoSourceSettingsFromJSONTyped, TakoSourceSettingsToJSON, TakoSourceSettingsToJSONTyped, TextApiResponse, type TextEvent, TextEventFromJSON, TextEventFromJSONTyped, TextEventKindEnum, TextEventToJSON, TextEventToJSONTyped, type ToolCallEvent, ToolCallEventFromJSON, ToolCallEventFromJSONTyped, ToolCallEventKindEnum, ToolCallEventToJSON, ToolCallEventToJSONTyped, type ToolErrorEvent, ToolErrorEventFromJSON, ToolErrorEventFromJSONTyped, ToolErrorEventKindEnum, ToolErrorEventToJSON, ToolErrorEventToJSONTyped, type ToolResultEvent, ToolResultEventFromJSON, ToolResultEventFromJSONTyped, ToolResultEventKindEnum, ToolResultEventToJSON, ToolResultEventToJSONTyped, type ToolRetryEvent, ToolRetryEventFromJSON, ToolRetryEventFromJSONTyped, ToolRetryEventKindEnum, ToolRetryEventToJSON, ToolRetryEventToJSONTyped, VoidApiResponse, type WebResult, WebResultFromJSON, WebResultFromJSONTyped, WebResultToJSON, WebResultToJSONTyped, canConsumeForm, exists, instanceOfAPIErrorType, instanceOfAgentEffortLevel, instanceOfAgentOutputSettings, instanceOfAgentResult, instanceOfAgentResultEvent, instanceOfAgentRun, instanceOfAgentRunRequest, instanceOfAgentRunStatus, instanceOfAgentStreamEnvelope, instanceOfAnswerResponse, instanceOfBaseAPIError, instanceOfCardSourceIndex, instanceOfCardSourceIndexSegment, instanceOfCardSourcePrivateIndex, instanceOfClassifyRequest, instanceOfClassifyResponse, instanceOfComponentConfig, instanceOfComponentTypeEnum, instanceOfContentFormat, instanceOfContentItem, instanceOfContentsDeliveryMode, instanceOfContentsRequest, instanceOfContentsResponse, instanceOfCreateCard400Response, instanceOfCreateCardRequest, instanceOfDataPipelineAnswerEvent, instanceOfErrorObject, instanceOfHeartbeatEvent, instanceOfIdealVizDecision, instanceOfKnowledgeCard, instanceOfKnowledgeCardMethodology, instanceOfKnowledgeCardRelevance, instanceOfKnowledgeCardSource, instanceOfKnowledgeCardSourceIndexesInner, instanceOfOutputSettings, instanceOfQueryClassification, instanceOfReasoningEvent, instanceOfResultContent, instanceOfSearchEffortLevel, instanceOfSearchRequest, instanceOfSearchResponse, instanceOfSourceIndex, instanceOfSourceSettings, instanceOfSources, instanceOfStatusEvent, instanceOfStreamCategory, instanceOfStreamDoneEvent, instanceOfStreamResetEvent, instanceOfSubagentEvent, instanceOfTakoCard, instanceOfTakoSourceSettings, instanceOfTextEvent, instanceOfToolCallEvent, instanceOfToolErrorEvent, instanceOfToolResultEvent, instanceOfToolRetryEvent, instanceOfWebResult, mapValues, querystring };
package/dist/index.d.ts CHANGED
@@ -609,6 +609,12 @@ interface TakoCard {
609
609
  * @memberof TakoCard
610
610
  */
611
611
  content?: ResultContent | null;
612
+ /**
613
+ * Numeric relevance of this card to the query on a 1.0-5.0 scale (5.0 = exact match; higher is more relevant). Only populated for entitled accounts; null otherwise.
614
+ * @type {number}
615
+ * @memberof TakoCard
616
+ */
617
+ relevance_score?: number | null;
612
618
  }
613
619
  /**
614
620
  * Check if a given object implements the TakoCard interface.
@@ -993,7 +999,7 @@ interface AgentRunRequest {
993
999
  */
994
1000
  effort?: AgentEffortLevel;
995
1001
  /**
996
- * Which sources the agent may use: 'tako' (connected data) and/or 'web' (open-web search). Defaults to ['tako'].
1002
+ * Which sources the agent may use: 'data' (curated knowledge) and/or 'web' (open-web search). Defaults to ['data', 'web']. The legacy value 'tako' is accepted as a synonym for 'data'.
997
1003
  * @type {Array<AgentRunRequestSourceIndexesEnum>}
998
1004
  * @memberof AgentRunRequest
999
1005
  */
@@ -1021,7 +1027,7 @@ interface AgentRunRequest {
1021
1027
  * @export
1022
1028
  */
1023
1029
  declare const AgentRunRequestSourceIndexesEnum: {
1024
- readonly Tako: "tako";
1030
+ readonly Data: "data";
1025
1031
  readonly Web: "web";
1026
1032
  };
1027
1033
  type AgentRunRequestSourceIndexesEnum = typeof AgentRunRequestSourceIndexesEnum[keyof typeof AgentRunRequestSourceIndexesEnum];
@@ -1197,6 +1203,119 @@ declare function AnswerResponseFromJSONTyped(json: any, ignoreDiscriminator: boo
1197
1203
  declare function AnswerResponseToJSON(json: any): AnswerResponse;
1198
1204
  declare function AnswerResponseToJSONTyped(value?: AnswerResponse | null, ignoreDiscriminator?: boolean): any;
1199
1205
 
1206
+ /**
1207
+ * Knowledge Search API
1208
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
1209
+ *
1210
+ * The version of the OpenAPI document: 1.0.0
1211
+ *
1212
+ *
1213
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1214
+ * https://openapi-generator.tech
1215
+ * Do not edit the class manually.
1216
+ */
1217
+ /**
1218
+ * Request for POST /api/v1/classify — a batch of queries to score.
1219
+ * @export
1220
+ * @interface ClassifyRequest
1221
+ */
1222
+ interface ClassifyRequest {
1223
+ /**
1224
+ * Queries to classify (1..200). Each is scored independently.
1225
+ * @type {Array<string>}
1226
+ * @memberof ClassifyRequest
1227
+ */
1228
+ queries: Array<string>;
1229
+ }
1230
+ /**
1231
+ * Check if a given object implements the ClassifyRequest interface.
1232
+ */
1233
+ declare function instanceOfClassifyRequest(value: object): value is ClassifyRequest;
1234
+ declare function ClassifyRequestFromJSON(json: any): ClassifyRequest;
1235
+ declare function ClassifyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClassifyRequest;
1236
+ declare function ClassifyRequestToJSON(json: any): ClassifyRequest;
1237
+ declare function ClassifyRequestToJSONTyped(value?: ClassifyRequest | null, ignoreDiscriminator?: boolean): any;
1238
+
1239
+ /**
1240
+ * Knowledge Search API
1241
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
1242
+ *
1243
+ * The version of the OpenAPI document: 1.0.0
1244
+ *
1245
+ *
1246
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1247
+ * https://openapi-generator.tech
1248
+ * Do not edit the class manually.
1249
+ */
1250
+ /**
1251
+ *
1252
+ * @export
1253
+ * @interface QueryClassification
1254
+ */
1255
+ interface QueryClassification {
1256
+ /**
1257
+ *
1258
+ * @type {string}
1259
+ * @memberof QueryClassification
1260
+ */
1261
+ query: string;
1262
+ /**
1263
+ *
1264
+ * @type {number}
1265
+ * @memberof QueryClassification
1266
+ */
1267
+ score: number;
1268
+ /**
1269
+ *
1270
+ * @type {boolean}
1271
+ * @memberof QueryClassification
1272
+ */
1273
+ keep: boolean;
1274
+ }
1275
+ /**
1276
+ * Check if a given object implements the QueryClassification interface.
1277
+ */
1278
+ declare function instanceOfQueryClassification(value: object): value is QueryClassification;
1279
+ declare function QueryClassificationFromJSON(json: any): QueryClassification;
1280
+ declare function QueryClassificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): QueryClassification;
1281
+ declare function QueryClassificationToJSON(json: any): QueryClassification;
1282
+ declare function QueryClassificationToJSONTyped(value?: QueryClassification | null, ignoreDiscriminator?: boolean): any;
1283
+
1284
+ /**
1285
+ * Knowledge Search API
1286
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
1287
+ *
1288
+ * The version of the OpenAPI document: 1.0.0
1289
+ *
1290
+ *
1291
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1292
+ * https://openapi-generator.tech
1293
+ * Do not edit the class manually.
1294
+ */
1295
+
1296
+ /**
1297
+ * Response for POST /api/v1/classify — one classification per input query,
1298
+ * in request order.
1299
+ * @export
1300
+ * @interface ClassifyResponse
1301
+ */
1302
+ interface ClassifyResponse {
1303
+ /**
1304
+ *
1305
+ * @type {Array<QueryClassification>}
1306
+ * @memberof ClassifyResponse
1307
+ */
1308
+ results?: Array<QueryClassification>;
1309
+ }
1310
+ /**
1311
+ * Check if a given object implements the ClassifyResponse interface.
1312
+ */
1313
+ declare function instanceOfClassifyResponse(value: object): value is ClassifyResponse;
1314
+ declare function ClassifyResponseFromJSON(json: any): ClassifyResponse;
1315
+ declare function ClassifyResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClassifyResponse;
1316
+ declare function ClassifyResponseToJSON(json: any): ClassifyResponse;
1317
+ declare function ClassifyResponseToJSONTyped(value?: ClassifyResponse | null, ignoreDiscriminator?: boolean): any;
1318
+
1200
1319
  /**
1201
1320
  * Knowledge Search API
1202
1321
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
@@ -1790,14 +1909,16 @@ declare function KnowledgeCardToJSONTyped(value?: KnowledgeCard | null, ignoreDi
1790
1909
  /**
1791
1910
  * Public effort taxonomy for the new endpoints. FAST is the default. INSTANT
1792
1911
  * serves cached embeds without re-running data retrieval and is available in all
1793
- * environments. Cannot be combined with sources.tako.defer_data_retrieval.
1794
- * The generated OpenAPI/SDK advertises exactly these members, so we add values
1795
- * only as the pipeline gains support.
1912
+ * environments (cannot be combined with sources.data.defer_data_retrieval).
1913
+ * DEEP widens TAKO retrieval and adds an LLM rerank for higher-quality results
1914
+ * (slower; billed at a premium tier). The generated OpenAPI/SDK advertises
1915
+ * exactly these members, so we add values only as the pipeline gains support.
1796
1916
  * @export
1797
1917
  */
1798
1918
  declare const SearchEffortLevel: {
1799
1919
  readonly Fast: "fast";
1800
1920
  readonly Instant: "instant";
1921
+ readonly Deep: "deep";
1801
1922
  };
1802
1923
  type SearchEffortLevel = typeof SearchEffortLevel[keyof typeof SearchEffortLevel];
1803
1924
  declare function instanceOfSearchEffortLevel(value: any): boolean;
@@ -1943,16 +2064,19 @@ declare function SourceSettingsToJSONTyped(value?: SourceSettings | null, ignore
1943
2064
 
1944
2065
  /**
1945
2066
  * Per-source settings. An index is searched iff its field is present.
2067
+ *
2068
+ * The Tako data source is named `data`. The legacy key `tako` is still
2069
+ * accepted as a synonym (mapped to `data` before validation).
1946
2070
  * @export
1947
2071
  * @interface Sources
1948
2072
  */
1949
2073
  interface Sources {
1950
2074
  /**
1951
- * Tako card source. Searched iff present.
2075
+ * Tako data source (curated knowledge). Searched iff present. The legacy key 'tako' is accepted as a synonym.
1952
2076
  * @type {TakoSourceSettings}
1953
2077
  * @memberof Sources
1954
2078
  */
1955
- tako?: TakoSourceSettings | null;
2079
+ data?: TakoSourceSettings | null;
1956
2080
  /**
1957
2081
  * Web source. Searched iff present.
1958
2082
  * @type {SourceSettings}
@@ -1994,13 +2118,13 @@ interface SearchRequest {
1994
2118
  */
1995
2119
  query: string;
1996
2120
  /**
1997
- * Search effort level. Only 'fast' is currently supported.
2121
+ * Search effort level: 'fast' (default), 'instant', or 'deep'.
1998
2122
  * @type {SearchEffortLevel}
1999
2123
  * @memberof SearchRequest
2000
2124
  */
2001
2125
  effort?: SearchEffortLevel;
2002
2126
  /**
2003
- * Per-source settings. An index is searched iff its key is present; defaults to {tako:{}} (tako-only, count 5).
2127
+ * Per-source settings. An index is searched iff its key is present; defaults to {data:{}, web:{}} (data + web, count 5 each). The legacy key 'tako' is accepted as a synonym for 'data'.
2004
2128
  * @type {Sources}
2005
2129
  * @memberof SearchRequest
2006
2130
  */
@@ -2106,6 +2230,9 @@ declare function SearchResponseToJSONTyped(value?: SearchResponse | null, ignore
2106
2230
  interface AnswerRequest {
2107
2231
  searchRequest?: SearchRequest;
2108
2232
  }
2233
+ interface ClassifyOperationRequest {
2234
+ classifyRequest?: ClassifyRequest;
2235
+ }
2109
2236
  interface ContentsOperationRequest {
2110
2237
  contentsRequest?: ContentsRequest;
2111
2238
  }
@@ -2143,6 +2270,27 @@ interface TakoApiInterface {
2143
2270
  * Answer
2144
2271
  */
2145
2272
  answer(requestParameters: AnswerRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<AnswerResponse>;
2273
+ /**
2274
+ * Creates request options for classify without sending the request
2275
+ * @param {ClassifyRequest} [classifyRequest]
2276
+ * @throws {RequiredError}
2277
+ * @memberof TakoApiInterface
2278
+ */
2279
+ classifyRequestOpts(requestParameters: ClassifyOperationRequest): Promise<RequestOpts>;
2280
+ /**
2281
+ * Score a batch of queries for whether Tako search will return a result. Returns a probability and a recall-skewed keep flag per query. Free; intended for pre-filtering before /v3/search.
2282
+ * @summary Classify queries
2283
+ * @param {ClassifyRequest} [classifyRequest]
2284
+ * @param {*} [options] Override http request option.
2285
+ * @throws {RequiredError}
2286
+ * @memberof TakoApiInterface
2287
+ */
2288
+ classifyRaw(requestParameters: ClassifyOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<ClassifyResponse>>;
2289
+ /**
2290
+ * Score a batch of queries for whether Tako search will return a result. Returns a probability and a recall-skewed keep flag per query. Free; intended for pre-filtering before /v3/search.
2291
+ * Classify queries
2292
+ */
2293
+ classify(requestParameters: ClassifyOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ClassifyResponse>;
2146
2294
  /**
2147
2295
  * Creates request options for contents without sending the request
2148
2296
  * @param {ContentsRequest} [contentsRequest]
@@ -2223,6 +2371,20 @@ declare class TakoApi extends BaseAPI implements TakoApiInterface {
2223
2371
  * Answer
2224
2372
  */
2225
2373
  answer(requestParameters?: AnswerRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<AnswerResponse>;
2374
+ /**
2375
+ * Creates request options for classify without sending the request
2376
+ */
2377
+ classifyRequestOpts(requestParameters: ClassifyOperationRequest): Promise<RequestOpts>;
2378
+ /**
2379
+ * Score a batch of queries for whether Tako search will return a result. Returns a probability and a recall-skewed keep flag per query. Free; intended for pre-filtering before /v3/search.
2380
+ * Classify queries
2381
+ */
2382
+ classifyRaw(requestParameters: ClassifyOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<ClassifyResponse>>;
2383
+ /**
2384
+ * Score a batch of queries for whether Tako search will return a result. Returns a probability and a recall-skewed keep flag per query. Free; intended for pre-filtering before /v3/search.
2385
+ * Classify queries
2386
+ */
2387
+ classify(requestParameters?: ClassifyOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ClassifyResponse>;
2226
2388
  /**
2227
2389
  * Creates request options for contents without sending the request
2228
2390
  */
@@ -3416,4 +3578,4 @@ declare class Tako {
3416
3578
  createCard(request: CreateCardRequest): Promise<KnowledgeCard>;
3417
3579
  }
3418
3580
 
3419
- export { APIErrorType, APIErrorTypeFromJSON, APIErrorTypeFromJSONTyped, APIErrorTypeToJSON, APIErrorTypeToJSONTyped, AgentApi, type AgentApiInterface, AgentEffortLevel, AgentEffortLevelFromJSON, AgentEffortLevelFromJSONTyped, AgentEffortLevelToJSON, AgentEffortLevelToJSONTyped, type AgentOutputSettings, AgentOutputSettingsFromJSON, AgentOutputSettingsFromJSONTyped, AgentOutputSettingsToJSON, AgentOutputSettingsToJSONTyped, AgentResource, type AgentResult, type AgentResultEvent, AgentResultEventFromJSON, AgentResultEventFromJSONTyped, AgentResultEventKindEnum, AgentResultEventToJSON, AgentResultEventToJSONTyped, AgentResultFromJSON, AgentResultFromJSONTyped, AgentResultToJSON, AgentResultToJSONTyped, type AgentRun, AgentRunFromJSON, AgentRunFromJSONTyped, AgentRunObjectEnum, type AgentRunRequest, AgentRunRequestFromJSON, AgentRunRequestFromJSONTyped, AgentRunRequestSourceIndexesEnum, AgentRunRequestToJSON, AgentRunRequestToJSONTyped, AgentRunStatus, AgentRunStatusFromJSON, AgentRunStatusFromJSONTyped, AgentRunStatusToJSON, AgentRunStatusToJSONTyped, AgentRunToJSON, AgentRunToJSONTyped, AgentStream, type AgentStreamEnvelope, AgentStreamEnvelopeFromJSON, AgentStreamEnvelopeFromJSONTyped, AgentStreamEnvelopeToJSON, AgentStreamEnvelopeToJSONTyped, type AgentStreamOptions, type AnswerRequest, type AnswerResponse, AnswerResponseFromJSON, AnswerResponseFromJSONTyped, AnswerResponseToJSON, AnswerResponseToJSONTyped, type ApiResponse, BASE_PATH, BaseAPI, type BaseAPIError, BaseAPIErrorFromJSON, BaseAPIErrorFromJSONTyped, BaseAPIErrorToJSON, BaseAPIErrorToJSONTyped, BlobApiResponse, type Block, BlockFromJSON, BlockFromJSONTyped, BlockToJSON, BlockToJSONTyped, COLLECTION_FORMATS, CardSourceIndex, CardSourceIndexFromJSON, CardSourceIndexFromJSONTyped, type CardSourceIndexSegment, CardSourceIndexSegmentFromJSON, CardSourceIndexSegmentFromJSONTyped, CardSourceIndexSegmentToJSON, CardSourceIndexSegmentToJSONTyped, CardSourceIndexToJSON, CardSourceIndexToJSONTyped, type CardSourcePrivateIndex, CardSourcePrivateIndexFromJSON, CardSourcePrivateIndexFromJSONTyped, CardSourcePrivateIndexToJSON, CardSourcePrivateIndexToJSONTyped, type ComponentConfig, ComponentConfigFromJSON, ComponentConfigFromJSONTyped, ComponentConfigToJSON, ComponentConfigToJSONTyped, ComponentTypeEnum, ComponentTypeEnumFromJSON, ComponentTypeEnumFromJSONTyped, ComponentTypeEnumToJSON, ComponentTypeEnumToJSONTyped, Configuration, type ConfigurationParameters, type Consume, ContentFormat, ContentFormatFromJSON, ContentFormatFromJSONTyped, ContentFormatToJSON, ContentFormatToJSONTyped, type ContentItem, ContentItemFromJSON, ContentItemFromJSONTyped, ContentItemToJSON, ContentItemToJSONTyped, ContentsDeliveryMode, ContentsDeliveryModeFromJSON, ContentsDeliveryModeFromJSONTyped, ContentsDeliveryModeToJSON, ContentsDeliveryModeToJSONTyped, type ContentsOperationRequest, type ContentsRequest, ContentsRequestFromJSON, ContentsRequestFromJSONTyped, ContentsRequestToJSON, ContentsRequestToJSONTyped, type ContentsResponse, ContentsResponseFromJSON, ContentsResponseFromJSONTyped, ContentsResponseToJSON, ContentsResponseToJSONTyped, type CreateAgentRunRequest, type CreateCard400Response, CreateCard400ResponseFromJSON, CreateCard400ResponseFromJSONTyped, CreateCard400ResponseToJSON, CreateCard400ResponseToJSONTyped, type CreateCardOperationRequest, type CreateCardRequest, CreateCardRequestFromJSON, CreateCardRequestFromJSONTyped, CreateCardRequestToJSON, CreateCardRequestToJSONTyped, type DataPipelineAnswerEvent, DataPipelineAnswerEventFromJSON, DataPipelineAnswerEventFromJSONTyped, DataPipelineAnswerEventKindEnum, DataPipelineAnswerEventToJSON, DataPipelineAnswerEventToJSONTyped, DefaultConfig, type ErrorContext, type ErrorObject, ErrorObjectFromJSON, ErrorObjectFromJSONTyped, ErrorObjectToJSON, ErrorObjectToJSONTyped, type FetchAPI, FetchError, type FetchParams, type GetAgentRunRequest, type HTTPBody, type HTTPHeaders, type HTTPMethod, type HTTPQuery, type HTTPRequestInit, type HeartbeatEvent, HeartbeatEventFromJSON, HeartbeatEventFromJSONTyped, HeartbeatEventKindEnum, HeartbeatEventToJSON, HeartbeatEventToJSONTyped, type IdealVizDecision, IdealVizDecisionFromJSON, IdealVizDecisionFromJSONTyped, IdealVizDecisionToJSON, IdealVizDecisionToJSONTyped, type InitOverrideFunction, JSONApiResponse, type Json, type KnowledgeCard, KnowledgeCardFromJSON, KnowledgeCardFromJSONTyped, type KnowledgeCardMethodology, KnowledgeCardMethodologyFromJSON, KnowledgeCardMethodologyFromJSONTyped, KnowledgeCardMethodologyToJSON, KnowledgeCardMethodologyToJSONTyped, KnowledgeCardRelevance, KnowledgeCardRelevanceFromJSON, KnowledgeCardRelevanceFromJSONTyped, KnowledgeCardRelevanceToJSON, KnowledgeCardRelevanceToJSONTyped, type KnowledgeCardSource, KnowledgeCardSourceFromJSON, KnowledgeCardSourceFromJSONTyped, type KnowledgeCardSourceIndexesInner, KnowledgeCardSourceIndexesInnerFromJSON, KnowledgeCardSourceIndexesInnerFromJSONTyped, KnowledgeCardSourceIndexesInnerToJSON, KnowledgeCardSourceIndexesInnerToJSONTyped, KnowledgeCardSourceToJSON, KnowledgeCardSourceToJSONTyped, KnowledgeCardToJSON, KnowledgeCardToJSONTyped, type Middleware, type ModelPropertyNaming, type OutputSettings, OutputSettingsFromJSON, OutputSettingsFromJSONTyped, OutputSettingsToJSON, OutputSettingsToJSONTyped, type ReasoningEvent, ReasoningEventFromJSON, ReasoningEventFromJSONTyped, ReasoningEventKindEnum, ReasoningEventToJSON, ReasoningEventToJSONTyped, type RequestContext, type RequestOpts, RequiredError, type ResponseContext, ResponseError, type ResponseTransformer, type ResultContent, ResultContentFromJSON, ResultContentFromJSONTyped, ResultContentToJSON, ResultContentToJSONTyped, SearchEffortLevel, SearchEffortLevelFromJSON, SearchEffortLevelFromJSONTyped, SearchEffortLevelToJSON, SearchEffortLevelToJSONTyped, type SearchOperationRequest, type SearchRequest, SearchRequestFromJSON, SearchRequestFromJSONTyped, SearchRequestToJSON, SearchRequestToJSONTyped, type SearchResponse, SearchResponseFromJSON, SearchResponseFromJSONTyped, SearchResponseToJSON, SearchResponseToJSONTyped, type SourceIndex, SourceIndexFromJSON, SourceIndexFromJSONTyped, SourceIndexToJSON, SourceIndexToJSONTyped, type SourceSettings, SourceSettingsFromJSON, SourceSettingsFromJSONTyped, SourceSettingsToJSON, SourceSettingsToJSONTyped, type Sources, SourcesFromJSON, SourcesFromJSONTyped, SourcesToJSON, SourcesToJSONTyped, type StatusEvent, StatusEventFromJSON, StatusEventFromJSONTyped, StatusEventKindEnum, StatusEventToJSON, StatusEventToJSONTyped, StreamCategory, StreamCategoryFromJSON, StreamCategoryFromJSONTyped, StreamCategoryToJSON, StreamCategoryToJSONTyped, type StreamDoneEvent, StreamDoneEventFromJSON, StreamDoneEventFromJSONTyped, StreamDoneEventKindEnum, StreamDoneEventToJSON, StreamDoneEventToJSONTyped, type StreamResetEvent, StreamResetEventFromJSON, StreamResetEventFromJSONTyped, StreamResetEventKindEnum, StreamResetEventToJSON, StreamResetEventToJSONTyped, type SubagentEvent, SubagentEventEventEnum, SubagentEventFromJSON, SubagentEventFromJSONTyped, SubagentEventKindEnum, SubagentEventToJSON, SubagentEventToJSONTyped, Tako, TakoApi, type TakoApiInterface, type TakoCard, TakoCardFromJSON, TakoCardFromJSONTyped, TakoCardToJSON, TakoCardToJSONTyped, type TakoOptions, type TakoSourceSettings, TakoSourceSettingsFromJSON, TakoSourceSettingsFromJSONTyped, TakoSourceSettingsToJSON, TakoSourceSettingsToJSONTyped, TextApiResponse, type TextEvent, TextEventFromJSON, TextEventFromJSONTyped, TextEventKindEnum, TextEventToJSON, TextEventToJSONTyped, type ToolCallEvent, ToolCallEventFromJSON, ToolCallEventFromJSONTyped, ToolCallEventKindEnum, ToolCallEventToJSON, ToolCallEventToJSONTyped, type ToolErrorEvent, ToolErrorEventFromJSON, ToolErrorEventFromJSONTyped, ToolErrorEventKindEnum, ToolErrorEventToJSON, ToolErrorEventToJSONTyped, type ToolResultEvent, ToolResultEventFromJSON, ToolResultEventFromJSONTyped, ToolResultEventKindEnum, ToolResultEventToJSON, ToolResultEventToJSONTyped, type ToolRetryEvent, ToolRetryEventFromJSON, ToolRetryEventFromJSONTyped, ToolRetryEventKindEnum, ToolRetryEventToJSON, ToolRetryEventToJSONTyped, VoidApiResponse, type WebResult, WebResultFromJSON, WebResultFromJSONTyped, WebResultToJSON, WebResultToJSONTyped, canConsumeForm, exists, instanceOfAPIErrorType, instanceOfAgentEffortLevel, instanceOfAgentOutputSettings, instanceOfAgentResult, instanceOfAgentResultEvent, instanceOfAgentRun, instanceOfAgentRunRequest, instanceOfAgentRunStatus, instanceOfAgentStreamEnvelope, instanceOfAnswerResponse, instanceOfBaseAPIError, instanceOfCardSourceIndex, instanceOfCardSourceIndexSegment, instanceOfCardSourcePrivateIndex, instanceOfComponentConfig, instanceOfComponentTypeEnum, instanceOfContentFormat, instanceOfContentItem, instanceOfContentsDeliveryMode, instanceOfContentsRequest, instanceOfContentsResponse, instanceOfCreateCard400Response, instanceOfCreateCardRequest, instanceOfDataPipelineAnswerEvent, instanceOfErrorObject, instanceOfHeartbeatEvent, instanceOfIdealVizDecision, instanceOfKnowledgeCard, instanceOfKnowledgeCardMethodology, instanceOfKnowledgeCardRelevance, instanceOfKnowledgeCardSource, instanceOfKnowledgeCardSourceIndexesInner, instanceOfOutputSettings, instanceOfReasoningEvent, instanceOfResultContent, instanceOfSearchEffortLevel, instanceOfSearchRequest, instanceOfSearchResponse, instanceOfSourceIndex, instanceOfSourceSettings, instanceOfSources, instanceOfStatusEvent, instanceOfStreamCategory, instanceOfStreamDoneEvent, instanceOfStreamResetEvent, instanceOfSubagentEvent, instanceOfTakoCard, instanceOfTakoSourceSettings, instanceOfTextEvent, instanceOfToolCallEvent, instanceOfToolErrorEvent, instanceOfToolResultEvent, instanceOfToolRetryEvent, instanceOfWebResult, mapValues, querystring };
3581
+ export { APIErrorType, APIErrorTypeFromJSON, APIErrorTypeFromJSONTyped, APIErrorTypeToJSON, APIErrorTypeToJSONTyped, AgentApi, type AgentApiInterface, AgentEffortLevel, AgentEffortLevelFromJSON, AgentEffortLevelFromJSONTyped, AgentEffortLevelToJSON, AgentEffortLevelToJSONTyped, type AgentOutputSettings, AgentOutputSettingsFromJSON, AgentOutputSettingsFromJSONTyped, AgentOutputSettingsToJSON, AgentOutputSettingsToJSONTyped, AgentResource, type AgentResult, type AgentResultEvent, AgentResultEventFromJSON, AgentResultEventFromJSONTyped, AgentResultEventKindEnum, AgentResultEventToJSON, AgentResultEventToJSONTyped, AgentResultFromJSON, AgentResultFromJSONTyped, AgentResultToJSON, AgentResultToJSONTyped, type AgentRun, AgentRunFromJSON, AgentRunFromJSONTyped, AgentRunObjectEnum, type AgentRunRequest, AgentRunRequestFromJSON, AgentRunRequestFromJSONTyped, AgentRunRequestSourceIndexesEnum, AgentRunRequestToJSON, AgentRunRequestToJSONTyped, AgentRunStatus, AgentRunStatusFromJSON, AgentRunStatusFromJSONTyped, AgentRunStatusToJSON, AgentRunStatusToJSONTyped, AgentRunToJSON, AgentRunToJSONTyped, AgentStream, type AgentStreamEnvelope, AgentStreamEnvelopeFromJSON, AgentStreamEnvelopeFromJSONTyped, AgentStreamEnvelopeToJSON, AgentStreamEnvelopeToJSONTyped, type AgentStreamOptions, type AnswerRequest, type AnswerResponse, AnswerResponseFromJSON, AnswerResponseFromJSONTyped, AnswerResponseToJSON, AnswerResponseToJSONTyped, type ApiResponse, BASE_PATH, BaseAPI, type BaseAPIError, BaseAPIErrorFromJSON, BaseAPIErrorFromJSONTyped, BaseAPIErrorToJSON, BaseAPIErrorToJSONTyped, BlobApiResponse, type Block, BlockFromJSON, BlockFromJSONTyped, BlockToJSON, BlockToJSONTyped, COLLECTION_FORMATS, CardSourceIndex, CardSourceIndexFromJSON, CardSourceIndexFromJSONTyped, type CardSourceIndexSegment, CardSourceIndexSegmentFromJSON, CardSourceIndexSegmentFromJSONTyped, CardSourceIndexSegmentToJSON, CardSourceIndexSegmentToJSONTyped, CardSourceIndexToJSON, CardSourceIndexToJSONTyped, type CardSourcePrivateIndex, CardSourcePrivateIndexFromJSON, CardSourcePrivateIndexFromJSONTyped, CardSourcePrivateIndexToJSON, CardSourcePrivateIndexToJSONTyped, type ClassifyOperationRequest, type ClassifyRequest, ClassifyRequestFromJSON, ClassifyRequestFromJSONTyped, ClassifyRequestToJSON, ClassifyRequestToJSONTyped, type ClassifyResponse, ClassifyResponseFromJSON, ClassifyResponseFromJSONTyped, ClassifyResponseToJSON, ClassifyResponseToJSONTyped, type ComponentConfig, ComponentConfigFromJSON, ComponentConfigFromJSONTyped, ComponentConfigToJSON, ComponentConfigToJSONTyped, ComponentTypeEnum, ComponentTypeEnumFromJSON, ComponentTypeEnumFromJSONTyped, ComponentTypeEnumToJSON, ComponentTypeEnumToJSONTyped, Configuration, type ConfigurationParameters, type Consume, ContentFormat, ContentFormatFromJSON, ContentFormatFromJSONTyped, ContentFormatToJSON, ContentFormatToJSONTyped, type ContentItem, ContentItemFromJSON, ContentItemFromJSONTyped, ContentItemToJSON, ContentItemToJSONTyped, ContentsDeliveryMode, ContentsDeliveryModeFromJSON, ContentsDeliveryModeFromJSONTyped, ContentsDeliveryModeToJSON, ContentsDeliveryModeToJSONTyped, type ContentsOperationRequest, type ContentsRequest, ContentsRequestFromJSON, ContentsRequestFromJSONTyped, ContentsRequestToJSON, ContentsRequestToJSONTyped, type ContentsResponse, ContentsResponseFromJSON, ContentsResponseFromJSONTyped, ContentsResponseToJSON, ContentsResponseToJSONTyped, type CreateAgentRunRequest, type CreateCard400Response, CreateCard400ResponseFromJSON, CreateCard400ResponseFromJSONTyped, CreateCard400ResponseToJSON, CreateCard400ResponseToJSONTyped, type CreateCardOperationRequest, type CreateCardRequest, CreateCardRequestFromJSON, CreateCardRequestFromJSONTyped, CreateCardRequestToJSON, CreateCardRequestToJSONTyped, type DataPipelineAnswerEvent, DataPipelineAnswerEventFromJSON, DataPipelineAnswerEventFromJSONTyped, DataPipelineAnswerEventKindEnum, DataPipelineAnswerEventToJSON, DataPipelineAnswerEventToJSONTyped, DefaultConfig, type ErrorContext, type ErrorObject, ErrorObjectFromJSON, ErrorObjectFromJSONTyped, ErrorObjectToJSON, ErrorObjectToJSONTyped, type FetchAPI, FetchError, type FetchParams, type GetAgentRunRequest, type HTTPBody, type HTTPHeaders, type HTTPMethod, type HTTPQuery, type HTTPRequestInit, type HeartbeatEvent, HeartbeatEventFromJSON, HeartbeatEventFromJSONTyped, HeartbeatEventKindEnum, HeartbeatEventToJSON, HeartbeatEventToJSONTyped, type IdealVizDecision, IdealVizDecisionFromJSON, IdealVizDecisionFromJSONTyped, IdealVizDecisionToJSON, IdealVizDecisionToJSONTyped, type InitOverrideFunction, JSONApiResponse, type Json, type KnowledgeCard, KnowledgeCardFromJSON, KnowledgeCardFromJSONTyped, type KnowledgeCardMethodology, KnowledgeCardMethodologyFromJSON, KnowledgeCardMethodologyFromJSONTyped, KnowledgeCardMethodologyToJSON, KnowledgeCardMethodologyToJSONTyped, KnowledgeCardRelevance, KnowledgeCardRelevanceFromJSON, KnowledgeCardRelevanceFromJSONTyped, KnowledgeCardRelevanceToJSON, KnowledgeCardRelevanceToJSONTyped, type KnowledgeCardSource, KnowledgeCardSourceFromJSON, KnowledgeCardSourceFromJSONTyped, type KnowledgeCardSourceIndexesInner, KnowledgeCardSourceIndexesInnerFromJSON, KnowledgeCardSourceIndexesInnerFromJSONTyped, KnowledgeCardSourceIndexesInnerToJSON, KnowledgeCardSourceIndexesInnerToJSONTyped, KnowledgeCardSourceToJSON, KnowledgeCardSourceToJSONTyped, KnowledgeCardToJSON, KnowledgeCardToJSONTyped, type Middleware, type ModelPropertyNaming, type OutputSettings, OutputSettingsFromJSON, OutputSettingsFromJSONTyped, OutputSettingsToJSON, OutputSettingsToJSONTyped, type QueryClassification, QueryClassificationFromJSON, QueryClassificationFromJSONTyped, QueryClassificationToJSON, QueryClassificationToJSONTyped, type ReasoningEvent, ReasoningEventFromJSON, ReasoningEventFromJSONTyped, ReasoningEventKindEnum, ReasoningEventToJSON, ReasoningEventToJSONTyped, type RequestContext, type RequestOpts, RequiredError, type ResponseContext, ResponseError, type ResponseTransformer, type ResultContent, ResultContentFromJSON, ResultContentFromJSONTyped, ResultContentToJSON, ResultContentToJSONTyped, SearchEffortLevel, SearchEffortLevelFromJSON, SearchEffortLevelFromJSONTyped, SearchEffortLevelToJSON, SearchEffortLevelToJSONTyped, type SearchOperationRequest, type SearchRequest, SearchRequestFromJSON, SearchRequestFromJSONTyped, SearchRequestToJSON, SearchRequestToJSONTyped, type SearchResponse, SearchResponseFromJSON, SearchResponseFromJSONTyped, SearchResponseToJSON, SearchResponseToJSONTyped, type SourceIndex, SourceIndexFromJSON, SourceIndexFromJSONTyped, SourceIndexToJSON, SourceIndexToJSONTyped, type SourceSettings, SourceSettingsFromJSON, SourceSettingsFromJSONTyped, SourceSettingsToJSON, SourceSettingsToJSONTyped, type Sources, SourcesFromJSON, SourcesFromJSONTyped, SourcesToJSON, SourcesToJSONTyped, type StatusEvent, StatusEventFromJSON, StatusEventFromJSONTyped, StatusEventKindEnum, StatusEventToJSON, StatusEventToJSONTyped, StreamCategory, StreamCategoryFromJSON, StreamCategoryFromJSONTyped, StreamCategoryToJSON, StreamCategoryToJSONTyped, type StreamDoneEvent, StreamDoneEventFromJSON, StreamDoneEventFromJSONTyped, StreamDoneEventKindEnum, StreamDoneEventToJSON, StreamDoneEventToJSONTyped, type StreamResetEvent, StreamResetEventFromJSON, StreamResetEventFromJSONTyped, StreamResetEventKindEnum, StreamResetEventToJSON, StreamResetEventToJSONTyped, type SubagentEvent, SubagentEventEventEnum, SubagentEventFromJSON, SubagentEventFromJSONTyped, SubagentEventKindEnum, SubagentEventToJSON, SubagentEventToJSONTyped, Tako, TakoApi, type TakoApiInterface, type TakoCard, TakoCardFromJSON, TakoCardFromJSONTyped, TakoCardToJSON, TakoCardToJSONTyped, type TakoOptions, type TakoSourceSettings, TakoSourceSettingsFromJSON, TakoSourceSettingsFromJSONTyped, TakoSourceSettingsToJSON, TakoSourceSettingsToJSONTyped, TextApiResponse, type TextEvent, TextEventFromJSON, TextEventFromJSONTyped, TextEventKindEnum, TextEventToJSON, TextEventToJSONTyped, type ToolCallEvent, ToolCallEventFromJSON, ToolCallEventFromJSONTyped, ToolCallEventKindEnum, ToolCallEventToJSON, ToolCallEventToJSONTyped, type ToolErrorEvent, ToolErrorEventFromJSON, ToolErrorEventFromJSONTyped, ToolErrorEventKindEnum, ToolErrorEventToJSON, ToolErrorEventToJSONTyped, type ToolResultEvent, ToolResultEventFromJSON, ToolResultEventFromJSONTyped, ToolResultEventKindEnum, ToolResultEventToJSON, ToolResultEventToJSONTyped, type ToolRetryEvent, ToolRetryEventFromJSON, ToolRetryEventFromJSONTyped, ToolRetryEventKindEnum, ToolRetryEventToJSON, ToolRetryEventToJSONTyped, VoidApiResponse, type WebResult, WebResultFromJSON, WebResultFromJSONTyped, WebResultToJSON, WebResultToJSONTyped, canConsumeForm, exists, instanceOfAPIErrorType, instanceOfAgentEffortLevel, instanceOfAgentOutputSettings, instanceOfAgentResult, instanceOfAgentResultEvent, instanceOfAgentRun, instanceOfAgentRunRequest, instanceOfAgentRunStatus, instanceOfAgentStreamEnvelope, instanceOfAnswerResponse, instanceOfBaseAPIError, instanceOfCardSourceIndex, instanceOfCardSourceIndexSegment, instanceOfCardSourcePrivateIndex, instanceOfClassifyRequest, instanceOfClassifyResponse, instanceOfComponentConfig, instanceOfComponentTypeEnum, instanceOfContentFormat, instanceOfContentItem, instanceOfContentsDeliveryMode, instanceOfContentsRequest, instanceOfContentsResponse, instanceOfCreateCard400Response, instanceOfCreateCardRequest, instanceOfDataPipelineAnswerEvent, instanceOfErrorObject, instanceOfHeartbeatEvent, instanceOfIdealVizDecision, instanceOfKnowledgeCard, instanceOfKnowledgeCardMethodology, instanceOfKnowledgeCardRelevance, instanceOfKnowledgeCardSource, instanceOfKnowledgeCardSourceIndexesInner, instanceOfOutputSettings, instanceOfQueryClassification, instanceOfReasoningEvent, instanceOfResultContent, instanceOfSearchEffortLevel, instanceOfSearchRequest, instanceOfSearchResponse, instanceOfSourceIndex, instanceOfSourceSettings, instanceOfSources, instanceOfStatusEvent, instanceOfStreamCategory, instanceOfStreamDoneEvent, instanceOfStreamResetEvent, instanceOfSubagentEvent, instanceOfTakoCard, instanceOfTakoSourceSettings, instanceOfTextEvent, instanceOfToolCallEvent, instanceOfToolErrorEvent, instanceOfToolResultEvent, instanceOfToolRetryEvent, instanceOfWebResult, mapValues, querystring };
package/dist/index.js CHANGED
@@ -583,7 +583,8 @@ function TakoCardFromJSONTyped(json, ignoreDiscriminator) {
583
583
  "source_indexes": json["source_indexes"] == null ? void 0 : json["source_indexes"].map(KnowledgeCardSourceIndexesInnerFromJSON),
584
584
  "card_type": json["card_type"] == null ? void 0 : json["card_type"],
585
585
  "relevance": json["relevance"] == null ? void 0 : KnowledgeCardRelevanceFromJSON(json["relevance"]),
586
- "content": json["content"] == null ? void 0 : ResultContentFromJSON(json["content"])
586
+ "content": json["content"] == null ? void 0 : ResultContentFromJSON(json["content"]),
587
+ "relevance_score": json["relevance_score"] == null ? void 0 : json["relevance_score"]
587
588
  };
588
589
  }
589
590
  function TakoCardToJSON(json) {
@@ -606,7 +607,8 @@ function TakoCardToJSONTyped(value, ignoreDiscriminator = false) {
606
607
  "source_indexes": value["source_indexes"] == null ? void 0 : value["source_indexes"].map(KnowledgeCardSourceIndexesInnerToJSON),
607
608
  "card_type": value["card_type"],
608
609
  "relevance": KnowledgeCardRelevanceToJSON(value["relevance"]),
609
- "content": ResultContentToJSON(value["content"])
610
+ "content": ResultContentToJSON(value["content"]),
611
+ "relevance_score": value["relevance_score"]
610
612
  };
611
613
  }
612
614
 
@@ -848,7 +850,7 @@ function AgentOutputSettingsToJSONTyped(value, ignoreDiscriminator = false) {
848
850
 
849
851
  // src/generated/models/AgentRunRequest.ts
850
852
  var AgentRunRequestSourceIndexesEnum = {
851
- Tako: "tako",
853
+ Data: "data",
852
854
  Web: "web"
853
855
  };
854
856
  function instanceOfAgentRunRequest(value) {
@@ -1011,6 +1013,95 @@ function AnswerResponseToJSONTyped(value, ignoreDiscriminator = false) {
1011
1013
  };
1012
1014
  }
1013
1015
 
1016
+ // src/generated/models/ClassifyRequest.ts
1017
+ function instanceOfClassifyRequest(value) {
1018
+ if (!("queries" in value) || value["queries"] === void 0) return false;
1019
+ return true;
1020
+ }
1021
+ function ClassifyRequestFromJSON(json) {
1022
+ return ClassifyRequestFromJSONTyped(json, false);
1023
+ }
1024
+ function ClassifyRequestFromJSONTyped(json, ignoreDiscriminator) {
1025
+ if (json == null) {
1026
+ return json;
1027
+ }
1028
+ return {
1029
+ "queries": json["queries"]
1030
+ };
1031
+ }
1032
+ function ClassifyRequestToJSON(json) {
1033
+ return ClassifyRequestToJSONTyped(json, false);
1034
+ }
1035
+ function ClassifyRequestToJSONTyped(value, ignoreDiscriminator = false) {
1036
+ if (value == null) {
1037
+ return value;
1038
+ }
1039
+ return {
1040
+ "queries": value["queries"]
1041
+ };
1042
+ }
1043
+
1044
+ // src/generated/models/QueryClassification.ts
1045
+ function instanceOfQueryClassification(value) {
1046
+ if (!("query" in value) || value["query"] === void 0) return false;
1047
+ if (!("score" in value) || value["score"] === void 0) return false;
1048
+ if (!("keep" in value) || value["keep"] === void 0) return false;
1049
+ return true;
1050
+ }
1051
+ function QueryClassificationFromJSON(json) {
1052
+ return QueryClassificationFromJSONTyped(json, false);
1053
+ }
1054
+ function QueryClassificationFromJSONTyped(json, ignoreDiscriminator) {
1055
+ if (json == null) {
1056
+ return json;
1057
+ }
1058
+ return {
1059
+ "query": json["query"],
1060
+ "score": json["score"],
1061
+ "keep": json["keep"]
1062
+ };
1063
+ }
1064
+ function QueryClassificationToJSON(json) {
1065
+ return QueryClassificationToJSONTyped(json, false);
1066
+ }
1067
+ function QueryClassificationToJSONTyped(value, ignoreDiscriminator = false) {
1068
+ if (value == null) {
1069
+ return value;
1070
+ }
1071
+ return {
1072
+ "query": value["query"],
1073
+ "score": value["score"],
1074
+ "keep": value["keep"]
1075
+ };
1076
+ }
1077
+
1078
+ // src/generated/models/ClassifyResponse.ts
1079
+ function instanceOfClassifyResponse(value) {
1080
+ return true;
1081
+ }
1082
+ function ClassifyResponseFromJSON(json) {
1083
+ return ClassifyResponseFromJSONTyped(json, false);
1084
+ }
1085
+ function ClassifyResponseFromJSONTyped(json, ignoreDiscriminator) {
1086
+ if (json == null) {
1087
+ return json;
1088
+ }
1089
+ return {
1090
+ "results": json["results"] == null ? void 0 : json["results"].map(QueryClassificationFromJSON)
1091
+ };
1092
+ }
1093
+ function ClassifyResponseToJSON(json) {
1094
+ return ClassifyResponseToJSONTyped(json, false);
1095
+ }
1096
+ function ClassifyResponseToJSONTyped(value, ignoreDiscriminator = false) {
1097
+ if (value == null) {
1098
+ return value;
1099
+ }
1100
+ return {
1101
+ "results": value["results"] == null ? void 0 : value["results"].map(QueryClassificationToJSON)
1102
+ };
1103
+ }
1104
+
1014
1105
  // src/generated/models/ContentsDeliveryMode.ts
1015
1106
  var ContentsDeliveryMode = {
1016
1107
  Url: "url",
@@ -1367,7 +1458,8 @@ function KnowledgeCardToJSONTyped(value, ignoreDiscriminator = false) {
1367
1458
  // src/generated/models/SearchEffortLevel.ts
1368
1459
  var SearchEffortLevel = {
1369
1460
  Fast: "fast",
1370
- Instant: "instant"
1461
+ Instant: "instant",
1462
+ Deep: "deep"
1371
1463
  };
1372
1464
  function instanceOfSearchEffortLevel(value) {
1373
1465
  for (const key in SearchEffortLevel) {
@@ -1493,7 +1585,7 @@ function SourcesFromJSONTyped(json, ignoreDiscriminator) {
1493
1585
  return json;
1494
1586
  }
1495
1587
  return {
1496
- "tako": json["tako"] == null ? void 0 : TakoSourceSettingsFromJSON(json["tako"]),
1588
+ "data": json["data"] == null ? void 0 : TakoSourceSettingsFromJSON(json["data"]),
1497
1589
  "web": json["web"] == null ? void 0 : SourceSettingsFromJSON(json["web"])
1498
1590
  };
1499
1591
  }
@@ -1505,7 +1597,7 @@ function SourcesToJSONTyped(value, ignoreDiscriminator = false) {
1505
1597
  return value;
1506
1598
  }
1507
1599
  return {
1508
- "tako": TakoSourceSettingsToJSON(value["tako"]),
1600
+ "data": TakoSourceSettingsToJSON(value["data"]),
1509
1601
  "web": SourceSettingsToJSON(value["web"])
1510
1602
  };
1511
1603
  }
@@ -1622,6 +1714,42 @@ var TakoApi = class extends BaseAPI {
1622
1714
  const response = await this.answerRaw(requestParameters, initOverrides);
1623
1715
  return await response.value();
1624
1716
  }
1717
+ /**
1718
+ * Creates request options for classify without sending the request
1719
+ */
1720
+ async classifyRequestOpts(requestParameters) {
1721
+ const queryParameters = {};
1722
+ const headerParameters = {};
1723
+ headerParameters["Content-Type"] = "application/json";
1724
+ if (this.configuration && this.configuration.apiKey) {
1725
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
1726
+ }
1727
+ let urlPath = `/v1/classify`;
1728
+ return {
1729
+ path: urlPath,
1730
+ method: "POST",
1731
+ headers: headerParameters,
1732
+ query: queryParameters,
1733
+ body: ClassifyRequestToJSON(requestParameters["classifyRequest"])
1734
+ };
1735
+ }
1736
+ /**
1737
+ * Score a batch of queries for whether Tako search will return a result. Returns a probability and a recall-skewed keep flag per query. Free; intended for pre-filtering before /v3/search.
1738
+ * Classify queries
1739
+ */
1740
+ async classifyRaw(requestParameters, initOverrides) {
1741
+ const requestOptions = await this.classifyRequestOpts(requestParameters);
1742
+ const response = await this.request(requestOptions, initOverrides);
1743
+ return new JSONApiResponse(response, (jsonValue) => ClassifyResponseFromJSON(jsonValue));
1744
+ }
1745
+ /**
1746
+ * Score a batch of queries for whether Tako search will return a result. Returns a probability and a recall-skewed keep flag per query. Free; intended for pre-filtering before /v3/search.
1747
+ * Classify queries
1748
+ */
1749
+ async classify(requestParameters = {}, initOverrides) {
1750
+ const response = await this.classifyRaw(requestParameters, initOverrides);
1751
+ return await response.value();
1752
+ }
1625
1753
  /**
1626
1754
  * Creates request options for contents without sending the request
1627
1755
  */
@@ -2799,6 +2927,14 @@ export {
2799
2927
  CardSourcePrivateIndexFromJSONTyped,
2800
2928
  CardSourcePrivateIndexToJSON,
2801
2929
  CardSourcePrivateIndexToJSONTyped,
2930
+ ClassifyRequestFromJSON,
2931
+ ClassifyRequestFromJSONTyped,
2932
+ ClassifyRequestToJSON,
2933
+ ClassifyRequestToJSONTyped,
2934
+ ClassifyResponseFromJSON,
2935
+ ClassifyResponseFromJSONTyped,
2936
+ ClassifyResponseToJSON,
2937
+ ClassifyResponseToJSONTyped,
2802
2938
  ComponentConfigFromJSON,
2803
2939
  ComponentConfigFromJSONTyped,
2804
2940
  ComponentConfigToJSON,
@@ -2885,6 +3021,10 @@ export {
2885
3021
  OutputSettingsFromJSONTyped,
2886
3022
  OutputSettingsToJSON,
2887
3023
  OutputSettingsToJSONTyped,
3024
+ QueryClassificationFromJSON,
3025
+ QueryClassificationFromJSONTyped,
3026
+ QueryClassificationToJSON,
3027
+ QueryClassificationToJSONTyped,
2888
3028
  ReasoningEventFromJSON,
2889
3029
  ReasoningEventFromJSONTyped,
2890
3030
  ReasoningEventKindEnum,
@@ -3004,6 +3144,8 @@ export {
3004
3144
  instanceOfCardSourceIndex,
3005
3145
  instanceOfCardSourceIndexSegment,
3006
3146
  instanceOfCardSourcePrivateIndex,
3147
+ instanceOfClassifyRequest,
3148
+ instanceOfClassifyResponse,
3007
3149
  instanceOfComponentConfig,
3008
3150
  instanceOfComponentTypeEnum,
3009
3151
  instanceOfContentFormat,
@@ -3023,6 +3165,7 @@ export {
3023
3165
  instanceOfKnowledgeCardSource,
3024
3166
  instanceOfKnowledgeCardSourceIndexesInner,
3025
3167
  instanceOfOutputSettings,
3168
+ instanceOfQueryClassification,
3026
3169
  instanceOfReasoningEvent,
3027
3170
  instanceOfResultContent,
3028
3171
  instanceOfSearchEffortLevel,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tako-sdk",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "JavaScript/TypeScript SDK for the Tako API",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",