Skip to content

Extension:AskAI adds [[Special:AI]], which allows user to make AI queries about content of articles in this wiki.

License

Notifications You must be signed in to change notification settings

bahaipedia/mediawiki-AskAI

 
 

Repository files navigation

Extension:AskAI

This extension adds [[Special:AI]], which allows user to make AI queries about content of articles in this wiki.

It also adds "Add to AI chat" link to search results on [[Special:Search]].

Example configuration

// To use ChatGPT API, add the API key to LocalSettings.php:
$wgAskAIServiceOptionsOpenAI['apiKey'] = 'some-api-key-to-ChatGPT';

// Can choose a model. Default is "gpt-3.5-turbo".
$wgAskAIServiceOptionsOpenAI['model'] = 'chatgpt-4o-latest';

Debug configuration

// This setting won't use the real AI service,
// instead it will respond with "what did we ask from AI" information.
$wgAskAIServiceClass = 'MediaWiki\\AskAI\\Service\\DebugService';

Specifying instructions for AI

Page [[MediaWiki:Askai-default-instructions]] contains instructions for the AI, which can be modified.

AI will receive the text of these instructions, then the text of all relevant paragraphs in articles that were selected by user, and only then the user's question.

About

Extension:AskAI adds [[Special:AI]], which allows user to make AI queries about content of articles in this wiki.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 58.3%
  • PHP 39.9%
  • CSS 1.8%