exa-js 1.9.2 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -2877,7 +2877,7 @@ type RegularSearchOptions = BaseSearchOptions & {
|
|
|
2877
2877
|
*/
|
|
2878
2878
|
moderation?: boolean;
|
|
2879
2879
|
useAutoprompt?: boolean;
|
|
2880
|
-
type?: "keyword" | "neural" | "auto" | "hybrid" | "fast";
|
|
2880
|
+
type?: "keyword" | "neural" | "auto" | "hybrid" | "fast" | "deep";
|
|
2881
2881
|
};
|
|
2882
2882
|
/**
|
|
2883
2883
|
* Options for finding similar links.
|
|
@@ -2895,7 +2895,7 @@ type ExtrasOptions = {
|
|
|
2895
2895
|
* Search options for performing a search query.
|
|
2896
2896
|
* @typedef {Object} ContentsOptions
|
|
2897
2897
|
* @property {TextContentsOptions | boolean} [text] - Options for retrieving text contents.
|
|
2898
|
-
* @property {HighlightsContentsOptions | boolean} [highlights] - Options for retrieving highlights.
|
|
2898
|
+
* @property {HighlightsContentsOptions | boolean} [highlights] - Options for retrieving highlights. NOTE: For search type "deep", only "true" is allowed. "query", "numSentences" and "highlightsPerUrl" will not be respected;
|
|
2899
2899
|
* @property {SummaryContentsOptions | boolean} [summary] - Options for retrieving summary.
|
|
2900
2900
|
* @property {LivecrawlOptions} [livecrawl] - Options for livecrawling contents. Default is "never" for neural/auto search, "fallback" for keyword search.
|
|
2901
2901
|
* @property {number} [livecrawlTimeout] - The timeout for livecrawling. Max and default is 10000ms.
|
|
@@ -2933,6 +2933,8 @@ type TextContentsOptions = {
|
|
|
2933
2933
|
};
|
|
2934
2934
|
/**
|
|
2935
2935
|
* Options for retrieving highlights from page.
|
|
2936
|
+
* NOTE: For search type "deep", these options will not be respected. Highlights will be generated with respect
|
|
2937
|
+
* to your initial query, and may vary in quantity and length.
|
|
2936
2938
|
* @typedef {Object} HighlightsContentsOptions
|
|
2937
2939
|
* @property {string} [query] - The query string to use for highlights search.
|
|
2938
2940
|
* @property {number} [numSentences] - The number of sentences to return for each highlight.
|
|
@@ -3112,6 +3114,7 @@ type AnswerOptions = {
|
|
|
3112
3114
|
model?: "exa";
|
|
3113
3115
|
systemPrompt?: string;
|
|
3114
3116
|
outputSchema?: Record<string, unknown>;
|
|
3117
|
+
userLocation?: string;
|
|
3115
3118
|
};
|
|
3116
3119
|
/**
|
|
3117
3120
|
* Represents an answer response object from the /answer endpoint.
|
package/dist/index.d.ts
CHANGED
|
@@ -2877,7 +2877,7 @@ type RegularSearchOptions = BaseSearchOptions & {
|
|
|
2877
2877
|
*/
|
|
2878
2878
|
moderation?: boolean;
|
|
2879
2879
|
useAutoprompt?: boolean;
|
|
2880
|
-
type?: "keyword" | "neural" | "auto" | "hybrid" | "fast";
|
|
2880
|
+
type?: "keyword" | "neural" | "auto" | "hybrid" | "fast" | "deep";
|
|
2881
2881
|
};
|
|
2882
2882
|
/**
|
|
2883
2883
|
* Options for finding similar links.
|
|
@@ -2895,7 +2895,7 @@ type ExtrasOptions = {
|
|
|
2895
2895
|
* Search options for performing a search query.
|
|
2896
2896
|
* @typedef {Object} ContentsOptions
|
|
2897
2897
|
* @property {TextContentsOptions | boolean} [text] - Options for retrieving text contents.
|
|
2898
|
-
* @property {HighlightsContentsOptions | boolean} [highlights] - Options for retrieving highlights.
|
|
2898
|
+
* @property {HighlightsContentsOptions | boolean} [highlights] - Options for retrieving highlights. NOTE: For search type "deep", only "true" is allowed. "query", "numSentences" and "highlightsPerUrl" will not be respected;
|
|
2899
2899
|
* @property {SummaryContentsOptions | boolean} [summary] - Options for retrieving summary.
|
|
2900
2900
|
* @property {LivecrawlOptions} [livecrawl] - Options for livecrawling contents. Default is "never" for neural/auto search, "fallback" for keyword search.
|
|
2901
2901
|
* @property {number} [livecrawlTimeout] - The timeout for livecrawling. Max and default is 10000ms.
|
|
@@ -2933,6 +2933,8 @@ type TextContentsOptions = {
|
|
|
2933
2933
|
};
|
|
2934
2934
|
/**
|
|
2935
2935
|
* Options for retrieving highlights from page.
|
|
2936
|
+
* NOTE: For search type "deep", these options will not be respected. Highlights will be generated with respect
|
|
2937
|
+
* to your initial query, and may vary in quantity and length.
|
|
2936
2938
|
* @typedef {Object} HighlightsContentsOptions
|
|
2937
2939
|
* @property {string} [query] - The query string to use for highlights search.
|
|
2938
2940
|
* @property {number} [numSentences] - The number of sentences to return for each highlight.
|
|
@@ -3112,6 +3114,7 @@ type AnswerOptions = {
|
|
|
3112
3114
|
model?: "exa";
|
|
3113
3115
|
systemPrompt?: string;
|
|
3114
3116
|
outputSchema?: Record<string, unknown>;
|
|
3117
|
+
userLocation?: string;
|
|
3115
3118
|
};
|
|
3116
3119
|
/**
|
|
3117
3120
|
* Represents an answer response object from the /answer endpoint.
|
package/dist/index.js
CHANGED
|
@@ -74,7 +74,7 @@ var import_cross_fetch = __toESM(require("cross-fetch"));
|
|
|
74
74
|
// package.json
|
|
75
75
|
var package_default = {
|
|
76
76
|
name: "exa-js",
|
|
77
|
-
version: "1.
|
|
77
|
+
version: "1.10.0",
|
|
78
78
|
description: "Exa SDK for Node.js and the browser",
|
|
79
79
|
publishConfig: {
|
|
80
80
|
access: "public"
|
|
@@ -1581,7 +1581,8 @@ var Exa2 = class {
|
|
|
1581
1581
|
text: options?.text ?? false,
|
|
1582
1582
|
model: options?.model ?? "exa",
|
|
1583
1583
|
systemPrompt: options?.systemPrompt,
|
|
1584
|
-
outputSchema
|
|
1584
|
+
outputSchema,
|
|
1585
|
+
userLocation: options?.userLocation
|
|
1585
1586
|
};
|
|
1586
1587
|
return await this.request("/answer", "POST", requestBody);
|
|
1587
1588
|
}
|