@airweave/sdk 0.4.10 → 0.4.11
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/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/collections/client/Client.d.ts +15 -2
- package/dist/cjs/api/resources/collections/client/Client.js +18 -8
- package/dist/cjs/api/resources/collections/client/requests/SearchCollectionCollectionsReadableIdSearchGetRequest.d.ts +2 -6
- package/dist/cjs/api/resources/collections/client/requests/SearchRequest.d.ts +22 -8
- package/dist/cjs/api/resources/collections/client/requests/SearchRequest.js +9 -0
- package/dist/cjs/api/resources/whiteLabels/client/Client.d.ts +4 -4
- package/dist/cjs/api/resources/whiteLabels/client/Client.js +5 -5
- package/dist/cjs/api/resources/whiteLabels/client/requests/{BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.d.ts → BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodePost.d.ts} +1 -1
- package/dist/cjs/api/resources/whiteLabels/client/requests/index.d.ts +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/collections/client/Client.d.mts +15 -2
- package/dist/esm/api/resources/collections/client/Client.mjs +18 -8
- package/dist/esm/api/resources/collections/client/requests/SearchCollectionCollectionsReadableIdSearchGetRequest.d.mts +2 -6
- package/dist/esm/api/resources/collections/client/requests/SearchRequest.d.mts +22 -8
- package/dist/esm/api/resources/collections/client/requests/SearchRequest.mjs +8 -1
- package/dist/esm/api/resources/whiteLabels/client/Client.d.mts +4 -4
- package/dist/esm/api/resources/whiteLabels/client/Client.mjs +5 -5
- package/dist/esm/api/resources/whiteLabels/client/requests/{BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.d.mts → BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodePost.d.mts} +1 -1
- package/dist/esm/api/resources/whiteLabels/client/requests/index.d.mts +1 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +20 -5
- /package/dist/cjs/api/resources/whiteLabels/client/requests/{BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.js → BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodePost.js} +0 -0
- /package/dist/esm/api/resources/whiteLabels/client/requests/{BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.mjs → BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodePost.mjs} +0 -0
package/dist/cjs/Client.js
CHANGED
|
@@ -48,8 +48,8 @@ class AirweaveSDKClient {
|
|
|
48
48
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
49
49
|
"X-Fern-Language": "JavaScript",
|
|
50
50
|
"X-Fern-SDK-Name": "@airweave/sdk",
|
|
51
|
-
"X-Fern-SDK-Version": "v0.4.
|
|
52
|
-
"User-Agent": "@airweave/sdk/v0.4.
|
|
51
|
+
"X-Fern-SDK-Version": "v0.4.11",
|
|
52
|
+
"User-Agent": "@airweave/sdk/v0.4.11",
|
|
53
53
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
54
54
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
55
55
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -138,7 +138,20 @@ export declare class Collections {
|
|
|
138
138
|
* - Metadata filtering using Qdrant's native filter syntax
|
|
139
139
|
* - Pagination with offset and limit
|
|
140
140
|
* - Score threshold filtering
|
|
141
|
-
* - Query expansion strategies
|
|
141
|
+
* - Query expansion strategies (default: AUTO, generates up to 4 variations)
|
|
142
|
+
* - Automatic filter extraction from natural language (default: ON)
|
|
143
|
+
* - LLM-based result reranking (default: ON)
|
|
144
|
+
*
|
|
145
|
+
* Default behavior:
|
|
146
|
+
* - Query expansion: ON (AUTO strategy)
|
|
147
|
+
* - Query interpretation: ON (extracts filters from natural language)
|
|
148
|
+
* - Reranking: ON (improves relevance using LLM)
|
|
149
|
+
* - Score threshold: None (no filtering)
|
|
150
|
+
*
|
|
151
|
+
* To disable features, explicitly set:
|
|
152
|
+
* - enable_reranking: false
|
|
153
|
+
* - enable_query_interpretation: false
|
|
154
|
+
* - expansion_strategy: "no_expansion"
|
|
142
155
|
*
|
|
143
156
|
* @param {string} readableId - The unique readable identifier of the collection to search
|
|
144
157
|
* @param {AirweaveSDK.SearchRequest} request
|
|
@@ -154,7 +167,7 @@ export declare class Collections {
|
|
|
154
167
|
* key: "key"
|
|
155
168
|
* }
|
|
156
169
|
* },
|
|
157
|
-
* limit:
|
|
170
|
+
* limit: 10,
|
|
158
171
|
* score_threshold: 0.7,
|
|
159
172
|
* response_type: "completion"
|
|
160
173
|
* })
|
|
@@ -398,7 +398,7 @@ class Collections {
|
|
|
398
398
|
__searchCollection(readableId, request, requestOptions) {
|
|
399
399
|
return __awaiter(this, void 0, void 0, function* () {
|
|
400
400
|
var _a, _b, _c;
|
|
401
|
-
const { query, response_type: responseType, limit, offset,
|
|
401
|
+
const { query, response_type: responseType, limit, offset, recency_bias: recencyBias } = request;
|
|
402
402
|
const _queryParams = {};
|
|
403
403
|
_queryParams["query"] = query;
|
|
404
404
|
if (responseType != null) {
|
|
@@ -410,11 +410,8 @@ class Collections {
|
|
|
410
410
|
if (offset != null) {
|
|
411
411
|
_queryParams["offset"] = offset.toString();
|
|
412
412
|
}
|
|
413
|
-
if (
|
|
414
|
-
_queryParams["
|
|
415
|
-
}
|
|
416
|
-
if (expansionStrategy != null) {
|
|
417
|
-
_queryParams["expansion_strategy"] = expansionStrategy;
|
|
413
|
+
if (recencyBias != null) {
|
|
414
|
+
_queryParams["recency_bias"] = recencyBias.toString();
|
|
418
415
|
}
|
|
419
416
|
const _response = yield core.fetcher({
|
|
420
417
|
url: core.url.join((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirweaveSDKEnvironment.Production, `collections/${encodeURIComponent(readableId)}/search`),
|
|
@@ -464,7 +461,20 @@ class Collections {
|
|
|
464
461
|
* - Metadata filtering using Qdrant's native filter syntax
|
|
465
462
|
* - Pagination with offset and limit
|
|
466
463
|
* - Score threshold filtering
|
|
467
|
-
* - Query expansion strategies
|
|
464
|
+
* - Query expansion strategies (default: AUTO, generates up to 4 variations)
|
|
465
|
+
* - Automatic filter extraction from natural language (default: ON)
|
|
466
|
+
* - LLM-based result reranking (default: ON)
|
|
467
|
+
*
|
|
468
|
+
* Default behavior:
|
|
469
|
+
* - Query expansion: ON (AUTO strategy)
|
|
470
|
+
* - Query interpretation: ON (extracts filters from natural language)
|
|
471
|
+
* - Reranking: ON (improves relevance using LLM)
|
|
472
|
+
* - Score threshold: None (no filtering)
|
|
473
|
+
*
|
|
474
|
+
* To disable features, explicitly set:
|
|
475
|
+
* - enable_reranking: false
|
|
476
|
+
* - enable_query_interpretation: false
|
|
477
|
+
* - expansion_strategy: "no_expansion"
|
|
468
478
|
*
|
|
469
479
|
* @param {string} readableId - The unique readable identifier of the collection to search
|
|
470
480
|
* @param {AirweaveSDK.SearchRequest} request
|
|
@@ -480,7 +490,7 @@ class Collections {
|
|
|
480
490
|
* key: "key"
|
|
481
491
|
* }
|
|
482
492
|
* },
|
|
483
|
-
* limit:
|
|
493
|
+
* limit: 10,
|
|
484
494
|
* score_threshold: 0.7,
|
|
485
495
|
* response_type: "completion"
|
|
486
496
|
* })
|
|
@@ -26,11 +26,7 @@ export interface SearchCollectionCollectionsReadableIdSearchGetRequest {
|
|
|
26
26
|
*/
|
|
27
27
|
offset?: number;
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* How much to weigh recency vs similarity (0..1). 0 = no recency effect; 1 = rank by recency only.
|
|
30
30
|
*/
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Query expansion strategy (auto, llm, or no_expansion)
|
|
34
|
-
*/
|
|
35
|
-
expansion_strategy?: AirweaveSDK.QueryExpansionStrategy;
|
|
31
|
+
recency_bias?: number;
|
|
36
32
|
}
|
|
@@ -11,7 +11,7 @@ import * as AirweaveSDK from "../../../../index.js";
|
|
|
11
11
|
* key: "key"
|
|
12
12
|
* }
|
|
13
13
|
* },
|
|
14
|
-
* limit:
|
|
14
|
+
* limit: 10,
|
|
15
15
|
* score_threshold: 0.7,
|
|
16
16
|
* response_type: "completion"
|
|
17
17
|
* }
|
|
@@ -21,16 +21,30 @@ export interface SearchRequest {
|
|
|
21
21
|
query: string;
|
|
22
22
|
/** Qdrant native filter for metadata-based filtering */
|
|
23
23
|
filter?: AirweaveSDK.Filter;
|
|
24
|
-
/** Number of results to skip */
|
|
24
|
+
/** Number of results to skip (DEFAULT: 0) */
|
|
25
25
|
offset?: number;
|
|
26
|
-
/** Maximum number of results to return */
|
|
26
|
+
/** Maximum number of results to return (DEFAULT: 20) */
|
|
27
27
|
limit?: number;
|
|
28
|
-
/** Minimum similarity score threshold */
|
|
28
|
+
/** Minimum similarity score threshold (DEFAULT: None - no filtering) */
|
|
29
29
|
score_threshold?: number;
|
|
30
|
-
/**
|
|
31
|
-
summarize?: boolean;
|
|
32
|
-
/** Type of response (raw or completion) */
|
|
30
|
+
/** Type of response - 'raw' or 'completion' (DEFAULT: 'raw') */
|
|
33
31
|
response_type?: AirweaveSDK.ResponseType;
|
|
34
|
-
/**
|
|
32
|
+
/** Search method to use (DEFAULT: 'hybrid' - combines neural + BM25) */
|
|
33
|
+
search_method?: SearchRequest.SearchMethod;
|
|
34
|
+
/** How much document age penalizes the similarity score (0..1). 0 = no age penalty (pure similarity); 0.5 = old docs lose up to 50% of their score; 1 = old docs get zero score (pure recency). Applied as: score × (1 - bias + bias × age_factor). Works within top ~10,000 semantic matches. DEFAULT: 0.3 */
|
|
35
|
+
recency_bias?: number;
|
|
36
|
+
/** Query expansion strategy (DEFAULT: 'auto' - generates up to 4 query variations). Options: 'auto', 'llm', 'no_expansion' */
|
|
35
37
|
expansion_strategy?: AirweaveSDK.QueryExpansionStrategy;
|
|
38
|
+
/** Enable LLM-based reranking to improve result relevance (DEFAULT: True - enabled, set to False to disable) */
|
|
39
|
+
enable_reranking?: boolean;
|
|
40
|
+
/** Enable automatic filter extraction from natural language query (DEFAULT: True - enabled, set to False to disable) */
|
|
41
|
+
enable_query_interpretation?: boolean;
|
|
42
|
+
}
|
|
43
|
+
export declare namespace SearchRequest {
|
|
44
|
+
type SearchMethod = "hybrid" | "neural" | "keyword";
|
|
45
|
+
const SearchMethod: {
|
|
46
|
+
readonly Hybrid: "hybrid";
|
|
47
|
+
readonly Neural: "neural";
|
|
48
|
+
readonly Keyword: "keyword";
|
|
49
|
+
};
|
|
36
50
|
}
|
|
@@ -3,3 +3,12 @@
|
|
|
3
3
|
* This file was auto-generated by Fern from our API Definition.
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.SearchRequest = void 0;
|
|
7
|
+
var SearchRequest;
|
|
8
|
+
(function (SearchRequest) {
|
|
9
|
+
SearchRequest.SearchMethod = {
|
|
10
|
+
Hybrid: "hybrid",
|
|
11
|
+
Neural: "neural",
|
|
12
|
+
Keyword: "keyword",
|
|
13
|
+
};
|
|
14
|
+
})(SearchRequest || (exports.SearchRequest = SearchRequest = {}));
|
|
@@ -171,18 +171,18 @@ export declare class WhiteLabels {
|
|
|
171
171
|
* tracking and branding purposes.
|
|
172
172
|
*
|
|
173
173
|
* @param {string} whiteLabelId - The unique identifier of the white label integration
|
|
174
|
-
* @param {AirweaveSDK.
|
|
174
|
+
* @param {AirweaveSDK.BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodePost} request
|
|
175
175
|
* @param {WhiteLabels.RequestOptions} requestOptions - Request-specific configuration.
|
|
176
176
|
*
|
|
177
177
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
178
178
|
*
|
|
179
179
|
* @example
|
|
180
|
-
* await client.whiteLabels.
|
|
180
|
+
* await client.whiteLabels.exchangeWhiteLabelOauth2Code("white_label_id", {
|
|
181
181
|
* code: "4/P7q7W91a-oMsCeLvIaQm6bTrgtp7"
|
|
182
182
|
* })
|
|
183
183
|
*/
|
|
184
|
-
|
|
185
|
-
private
|
|
184
|
+
exchangeWhiteLabelOauth2Code(whiteLabelId: string, request: AirweaveSDK.BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodePost, requestOptions?: WhiteLabels.RequestOptions): core.HttpResponsePromise<AirweaveSDK.SourceConnection>;
|
|
185
|
+
private __exchangeWhiteLabelOauth2Code;
|
|
186
186
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
187
187
|
"x-api-key": string;
|
|
188
188
|
}>;
|
|
@@ -516,20 +516,20 @@ class WhiteLabels {
|
|
|
516
516
|
* tracking and branding purposes.
|
|
517
517
|
*
|
|
518
518
|
* @param {string} whiteLabelId - The unique identifier of the white label integration
|
|
519
|
-
* @param {AirweaveSDK.
|
|
519
|
+
* @param {AirweaveSDK.BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodePost} request
|
|
520
520
|
* @param {WhiteLabels.RequestOptions} requestOptions - Request-specific configuration.
|
|
521
521
|
*
|
|
522
522
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
523
523
|
*
|
|
524
524
|
* @example
|
|
525
|
-
* await client.whiteLabels.
|
|
525
|
+
* await client.whiteLabels.exchangeWhiteLabelOauth2Code("white_label_id", {
|
|
526
526
|
* code: "4/P7q7W91a-oMsCeLvIaQm6bTrgtp7"
|
|
527
527
|
* })
|
|
528
528
|
*/
|
|
529
|
-
|
|
530
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
529
|
+
exchangeWhiteLabelOauth2Code(whiteLabelId, request, requestOptions) {
|
|
530
|
+
return core.HttpResponsePromise.fromPromise(this.__exchangeWhiteLabelOauth2Code(whiteLabelId, request, requestOptions));
|
|
531
531
|
}
|
|
532
|
-
|
|
532
|
+
__exchangeWhiteLabelOauth2Code(whiteLabelId, request, requestOptions) {
|
|
533
533
|
return __awaiter(this, void 0, void 0, function* () {
|
|
534
534
|
var _a, _b, _c;
|
|
535
535
|
const _response = yield core.fetcher({
|
|
@@ -8,7 +8,7 @@ import * as AirweaveSDK from "../../../../index.js";
|
|
|
8
8
|
* code: "4/P7q7W91a-oMsCeLvIaQm6bTrgtp7"
|
|
9
9
|
* }
|
|
10
10
|
*/
|
|
11
|
-
export interface
|
|
11
|
+
export interface BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodePost {
|
|
12
12
|
/** The OAuth2 authorization code received from the OAuth callback after customer authentication */
|
|
13
13
|
code: string;
|
|
14
14
|
/** Optional configuration for the source connection. If not provided, a source connection will be created automatically with default settings. The white label integration is automatically linked to the source connection. */
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { type WhiteLabelCreate } from "./WhiteLabelCreate.js";
|
|
2
2
|
export { type WhiteLabelUpdate } from "./WhiteLabelUpdate.js";
|
|
3
|
-
export { type
|
|
3
|
+
export { type BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodePost } from "./BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodePost.js";
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "v0.4.
|
|
1
|
+
export declare const SDK_VERSION = "v0.4.11";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/Client.mjs
CHANGED
|
@@ -12,8 +12,8 @@ export class AirweaveSDKClient {
|
|
|
12
12
|
this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
|
|
13
13
|
"X-Fern-Language": "JavaScript",
|
|
14
14
|
"X-Fern-SDK-Name": "@airweave/sdk",
|
|
15
|
-
"X-Fern-SDK-Version": "v0.4.
|
|
16
|
-
"User-Agent": "@airweave/sdk/v0.4.
|
|
15
|
+
"X-Fern-SDK-Version": "v0.4.11",
|
|
16
|
+
"User-Agent": "@airweave/sdk/v0.4.11",
|
|
17
17
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
18
18
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
19
19
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -138,7 +138,20 @@ export declare class Collections {
|
|
|
138
138
|
* - Metadata filtering using Qdrant's native filter syntax
|
|
139
139
|
* - Pagination with offset and limit
|
|
140
140
|
* - Score threshold filtering
|
|
141
|
-
* - Query expansion strategies
|
|
141
|
+
* - Query expansion strategies (default: AUTO, generates up to 4 variations)
|
|
142
|
+
* - Automatic filter extraction from natural language (default: ON)
|
|
143
|
+
* - LLM-based result reranking (default: ON)
|
|
144
|
+
*
|
|
145
|
+
* Default behavior:
|
|
146
|
+
* - Query expansion: ON (AUTO strategy)
|
|
147
|
+
* - Query interpretation: ON (extracts filters from natural language)
|
|
148
|
+
* - Reranking: ON (improves relevance using LLM)
|
|
149
|
+
* - Score threshold: None (no filtering)
|
|
150
|
+
*
|
|
151
|
+
* To disable features, explicitly set:
|
|
152
|
+
* - enable_reranking: false
|
|
153
|
+
* - enable_query_interpretation: false
|
|
154
|
+
* - expansion_strategy: "no_expansion"
|
|
142
155
|
*
|
|
143
156
|
* @param {string} readableId - The unique readable identifier of the collection to search
|
|
144
157
|
* @param {AirweaveSDK.SearchRequest} request
|
|
@@ -154,7 +167,7 @@ export declare class Collections {
|
|
|
154
167
|
* key: "key"
|
|
155
168
|
* }
|
|
156
169
|
* },
|
|
157
|
-
* limit:
|
|
170
|
+
* limit: 10,
|
|
158
171
|
* score_threshold: 0.7,
|
|
159
172
|
* response_type: "completion"
|
|
160
173
|
* })
|
|
@@ -362,7 +362,7 @@ export class Collections {
|
|
|
362
362
|
__searchCollection(readableId, request, requestOptions) {
|
|
363
363
|
return __awaiter(this, void 0, void 0, function* () {
|
|
364
364
|
var _a, _b, _c;
|
|
365
|
-
const { query, response_type: responseType, limit, offset,
|
|
365
|
+
const { query, response_type: responseType, limit, offset, recency_bias: recencyBias } = request;
|
|
366
366
|
const _queryParams = {};
|
|
367
367
|
_queryParams["query"] = query;
|
|
368
368
|
if (responseType != null) {
|
|
@@ -374,11 +374,8 @@ export class Collections {
|
|
|
374
374
|
if (offset != null) {
|
|
375
375
|
_queryParams["offset"] = offset.toString();
|
|
376
376
|
}
|
|
377
|
-
if (
|
|
378
|
-
_queryParams["
|
|
379
|
-
}
|
|
380
|
-
if (expansionStrategy != null) {
|
|
381
|
-
_queryParams["expansion_strategy"] = expansionStrategy;
|
|
377
|
+
if (recencyBias != null) {
|
|
378
|
+
_queryParams["recency_bias"] = recencyBias.toString();
|
|
382
379
|
}
|
|
383
380
|
const _response = yield core.fetcher({
|
|
384
381
|
url: core.url.join((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirweaveSDKEnvironment.Production, `collections/${encodeURIComponent(readableId)}/search`),
|
|
@@ -428,7 +425,20 @@ export class Collections {
|
|
|
428
425
|
* - Metadata filtering using Qdrant's native filter syntax
|
|
429
426
|
* - Pagination with offset and limit
|
|
430
427
|
* - Score threshold filtering
|
|
431
|
-
* - Query expansion strategies
|
|
428
|
+
* - Query expansion strategies (default: AUTO, generates up to 4 variations)
|
|
429
|
+
* - Automatic filter extraction from natural language (default: ON)
|
|
430
|
+
* - LLM-based result reranking (default: ON)
|
|
431
|
+
*
|
|
432
|
+
* Default behavior:
|
|
433
|
+
* - Query expansion: ON (AUTO strategy)
|
|
434
|
+
* - Query interpretation: ON (extracts filters from natural language)
|
|
435
|
+
* - Reranking: ON (improves relevance using LLM)
|
|
436
|
+
* - Score threshold: None (no filtering)
|
|
437
|
+
*
|
|
438
|
+
* To disable features, explicitly set:
|
|
439
|
+
* - enable_reranking: false
|
|
440
|
+
* - enable_query_interpretation: false
|
|
441
|
+
* - expansion_strategy: "no_expansion"
|
|
432
442
|
*
|
|
433
443
|
* @param {string} readableId - The unique readable identifier of the collection to search
|
|
434
444
|
* @param {AirweaveSDK.SearchRequest} request
|
|
@@ -444,7 +454,7 @@ export class Collections {
|
|
|
444
454
|
* key: "key"
|
|
445
455
|
* }
|
|
446
456
|
* },
|
|
447
|
-
* limit:
|
|
457
|
+
* limit: 10,
|
|
448
458
|
* score_threshold: 0.7,
|
|
449
459
|
* response_type: "completion"
|
|
450
460
|
* })
|
|
@@ -26,11 +26,7 @@ export interface SearchCollectionCollectionsReadableIdSearchGetRequest {
|
|
|
26
26
|
*/
|
|
27
27
|
offset?: number;
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* How much to weigh recency vs similarity (0..1). 0 = no recency effect; 1 = rank by recency only.
|
|
30
30
|
*/
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Query expansion strategy (auto, llm, or no_expansion)
|
|
34
|
-
*/
|
|
35
|
-
expansion_strategy?: AirweaveSDK.QueryExpansionStrategy;
|
|
31
|
+
recency_bias?: number;
|
|
36
32
|
}
|
|
@@ -11,7 +11,7 @@ import * as AirweaveSDK from "../../../../index.mjs";
|
|
|
11
11
|
* key: "key"
|
|
12
12
|
* }
|
|
13
13
|
* },
|
|
14
|
-
* limit:
|
|
14
|
+
* limit: 10,
|
|
15
15
|
* score_threshold: 0.7,
|
|
16
16
|
* response_type: "completion"
|
|
17
17
|
* }
|
|
@@ -21,16 +21,30 @@ export interface SearchRequest {
|
|
|
21
21
|
query: string;
|
|
22
22
|
/** Qdrant native filter for metadata-based filtering */
|
|
23
23
|
filter?: AirweaveSDK.Filter;
|
|
24
|
-
/** Number of results to skip */
|
|
24
|
+
/** Number of results to skip (DEFAULT: 0) */
|
|
25
25
|
offset?: number;
|
|
26
|
-
/** Maximum number of results to return */
|
|
26
|
+
/** Maximum number of results to return (DEFAULT: 20) */
|
|
27
27
|
limit?: number;
|
|
28
|
-
/** Minimum similarity score threshold */
|
|
28
|
+
/** Minimum similarity score threshold (DEFAULT: None - no filtering) */
|
|
29
29
|
score_threshold?: number;
|
|
30
|
-
/**
|
|
31
|
-
summarize?: boolean;
|
|
32
|
-
/** Type of response (raw or completion) */
|
|
30
|
+
/** Type of response - 'raw' or 'completion' (DEFAULT: 'raw') */
|
|
33
31
|
response_type?: AirweaveSDK.ResponseType;
|
|
34
|
-
/**
|
|
32
|
+
/** Search method to use (DEFAULT: 'hybrid' - combines neural + BM25) */
|
|
33
|
+
search_method?: SearchRequest.SearchMethod;
|
|
34
|
+
/** How much document age penalizes the similarity score (0..1). 0 = no age penalty (pure similarity); 0.5 = old docs lose up to 50% of their score; 1 = old docs get zero score (pure recency). Applied as: score × (1 - bias + bias × age_factor). Works within top ~10,000 semantic matches. DEFAULT: 0.3 */
|
|
35
|
+
recency_bias?: number;
|
|
36
|
+
/** Query expansion strategy (DEFAULT: 'auto' - generates up to 4 query variations). Options: 'auto', 'llm', 'no_expansion' */
|
|
35
37
|
expansion_strategy?: AirweaveSDK.QueryExpansionStrategy;
|
|
38
|
+
/** Enable LLM-based reranking to improve result relevance (DEFAULT: True - enabled, set to False to disable) */
|
|
39
|
+
enable_reranking?: boolean;
|
|
40
|
+
/** Enable automatic filter extraction from natural language query (DEFAULT: True - enabled, set to False to disable) */
|
|
41
|
+
enable_query_interpretation?: boolean;
|
|
42
|
+
}
|
|
43
|
+
export declare namespace SearchRequest {
|
|
44
|
+
type SearchMethod = "hybrid" | "neural" | "keyword";
|
|
45
|
+
const SearchMethod: {
|
|
46
|
+
readonly Hybrid: "hybrid";
|
|
47
|
+
readonly Neural: "neural";
|
|
48
|
+
readonly Keyword: "keyword";
|
|
49
|
+
};
|
|
36
50
|
}
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
4
|
+
export var SearchRequest;
|
|
5
|
+
(function (SearchRequest) {
|
|
6
|
+
SearchRequest.SearchMethod = {
|
|
7
|
+
Hybrid: "hybrid",
|
|
8
|
+
Neural: "neural",
|
|
9
|
+
Keyword: "keyword",
|
|
10
|
+
};
|
|
11
|
+
})(SearchRequest || (SearchRequest = {}));
|
|
@@ -171,18 +171,18 @@ export declare class WhiteLabels {
|
|
|
171
171
|
* tracking and branding purposes.
|
|
172
172
|
*
|
|
173
173
|
* @param {string} whiteLabelId - The unique identifier of the white label integration
|
|
174
|
-
* @param {AirweaveSDK.
|
|
174
|
+
* @param {AirweaveSDK.BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodePost} request
|
|
175
175
|
* @param {WhiteLabels.RequestOptions} requestOptions - Request-specific configuration.
|
|
176
176
|
*
|
|
177
177
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
178
178
|
*
|
|
179
179
|
* @example
|
|
180
|
-
* await client.whiteLabels.
|
|
180
|
+
* await client.whiteLabels.exchangeWhiteLabelOauth2Code("white_label_id", {
|
|
181
181
|
* code: "4/P7q7W91a-oMsCeLvIaQm6bTrgtp7"
|
|
182
182
|
* })
|
|
183
183
|
*/
|
|
184
|
-
|
|
185
|
-
private
|
|
184
|
+
exchangeWhiteLabelOauth2Code(whiteLabelId: string, request: AirweaveSDK.BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodePost, requestOptions?: WhiteLabels.RequestOptions): core.HttpResponsePromise<AirweaveSDK.SourceConnection>;
|
|
185
|
+
private __exchangeWhiteLabelOauth2Code;
|
|
186
186
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
187
187
|
"x-api-key": string;
|
|
188
188
|
}>;
|
|
@@ -480,20 +480,20 @@ export class WhiteLabels {
|
|
|
480
480
|
* tracking and branding purposes.
|
|
481
481
|
*
|
|
482
482
|
* @param {string} whiteLabelId - The unique identifier of the white label integration
|
|
483
|
-
* @param {AirweaveSDK.
|
|
483
|
+
* @param {AirweaveSDK.BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodePost} request
|
|
484
484
|
* @param {WhiteLabels.RequestOptions} requestOptions - Request-specific configuration.
|
|
485
485
|
*
|
|
486
486
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
487
487
|
*
|
|
488
488
|
* @example
|
|
489
|
-
* await client.whiteLabels.
|
|
489
|
+
* await client.whiteLabels.exchangeWhiteLabelOauth2Code("white_label_id", {
|
|
490
490
|
* code: "4/P7q7W91a-oMsCeLvIaQm6bTrgtp7"
|
|
491
491
|
* })
|
|
492
492
|
*/
|
|
493
|
-
|
|
494
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
493
|
+
exchangeWhiteLabelOauth2Code(whiteLabelId, request, requestOptions) {
|
|
494
|
+
return core.HttpResponsePromise.fromPromise(this.__exchangeWhiteLabelOauth2Code(whiteLabelId, request, requestOptions));
|
|
495
495
|
}
|
|
496
|
-
|
|
496
|
+
__exchangeWhiteLabelOauth2Code(whiteLabelId, request, requestOptions) {
|
|
497
497
|
return __awaiter(this, void 0, void 0, function* () {
|
|
498
498
|
var _a, _b, _c;
|
|
499
499
|
const _response = yield core.fetcher({
|
|
@@ -8,7 +8,7 @@ import * as AirweaveSDK from "../../../../index.mjs";
|
|
|
8
8
|
* code: "4/P7q7W91a-oMsCeLvIaQm6bTrgtp7"
|
|
9
9
|
* }
|
|
10
10
|
*/
|
|
11
|
-
export interface
|
|
11
|
+
export interface BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodePost {
|
|
12
12
|
/** The OAuth2 authorization code received from the OAuth callback after customer authentication */
|
|
13
13
|
code: string;
|
|
14
14
|
/** Optional configuration for the source connection. If not provided, a source connection will be created automatically with default settings. The white label integration is automatically linked to the source connection. */
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { type WhiteLabelCreate } from "./WhiteLabelCreate.mjs";
|
|
2
2
|
export { type WhiteLabelUpdate } from "./WhiteLabelUpdate.mjs";
|
|
3
|
-
export { type
|
|
3
|
+
export { type BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodePost } from "./BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodePost.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "v0.4.
|
|
1
|
+
export declare const SDK_VERSION = "v0.4.11";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "v0.4.
|
|
1
|
+
export const SDK_VERSION = "v0.4.11";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -559,7 +559,22 @@ This endpoint supports:
|
|
|
559
559
|
- Metadata filtering using Qdrant's native filter syntax
|
|
560
560
|
- Pagination with offset and limit
|
|
561
561
|
- Score threshold filtering
|
|
562
|
-
- Query expansion strategies
|
|
562
|
+
- Query expansion strategies (default: AUTO, generates up to 4 variations)
|
|
563
|
+
- Automatic filter extraction from natural language (default: ON)
|
|
564
|
+
- LLM-based result reranking (default: ON)
|
|
565
|
+
|
|
566
|
+
Default behavior:
|
|
567
|
+
|
|
568
|
+
- Query expansion: ON (AUTO strategy)
|
|
569
|
+
- Query interpretation: ON (extracts filters from natural language)
|
|
570
|
+
- Reranking: ON (improves relevance using LLM)
|
|
571
|
+
- Score threshold: None (no filtering)
|
|
572
|
+
|
|
573
|
+
To disable features, explicitly set:
|
|
574
|
+
|
|
575
|
+
- enable_reranking: false
|
|
576
|
+
- enable_query_interpretation: false
|
|
577
|
+
- expansion_strategy: "no_expansion"
|
|
563
578
|
</dd>
|
|
564
579
|
</dl>
|
|
565
580
|
</dd>
|
|
@@ -581,7 +596,7 @@ await client.collections.searchCollectionAdvanced("readable_id", {
|
|
|
581
596
|
key: "key",
|
|
582
597
|
},
|
|
583
598
|
},
|
|
584
|
-
limit:
|
|
599
|
+
limit: 10,
|
|
585
600
|
score_threshold: 0.7,
|
|
586
601
|
response_type: "completion",
|
|
587
602
|
});
|
|
@@ -1824,7 +1839,7 @@ await client.whiteLabels.listWhiteLabelSourceConnections("white_label_id");
|
|
|
1824
1839
|
</dl>
|
|
1825
1840
|
</details>
|
|
1826
1841
|
|
|
1827
|
-
<details><summary><code>client.whiteLabels.<a href="/src/api/resources/whiteLabels/client/Client.ts">
|
|
1842
|
+
<details><summary><code>client.whiteLabels.<a href="/src/api/resources/whiteLabels/client/Client.ts">exchangeWhiteLabelOauth2Code</a>(whiteLabelId, { ...params }) -> AirweaveSDK.SourceConnection</code></summary>
|
|
1828
1843
|
<dl>
|
|
1829
1844
|
<dd>
|
|
1830
1845
|
|
|
@@ -1859,7 +1874,7 @@ tracking and branding purposes.
|
|
|
1859
1874
|
<dd>
|
|
1860
1875
|
|
|
1861
1876
|
```typescript
|
|
1862
|
-
await client.whiteLabels.
|
|
1877
|
+
await client.whiteLabels.exchangeWhiteLabelOauth2Code("white_label_id", {
|
|
1863
1878
|
code: "4/P7q7W91a-oMsCeLvIaQm6bTrgtp7",
|
|
1864
1879
|
});
|
|
1865
1880
|
```
|
|
@@ -1885,7 +1900,7 @@ await client.whiteLabels.exchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOaut
|
|
|
1885
1900
|
<dl>
|
|
1886
1901
|
<dd>
|
|
1887
1902
|
|
|
1888
|
-
**request:** `AirweaveSDK.
|
|
1903
|
+
**request:** `AirweaveSDK.BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodePost`
|
|
1889
1904
|
|
|
1890
1905
|
</dd>
|
|
1891
1906
|
</dl>
|
|
File without changes
|