UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
73 lines (72 loc) 3.46 kB
/** * 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.22 * 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 Gpt4120250414: "gpt-4.1-2025-04-14"; readonly Claude35SonnetLatest: "claude-3-5-sonnet-latest"; readonly Claude35Sonnet20240620: "claude-3-5-sonnet-20240620"; readonly ClaudeSonnet420250514: "claude-sonnet-4-20250514"; readonly ClaudeOpus420250514: "claude-opus-4-20250514"; readonly ClaudeSonnet4520250929: "claude-sonnet-4-5-20250929"; readonly O1Mini: "o1-mini"; readonly O3Mini: "o3-mini"; readonly O3: "o3"; }; 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];