UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
189 lines (174 loc) 6.41 kB
/* tslint:disable */ /* eslint-disable */ /** * AskNews API * AskNews API [![status](https://status.asknews.app/api/badge/2/status?style=for-the-badge)](https://status.asknews.app/status/prod) * * The version of the OpenAPI document: 0.24.66 * Contact: contact@emergentmethods.ai * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { mapValues } from '../runtime'; import type { MCPFilterParams } from './MCPFilterParams'; import { MCPFilterParamsFromJSON, MCPFilterParamsFromJSONTyped, MCPFilterParamsToJSON, MCPFilterParamsToJSONTyped, } from './MCPFilterParams'; import type { Sources2 } from './Sources2'; import { Sources2FromJSON, Sources2FromJSONTyped, Sources2ToJSON, Sources2ToJSONTyped, } from './Sources2'; import type { DeepNewsModel } from './DeepNewsModel'; import { DeepNewsModelFromJSON, DeepNewsModelFromJSONTyped, DeepNewsModelToJSON, DeepNewsModelToJSONTyped, } from './DeepNewsModel'; /** * Parameters for DeepNews alert source. * * DeepNews performs deep research using multiple tools. * @export * @interface DeepNewsSourceParams */ export interface DeepNewsSourceParams { /** * * @type {Sources2} * @memberof DeepNewsSourceParams */ sources?: Sources2; /** * * @type {MCPFilterParams} * @memberof DeepNewsSourceParams */ filterParams?: MCPFilterParams | null; /** * Whether to provide extracted entities to the agent. Defaults to True. * @type {boolean} * @memberof DeepNewsSourceParams */ includeEntities?: boolean; /** * Whether to provide knowledge graphs to the agent. Defaults to False. * @type {boolean} * @memberof DeepNewsSourceParams */ includeGraphs?: boolean; /** * Whether to provide geo coordinates to the agent. Defaults to False. * @type {boolean} * @memberof DeepNewsSourceParams */ includeCoordinates?: boolean; /** * Legacy vs new DeepNews engine * @type {string} * @memberof DeepNewsSourceParams */ engine?: DeepNewsSourceParamsEngineEnum; /** * The number of tool calls the agent can run in parallel. * @type {number} * @memberof DeepNewsSourceParams */ maxParallelToolCalls?: number; /** * Whether to enable source pruning, which removes sources that are deemed irrelevant to the final report. This can help reduce noise in the sources and improve the quality of the report, but may also remove some relevant sources if not used carefully. * @type {boolean} * @memberof DeepNewsSourceParams */ enableSourcePruning?: boolean; /** * * @type {Date} * @memberof DeepNewsSourceParams */ cutoffDatetime?: Date | null; /** * * @type {DeepNewsModel} * @memberof DeepNewsSourceParams */ model?: DeepNewsModel | null; /** * The search depth for deep research. Higher values mean more thorough research. Defaults to 1. * @type {number} * @memberof DeepNewsSourceParams */ searchDepth?: number; /** * The maximum research depth allowed. Defaults to 4. * @type {number} * @memberof DeepNewsSourceParams */ maxDepth?: number; } /** * @export */ export const DeepNewsSourceParamsEngineEnum = { V1: 'v1', V15: 'v1.5' } as const; export type DeepNewsSourceParamsEngineEnum = typeof DeepNewsSourceParamsEngineEnum[keyof typeof DeepNewsSourceParamsEngineEnum]; /** * Check if a given object implements the DeepNewsSourceParams interface. */ export function instanceOfDeepNewsSourceParams(value: object): value is DeepNewsSourceParams { return true; } export function DeepNewsSourceParamsFromJSON(json: any): DeepNewsSourceParams { return DeepNewsSourceParamsFromJSONTyped(json, false); } export function DeepNewsSourceParamsFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeepNewsSourceParams { if (json == null) { return json; } return { 'sources': json['sources'] == null ? undefined : Sources2FromJSON(json['sources']), 'filterParams': json['filter_params'] == null ? undefined : MCPFilterParamsFromJSON(json['filter_params']), 'includeEntities': json['include_entities'] == null ? undefined : json['include_entities'], 'includeGraphs': json['include_graphs'] == null ? undefined : json['include_graphs'], 'includeCoordinates': json['include_coordinates'] == null ? undefined : json['include_coordinates'], 'engine': json['engine'] == null ? undefined : json['engine'], 'maxParallelToolCalls': json['max_parallel_tool_calls'] == null ? undefined : json['max_parallel_tool_calls'], 'enableSourcePruning': json['enable_source_pruning'] == null ? undefined : json['enable_source_pruning'], 'cutoffDatetime': json['cutoff_datetime'] == null ? undefined : (new Date(json['cutoff_datetime'])), 'model': json['model'] == null ? undefined : DeepNewsModelFromJSON(json['model']), 'searchDepth': json['search_depth'] == null ? undefined : json['search_depth'], 'maxDepth': json['max_depth'] == null ? undefined : json['max_depth'], }; } export function DeepNewsSourceParamsToJSON(json: any): DeepNewsSourceParams { return DeepNewsSourceParamsToJSONTyped(json, false); } export function DeepNewsSourceParamsToJSONTyped(value?: DeepNewsSourceParams | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'sources': Sources2ToJSON(value['sources']), 'filter_params': MCPFilterParamsToJSON(value['filterParams']), 'include_entities': value['includeEntities'], 'include_graphs': value['includeGraphs'], 'include_coordinates': value['includeCoordinates'], 'engine': value['engine'], 'max_parallel_tool_calls': value['maxParallelToolCalls'], 'enable_source_pruning': value['enableSourcePruning'], 'cutoff_datetime': value['cutoffDatetime'] == null ? undefined : ((value['cutoffDatetime'] as any).toISOString()), 'model': DeepNewsModelToJSON(value['model']), 'search_depth': value['searchDepth'], 'max_depth': value['maxDepth'], }; }