UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
68 lines (67 loc) 3.07 kB
/** * AskNews API * AskNews API * * The version of the OpenAPI document: 0.19.10 * 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 * as runtime from '../runtime'; import type { ForecastResponse } from '../models/index'; export interface GetForecastRequest { query: string; lookback?: number; articlesToUse?: number; method?: GetForecastMethodEnum; model?: GetForecastModelEnum; cutoffDate?: string; useReddit?: boolean; additionalContext?: string; webSearch?: boolean; expert?: GetForecastExpertEnum; } /** * */ export declare class ForecastApi extends runtime.BaseAPI { /** * Make an expert forecast for a news event. This endpoint reaches into the news archive, looking back `lookback` days to extract the most relevant news articles, building a timeline of events, and then making an expert forecast. This endpoint is more expensive than the search endpoint, it is calling gpt-4o or claude 3-5 on approx 15k tokens to build the forecast. This endpoint counts toward \"deep\" calls in the billing system. It returns the forecast, the reasoning, and the sources. * Make an expert forecast for a news event. */ getForecastRaw(requestParameters: GetForecastRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ForecastResponse>>; /** * Make an expert forecast for a news event. This endpoint reaches into the news archive, looking back `lookback` days to extract the most relevant news articles, building a timeline of events, and then making an expert forecast. This endpoint is more expensive than the search endpoint, it is calling gpt-4o or claude 3-5 on approx 15k tokens to build the forecast. This endpoint counts toward \"deep\" calls in the billing system. It returns the forecast, the reasoning, and the sources. * Make an expert forecast for a news event. */ getForecast(requestParameters: GetForecastRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ForecastResponse>; } /** * @export */ export declare const GetForecastMethodEnum: { readonly Kw: "kw"; }; export type GetForecastMethodEnum = typeof GetForecastMethodEnum[keyof typeof GetForecastMethodEnum]; /** * @export */ export declare const GetForecastModelEnum: { readonly Gpt4o: "gpt-4o"; readonly Gpt4oMini: "gpt-4o-mini"; readonly Claude35SonnetLatest: "claude-3-5-sonnet-latest"; readonly Claude35Sonnet20240620: "claude-3-5-sonnet-20240620"; readonly O1Mini: "o1-mini"; readonly O3Mini: "o3-mini"; }; export type GetForecastModelEnum = typeof GetForecastModelEnum[keyof typeof GetForecastModelEnum]; /** * @export */ export declare const GetForecastExpertEnum: { readonly General: "general"; readonly Sports: "sports"; }; export type GetForecastExpertEnum = typeof GetForecastExpertEnum[keyof typeof GetForecastExpertEnum];