chat

Get chat completions from a news-infused AI assistant

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.
post/v1/openai/chat/completions

Request body

modelstring
temperaturenumber
top_pnumber
ninteger
streamboolean
max_tokensinteger
presence_penaltyinteger
frequency_penaltyinteger
thread_idstring nullable
userstring nullable
inline_citations'numbered' | 'markdown_link' | 'none'
append_referencesboolean
journalist_modeboolean
asknews_watermarkboolean
conversational_awarenessboolean
filter_paramsobject nullable

Response

Chat completions for a given user message

idstring required
createdinteger required
objectstring
modelstring

Changes

No recorded changes to this endpoint across all 1 revision of this API.