valyu-js 2.7.2 → 2.7.3
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 +18 -2
- package/dist/index.d.ts +18 -2
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -207,7 +207,7 @@ type DeepResearchMode = "fast" | "standard" | "lite" | "heavy" | "max";
|
|
|
207
207
|
type DeepResearchStatus = "queued" | "running" | "awaiting_input" | "paused" | "completed" | "failed" | "cancelled";
|
|
208
208
|
type DeepResearchOutputFormat = "markdown" | "pdf" | "toon" | Record<string, any>;
|
|
209
209
|
type DeepResearchOutputType = "markdown" | "json" | "toon";
|
|
210
|
-
type ImageType = "chart" | "ai_generated";
|
|
210
|
+
type ImageType = "chart" | "ai_generated" | "screenshot";
|
|
211
211
|
type ChartType = "line" | "bar" | "area";
|
|
212
212
|
interface FileAttachment {
|
|
213
213
|
data: string;
|
|
@@ -261,6 +261,10 @@ interface DeepResearchSearchConfig {
|
|
|
261
261
|
category?: string;
|
|
262
262
|
countryCode?: CountryCode;
|
|
263
263
|
}
|
|
264
|
+
interface DeepResearchTools {
|
|
265
|
+
code_execution?: boolean;
|
|
266
|
+
screenshots?: boolean;
|
|
267
|
+
}
|
|
264
268
|
interface DeepResearchCreateOptions {
|
|
265
269
|
query?: string;
|
|
266
270
|
input?: string;
|
|
@@ -275,7 +279,9 @@ interface DeepResearchCreateOptions {
|
|
|
275
279
|
files?: FileAttachment[];
|
|
276
280
|
deliverables?: (string | Deliverable)[];
|
|
277
281
|
mcpServers?: MCPServerConfig[];
|
|
282
|
+
/** @deprecated Use tools.code_execution instead */
|
|
278
283
|
codeExecution?: boolean;
|
|
284
|
+
tools?: DeepResearchTools;
|
|
279
285
|
previousReports?: string[];
|
|
280
286
|
webhookUrl?: string;
|
|
281
287
|
alertEmail?: string | AlertEmailConfig;
|
|
@@ -331,6 +337,8 @@ interface ImageMetadata {
|
|
|
331
337
|
x_axis_label?: string;
|
|
332
338
|
y_axis_label?: string;
|
|
333
339
|
data_series?: ChartDataSeries[];
|
|
340
|
+
source_url?: string;
|
|
341
|
+
captured_at?: number;
|
|
334
342
|
}
|
|
335
343
|
interface DeepResearchSource {
|
|
336
344
|
title: string;
|
|
@@ -354,6 +362,12 @@ interface DeepResearchUsage {
|
|
|
354
362
|
compute_cost: number;
|
|
355
363
|
total_cost: number;
|
|
356
364
|
}
|
|
365
|
+
interface DeepResearchCostBreakdown {
|
|
366
|
+
task: number;
|
|
367
|
+
screenshots?: number;
|
|
368
|
+
code_execution?: number;
|
|
369
|
+
deliverables?: number;
|
|
370
|
+
}
|
|
357
371
|
interface DeepResearchCreateResponse {
|
|
358
372
|
success: boolean;
|
|
359
373
|
deepresearch_id?: string;
|
|
@@ -387,6 +401,8 @@ interface DeepResearchStatusResponse {
|
|
|
387
401
|
sources?: DeepResearchSource[];
|
|
388
402
|
cost?: number;
|
|
389
403
|
usage?: DeepResearchUsage;
|
|
404
|
+
cost_breakdown?: DeepResearchCostBreakdown;
|
|
405
|
+
tools?: DeepResearchTools;
|
|
390
406
|
batch_id?: string;
|
|
391
407
|
batch_task_id?: string;
|
|
392
408
|
hitl_config?: Record<string, boolean>;
|
|
@@ -968,4 +984,4 @@ declare class Valyu {
|
|
|
968
984
|
private _datasourcesCategories;
|
|
969
985
|
}
|
|
970
986
|
|
|
971
|
-
export { type AIUsage, type AddBatchTasksOptions, type AddBatchTasksResponse, type AlertEmailConfig, type AnswerErrorResponse, type AnswerOptions, type AnswerResponse, type AnswerStreamChunk, type AnswerStreamChunkType, type AnswerSuccessResponse, type BatchCounts, type BatchPagination, type BatchStatus, type BatchStatusResponse, type BatchTaskCreated, type BatchTaskInput, type BatchTaskListItem, type BatchWaitOptions, type CancelBatchResponse, type ChartDataPoint, type ChartDataSeries, type ChartType, type ContentResponseLength, type ContentResult, type ContentResultFailed, type ContentResultSuccess, type ContentsAsyncJobResponse, type ContentsJobResponse, type ContentsJobStatus, type ContentsJobWaitOptions, type ContentsOptions, type ContentsResponse, type Cost, type CountryCode, type CreateBatchOptions, type CreateBatchResponse, type Datasource, type DatasourceCategory, type DatasourceCategoryId, type DatasourceCoverage, type DatasourceModality, type DatasourcePricing, type DatasourcesCategoriesResponse, type DatasourcesListOptions, type DatasourcesListResponse, type DeepResearchBatch, type DeepResearchCancelResponse, type DeepResearchCreateOptions, type DeepResearchCreateResponse, type DeepResearchDeleteResponse, type DeepResearchGetAssetsOptions, type DeepResearchGetAssetsResponse, type DeepResearchListResponse, type DeepResearchMode, type DeepResearchOutputFormat, type DeepResearchRespondResponse, type DeepResearchSearchConfig, type DeepResearchSource, type DeepResearchStatus, type DeepResearchStatusResponse, type DeepResearchTaskListItem, type DeepResearchTogglePublicResponse, type DeepResearchUpdateResponse, type DeepResearchUsage, type ExtractEffort, type ExtractionMetadata, type FeedbackResponse, type FeedbackSentiment, type FileAttachment, type HitlConfig, type ImageMetadata, type ImageType, type Interaction, type InteractionHistoryEntry, type InteractionType, type ListBatchTasksOptions, type ListBatchTasksResponse, type ListBatchesOptions, type ListBatchesResponse, type ListOptions, type MCPServerConfig, type Progress, type ResponseLength, type SearchMetadata, type SearchOptions, type SearchResponse, type SearchResult, type SearchType, type StreamCallback, Valyu, type WaitOptions, verifyContentsWebhookSignature };
|
|
987
|
+
export { type AIUsage, type AddBatchTasksOptions, type AddBatchTasksResponse, type AlertEmailConfig, type AnswerErrorResponse, type AnswerOptions, type AnswerResponse, type AnswerStreamChunk, type AnswerStreamChunkType, type AnswerSuccessResponse, type BatchCounts, type BatchPagination, type BatchStatus, type BatchStatusResponse, type BatchTaskCreated, type BatchTaskInput, type BatchTaskListItem, type BatchWaitOptions, type CancelBatchResponse, type ChartDataPoint, type ChartDataSeries, type ChartType, type ContentResponseLength, type ContentResult, type ContentResultFailed, type ContentResultSuccess, type ContentsAsyncJobResponse, type ContentsJobResponse, type ContentsJobStatus, type ContentsJobWaitOptions, type ContentsOptions, type ContentsResponse, type Cost, type CountryCode, type CreateBatchOptions, type CreateBatchResponse, type Datasource, type DatasourceCategory, type DatasourceCategoryId, type DatasourceCoverage, type DatasourceModality, type DatasourcePricing, type DatasourcesCategoriesResponse, type DatasourcesListOptions, type DatasourcesListResponse, type DeepResearchBatch, type DeepResearchCancelResponse, type DeepResearchCostBreakdown, type DeepResearchCreateOptions, type DeepResearchCreateResponse, type DeepResearchDeleteResponse, type DeepResearchGetAssetsOptions, type DeepResearchGetAssetsResponse, type DeepResearchListResponse, type DeepResearchMode, type DeepResearchOutputFormat, type DeepResearchRespondResponse, type DeepResearchSearchConfig, type DeepResearchSource, type DeepResearchStatus, type DeepResearchStatusResponse, type DeepResearchTaskListItem, type DeepResearchTogglePublicResponse, type DeepResearchTools, type DeepResearchUpdateResponse, type DeepResearchUsage, type ExtractEffort, type ExtractionMetadata, type FeedbackResponse, type FeedbackSentiment, type FileAttachment, type HitlConfig, type ImageMetadata, type ImageType, type Interaction, type InteractionHistoryEntry, type InteractionType, type ListBatchTasksOptions, type ListBatchTasksResponse, type ListBatchesOptions, type ListBatchesResponse, type ListOptions, type MCPServerConfig, type Progress, type ResponseLength, type SearchMetadata, type SearchOptions, type SearchResponse, type SearchResult, type SearchType, type StreamCallback, Valyu, type WaitOptions, verifyContentsWebhookSignature };
|
package/dist/index.d.ts
CHANGED
|
@@ -207,7 +207,7 @@ type DeepResearchMode = "fast" | "standard" | "lite" | "heavy" | "max";
|
|
|
207
207
|
type DeepResearchStatus = "queued" | "running" | "awaiting_input" | "paused" | "completed" | "failed" | "cancelled";
|
|
208
208
|
type DeepResearchOutputFormat = "markdown" | "pdf" | "toon" | Record<string, any>;
|
|
209
209
|
type DeepResearchOutputType = "markdown" | "json" | "toon";
|
|
210
|
-
type ImageType = "chart" | "ai_generated";
|
|
210
|
+
type ImageType = "chart" | "ai_generated" | "screenshot";
|
|
211
211
|
type ChartType = "line" | "bar" | "area";
|
|
212
212
|
interface FileAttachment {
|
|
213
213
|
data: string;
|
|
@@ -261,6 +261,10 @@ interface DeepResearchSearchConfig {
|
|
|
261
261
|
category?: string;
|
|
262
262
|
countryCode?: CountryCode;
|
|
263
263
|
}
|
|
264
|
+
interface DeepResearchTools {
|
|
265
|
+
code_execution?: boolean;
|
|
266
|
+
screenshots?: boolean;
|
|
267
|
+
}
|
|
264
268
|
interface DeepResearchCreateOptions {
|
|
265
269
|
query?: string;
|
|
266
270
|
input?: string;
|
|
@@ -275,7 +279,9 @@ interface DeepResearchCreateOptions {
|
|
|
275
279
|
files?: FileAttachment[];
|
|
276
280
|
deliverables?: (string | Deliverable)[];
|
|
277
281
|
mcpServers?: MCPServerConfig[];
|
|
282
|
+
/** @deprecated Use tools.code_execution instead */
|
|
278
283
|
codeExecution?: boolean;
|
|
284
|
+
tools?: DeepResearchTools;
|
|
279
285
|
previousReports?: string[];
|
|
280
286
|
webhookUrl?: string;
|
|
281
287
|
alertEmail?: string | AlertEmailConfig;
|
|
@@ -331,6 +337,8 @@ interface ImageMetadata {
|
|
|
331
337
|
x_axis_label?: string;
|
|
332
338
|
y_axis_label?: string;
|
|
333
339
|
data_series?: ChartDataSeries[];
|
|
340
|
+
source_url?: string;
|
|
341
|
+
captured_at?: number;
|
|
334
342
|
}
|
|
335
343
|
interface DeepResearchSource {
|
|
336
344
|
title: string;
|
|
@@ -354,6 +362,12 @@ interface DeepResearchUsage {
|
|
|
354
362
|
compute_cost: number;
|
|
355
363
|
total_cost: number;
|
|
356
364
|
}
|
|
365
|
+
interface DeepResearchCostBreakdown {
|
|
366
|
+
task: number;
|
|
367
|
+
screenshots?: number;
|
|
368
|
+
code_execution?: number;
|
|
369
|
+
deliverables?: number;
|
|
370
|
+
}
|
|
357
371
|
interface DeepResearchCreateResponse {
|
|
358
372
|
success: boolean;
|
|
359
373
|
deepresearch_id?: string;
|
|
@@ -387,6 +401,8 @@ interface DeepResearchStatusResponse {
|
|
|
387
401
|
sources?: DeepResearchSource[];
|
|
388
402
|
cost?: number;
|
|
389
403
|
usage?: DeepResearchUsage;
|
|
404
|
+
cost_breakdown?: DeepResearchCostBreakdown;
|
|
405
|
+
tools?: DeepResearchTools;
|
|
390
406
|
batch_id?: string;
|
|
391
407
|
batch_task_id?: string;
|
|
392
408
|
hitl_config?: Record<string, boolean>;
|
|
@@ -968,4 +984,4 @@ declare class Valyu {
|
|
|
968
984
|
private _datasourcesCategories;
|
|
969
985
|
}
|
|
970
986
|
|
|
971
|
-
export { type AIUsage, type AddBatchTasksOptions, type AddBatchTasksResponse, type AlertEmailConfig, type AnswerErrorResponse, type AnswerOptions, type AnswerResponse, type AnswerStreamChunk, type AnswerStreamChunkType, type AnswerSuccessResponse, type BatchCounts, type BatchPagination, type BatchStatus, type BatchStatusResponse, type BatchTaskCreated, type BatchTaskInput, type BatchTaskListItem, type BatchWaitOptions, type CancelBatchResponse, type ChartDataPoint, type ChartDataSeries, type ChartType, type ContentResponseLength, type ContentResult, type ContentResultFailed, type ContentResultSuccess, type ContentsAsyncJobResponse, type ContentsJobResponse, type ContentsJobStatus, type ContentsJobWaitOptions, type ContentsOptions, type ContentsResponse, type Cost, type CountryCode, type CreateBatchOptions, type CreateBatchResponse, type Datasource, type DatasourceCategory, type DatasourceCategoryId, type DatasourceCoverage, type DatasourceModality, type DatasourcePricing, type DatasourcesCategoriesResponse, type DatasourcesListOptions, type DatasourcesListResponse, type DeepResearchBatch, type DeepResearchCancelResponse, type DeepResearchCreateOptions, type DeepResearchCreateResponse, type DeepResearchDeleteResponse, type DeepResearchGetAssetsOptions, type DeepResearchGetAssetsResponse, type DeepResearchListResponse, type DeepResearchMode, type DeepResearchOutputFormat, type DeepResearchRespondResponse, type DeepResearchSearchConfig, type DeepResearchSource, type DeepResearchStatus, type DeepResearchStatusResponse, type DeepResearchTaskListItem, type DeepResearchTogglePublicResponse, type DeepResearchUpdateResponse, type DeepResearchUsage, type ExtractEffort, type ExtractionMetadata, type FeedbackResponse, type FeedbackSentiment, type FileAttachment, type HitlConfig, type ImageMetadata, type ImageType, type Interaction, type InteractionHistoryEntry, type InteractionType, type ListBatchTasksOptions, type ListBatchTasksResponse, type ListBatchesOptions, type ListBatchesResponse, type ListOptions, type MCPServerConfig, type Progress, type ResponseLength, type SearchMetadata, type SearchOptions, type SearchResponse, type SearchResult, type SearchType, type StreamCallback, Valyu, type WaitOptions, verifyContentsWebhookSignature };
|
|
987
|
+
export { type AIUsage, type AddBatchTasksOptions, type AddBatchTasksResponse, type AlertEmailConfig, type AnswerErrorResponse, type AnswerOptions, type AnswerResponse, type AnswerStreamChunk, type AnswerStreamChunkType, type AnswerSuccessResponse, type BatchCounts, type BatchPagination, type BatchStatus, type BatchStatusResponse, type BatchTaskCreated, type BatchTaskInput, type BatchTaskListItem, type BatchWaitOptions, type CancelBatchResponse, type ChartDataPoint, type ChartDataSeries, type ChartType, type ContentResponseLength, type ContentResult, type ContentResultFailed, type ContentResultSuccess, type ContentsAsyncJobResponse, type ContentsJobResponse, type ContentsJobStatus, type ContentsJobWaitOptions, type ContentsOptions, type ContentsResponse, type Cost, type CountryCode, type CreateBatchOptions, type CreateBatchResponse, type Datasource, type DatasourceCategory, type DatasourceCategoryId, type DatasourceCoverage, type DatasourceModality, type DatasourcePricing, type DatasourcesCategoriesResponse, type DatasourcesListOptions, type DatasourcesListResponse, type DeepResearchBatch, type DeepResearchCancelResponse, type DeepResearchCostBreakdown, type DeepResearchCreateOptions, type DeepResearchCreateResponse, type DeepResearchDeleteResponse, type DeepResearchGetAssetsOptions, type DeepResearchGetAssetsResponse, type DeepResearchListResponse, type DeepResearchMode, type DeepResearchOutputFormat, type DeepResearchRespondResponse, type DeepResearchSearchConfig, type DeepResearchSource, type DeepResearchStatus, type DeepResearchStatusResponse, type DeepResearchTaskListItem, type DeepResearchTogglePublicResponse, type DeepResearchTools, type DeepResearchUpdateResponse, type DeepResearchUsage, type ExtractEffort, type ExtractionMetadata, type FeedbackResponse, type FeedbackSentiment, type FileAttachment, type HitlConfig, type ImageMetadata, type ImageType, type Interaction, type InteractionHistoryEntry, type InteractionType, type ListBatchTasksOptions, type ListBatchTasksResponse, type ListBatchesOptions, type ListBatchesResponse, type ListOptions, type MCPServerConfig, type Progress, type ResponseLength, type SearchMetadata, type SearchOptions, type SearchResponse, type SearchResult, type SearchType, type StreamCallback, Valyu, type WaitOptions, verifyContentsWebhookSignature };
|
package/dist/index.js
CHANGED
|
@@ -660,9 +660,13 @@ var Valyu = class {
|
|
|
660
660
|
query: queryValue,
|
|
661
661
|
mode: mode || "fast",
|
|
662
662
|
// API defaults to "standard", but we keep "fast" for backward compatibility
|
|
663
|
-
output_formats: options.outputFormats || ["markdown"]
|
|
664
|
-
code_execution: options.codeExecution !== false
|
|
663
|
+
output_formats: options.outputFormats || ["markdown"]
|
|
665
664
|
};
|
|
665
|
+
if (options.tools) {
|
|
666
|
+
payload.tools = options.tools;
|
|
667
|
+
} else if (options.codeExecution !== void 0) {
|
|
668
|
+
payload.code_execution = options.codeExecution;
|
|
669
|
+
}
|
|
666
670
|
if (options.strategy) payload.strategy = options.strategy;
|
|
667
671
|
if (options.researchStrategy)
|
|
668
672
|
payload.research_strategy = options.researchStrategy;
|