@emergentmethods/asknews-typescript-sdk
Version:
Typescript SDK for AskNews API
78 lines (77 loc) • 3.69 kB
JavaScript
/* tslint:disable */
/* eslint-disable */
/**
* AskNews API
* AskNews API [](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 { MCPFilterParamsFromJSON, MCPFilterParamsToJSON, } from './MCPFilterParams';
import { Sources2FromJSON, Sources2ToJSON, } from './Sources2';
import { DeepNewsModelFromJSON, DeepNewsModelToJSON, } from './DeepNewsModel';
/**
* @export
*/
export const DeepNewsReportParamsEngineEnum = {
V1: 'v1',
V15: 'v1.5'
};
/**
* Check if a given object implements the DeepNewsReportParams interface.
*/
export function instanceOfDeepNewsReportParams(value) {
return true;
}
export function DeepNewsReportParamsFromJSON(json) {
return DeepNewsReportParamsFromJSONTyped(json, false);
}
export function DeepNewsReportParamsFromJSONTyped(json, ignoreDiscriminator) {
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'],
'startCitationNumber': json['start_citation_number'] == null ? undefined : json['start_citation_number'],
'journalistMode': json['journalist_mode'] == null ? undefined : json['journalist_mode'],
};
}
export function DeepNewsReportParamsToJSON(json) {
return DeepNewsReportParamsToJSONTyped(json, false);
}
export function DeepNewsReportParamsToJSONTyped(value, ignoreDiscriminator = false) {
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'].toISOString()),
'model': DeepNewsModelToJSON(value['model']),
'search_depth': value['searchDepth'],
'max_depth': value['maxDepth'],
'start_citation_number': value['startCitationNumber'],
'journalist_mode': value['journalistMode'],
};
}