UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
53 lines (52 loc) 3.73 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.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 * as runtime from '../runtime'; import type { CreateChatCompletionRequest, CreateChatCompletionResponse1, CreateDeepNewsRequest, CreateDeepNewsResponse1, ListDeepNewsModelResponse } from '../models/index'; export interface DeepNewsRequest { createDeepNewsRequest: CreateDeepNewsRequest; } export interface GetChatCompletionsRequest { createChatCompletionRequest: CreateChatCompletionRequest; } /** * */ export declare class ChatApi extends runtime.BaseAPI { /** * Deep research into real-time news, archive news, and Google. */ deepNewsRaw(requestParameters: DeepNewsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateDeepNewsResponse1> | runtime.StreamApiResponse>; /** * Deep research into real-time news, archive news, and Google. */ deepNews(requestParameters: DeepNewsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateDeepNewsResponse1 | ReadableStream<any>>; /** * Get the chat completions for a given user message. This endpoint follows the OpenAI API spec. It includes a couple extra params, which include: - **journalist_mode**: Whether to activate an auto prompt that is more keen on AP styling, citations, and fair reporting. Setting to false, you get a vanilla LLM with the news pre added to the system prompt. No other prompting. - **inline_citations**: Decides how you want the bot to cite sources. It can use brackets, or it can also include the markdown with URL automatically. - **asknews_watermark**: Whether to include the AskNews watermark in the response. * Get chat completions from a news-infused AI assistant */ getChatCompletionsRaw(requestParameters: GetChatCompletionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateChatCompletionResponse1> | runtime.StreamApiResponse>; /** * Get the chat completions for a given user message. This endpoint follows the OpenAI API spec. It includes a couple extra params, which include: - **journalist_mode**: Whether to activate an auto prompt that is more keen on AP styling, citations, and fair reporting. Setting to false, you get a vanilla LLM with the news pre added to the system prompt. No other prompting. - **inline_citations**: Decides how you want the bot to cite sources. It can use brackets, or it can also include the markdown with URL automatically. - **asknews_watermark**: Whether to include the AskNews watermark in the response. * Get chat completions from a news-infused AI assistant */ getChatCompletions(requestParameters: GetChatCompletionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateChatCompletionResponse1 | ReadableStream<any>>; /** * List the available DeepNews models with their type (rich/fast). * List available DeepNews models */ listDeepnewsModelsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListDeepNewsModelResponse>>; /** * List the available DeepNews models with their type (rich/fast). * List available DeepNews models */ listDeepnewsModels(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListDeepNewsModelResponse>; }