@emergentmethods/asknews-typescript-sdk
Version:
Typescript SDK for AskNews API
74 lines (73 loc) • 3.36 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 DeepNewsSourceParamsEngineEnum = {
V1: 'v1',
V15: 'v1.5'
};
/**
* Check if a given object implements the DeepNewsSourceParams interface.
*/
export function instanceOfDeepNewsSourceParams(value) {
return true;
}
export function DeepNewsSourceParamsFromJSON(json) {
return DeepNewsSourceParamsFromJSONTyped(json, false);
}
export function DeepNewsSourceParamsFromJSONTyped(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'],
};
}
export function DeepNewsSourceParamsToJSON(json) {
return DeepNewsSourceParamsToJSONTyped(json, false);
}
export function DeepNewsSourceParamsToJSONTyped(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'],
};
}