Title: Custom Context?
Last modified: January 4, 2023

---

# Custom Context?

 *  Resolved [troyeccles](https://wordpress.org/support/users/troyeccles/)
 * (@troyeccles)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/custom-context/)
 * This looks amazing. Thank you!
   Could I ask…one of your settings is to chat in
   context about WORDPRESS.Is it possible to modify a shortcode so that it always
   defaults to a given context such as, say, PHOTOSHOP. So rather than having to
   tell the chatbot that the context is Photoshop, it already knows?

Viewing 15 replies - 1 through 15 (of 19 total)

1 [2](https://wordpress.org/support/topic/custom-context/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/custom-context/page/2/?output_format=md)

 *  Plugin Author [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * (@tigroumeow)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/custom-context/#post-16340333)
 * Hi [@troyeccles](https://wordpress.org/support/users/troyeccles/),
 * So you would like to simply use [mwai_chat context], and set the default parameters
   somewhere else, in the admin side? I would like to propose a WordPress filter
   for this, so basically, you would need to add a little code snippet in the admin(
   it’s simple), in which you’ll set all your defaults (and you can make variations
   depending on who is connected, the time of the day, or anything else). I can 
   release a new version with that allows that, and share the code snippet. Would
   that work for you?
 * Thank you for liking this plugin. Don’t hesitate to leave a little review, that
   will help me, as well as the future of this plugin 🙂
 *  Thread Starter [troyeccles](https://wordpress.org/support/users/troyeccles/)
 * (@troyeccles)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/custom-context/#post-16340517)
 * That sounds like exactly what I’m after.
   So, for example, if I have a user that
   needs the chatbot to make blogs about PHOTOSHOP, I’d just have to tick a box 
   or code on the admin side to make the default context about PHOTOSHOP…or football…
   or whatever!And the concept about it depending on who is logged in is GENIUS!
   Thank you. I cannot wait!!!!Troy.
 *  Plugin Author [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * (@tigroumeow)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/custom-context/#post-16340646)
 * Hi [@troyeccles](https://wordpress.org/support/users/troyeccles/),
 * First, thanks a lot for your review! And I have implemented what you wanted already
   🙂
 * Make sure you have the latest version 0.1.1.
 * Then, you can add some code in your WordPress like this one:
 *     ```wp-block-code
       add_filter( 'mwai_chat_atts', 'ai_engine_override_chat_atts', 10, 1 );
   
       function ai_engine_override_chat_atts( $atts ) {
         //$atts['id'] = 'mwai-chat-01';
         $atts['context'] = "Converse as if you were Meowy, a futuristic cat who promotes good manners and eco-friendly behavior to save the earth. This cat is anti-war, advocates for kindness, and extremely positive.";
         $atts['ai_prompt'] = "Meowy: ";
         //$atts['user_prompt'] = "You: ";
         //$atts['sys_prompt'] = "System: ";
         $year = date('Y');
         $atts['start_sentence'] = "Hello, dear human from " . $year . "!";
         //$atts['model'] = 'text-davinci-003';
         //$atts['temperature'] = 0.8;
         return $atts;
       }
       ```
   
 * You can add this code through the Code Snippets plugin for example 🙂 That should
   work right away!
 *  Plugin Author [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * (@tigroumeow)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/custom-context/#post-16340655)
 * I realized that the code is not displayed very nicely in the WordPress Forums,
   so you can have a look here too if you want to see it better: [https://meowapps.com/ai-engine/](https://meowapps.com/ai-engine/).
 *  Thread Starter [troyeccles](https://wordpress.org/support/users/troyeccles/)
 * (@troyeccles)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/custom-context/#post-16340903)
 * Tgis klooks exactly what I was after. Thank you so much!
 * Which WP file does it need to be added to?
 *  Plugin Author [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * (@tigroumeow)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/custom-context/#post-16341308)
 * You don’t need to modify any file, you can simply add the code with Code Snippet.
   I have a little tutorial about it here: [https://meowapps.com/add-custom-php-code-wordpress/](https://meowapps.com/add-custom-php-code-wordpress/)
 *  Thread Starter [troyeccles](https://wordpress.org/support/users/troyeccles/)
 * (@troyeccles)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/custom-context/#post-16343727)
 * Thank you so much again. I’ve not tested any of this yet…too busy with the last
   job but hopefully I’ll get to this in the next 48hrs.
   So adding a shortcode to
   a page to insert the chatbox using the new code would be…?? [mwai_chat_atts context]
   Also to add another query:If I have a few departments that my client needs AI
   Chat to cater to:PhotoshopIllustratorPremiere ProAdmin/MarketingA new one coming
   soon apparently(?)Is it possible to be able to add multiple API’s so each dept
   could have their own email login to the CHATGPT application so they can pay for
   and track their own usage?Thank you so very much again…this is amazing!
 *  Plugin Author [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * (@tigroumeow)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/custom-context/#post-16344080)
 * Hi,
 * You could override the defaults you set by using this for example:
 * [mwai_chat context=”Act as a Photoshop expert.” ]
 * _Is it possible to be able to add multiple API’s so each dept could have their
   own email login to the CHATGPT application so they can pay for and track their
   own usage?_
 * Not yet, but I can definitely add the API token in the shortcode if that helps.
   But you would need to find a way have them enter this API key. Doable, but a 
   bit more hacky, depending on what you really want exactly. Also, I am not sure
   users will want to get their own OpenAI key to access support 🙂
 *  Thread Starter [troyeccles](https://wordpress.org/support/users/troyeccles/)
 * (@troyeccles)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/custom-context/#post-16344109)
 * [mwai_chat context=”Act as a Photoshop expert.” ]
 * OK, I think I’m with you. Is there a character limit in the shortcode to describe
   the context?
 * As for the API in the shortcode…YES! That works for me!?
 *  Plugin Author [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * (@tigroumeow)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/custom-context/#post-16344209)
 * _OK, I think I’m with you. Is there a character limit in the shortcode to describe
   the context?_
 * Yes, but it’s extremely long, so don’t worry about it 🙂 (for the real answers,
   you should check the OpenAI documentation, as it depends on the model as well)
 * And okay for the apiKey, I have added it in the code, and in the next release
   you’ll be able to use it!
 *  Thread Starter [troyeccles](https://wordpress.org/support/users/troyeccles/)
 * (@troyeccles)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/custom-context/#post-16344373)
 * I can’t wait! Thank you SO MUCH.
 * You. Are. Awesome.
 *  Plugin Author [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * (@tigroumeow)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/custom-context/#post-16347068)
 * And done! ✌️
 *  Thread Starter [troyeccles](https://wordpress.org/support/users/troyeccles/)
 * (@troyeccles)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/custom-context/#post-16347131)
 * I’ll have a look over the weekend. Thank you!!!!!
 *  [vladowsky](https://wordpress.org/support/users/vladowsky/)
 * (@vladowsky)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/custom-context/#post-16349070)
 * There are some issues with quotation marks…when I change the chat shortcode they
   are shown at the start of lines… and for some reason, it does not show all the
   first response… and the default context of the assistant is messing with the 
   astrologer prompt…and apparently, chat cannot be inserted into theme files directly
 * [https://astrotarot.net/chat-with-astrotarot-ai-astrologer/](https://astrotarot.net/chat-with-astrotarot-ai-astrologer/)
    -  This reply was modified 3 years, 4 months ago by [vladowsky](https://wordpress.org/support/users/vladowsky/).
    -  This reply was modified 3 years, 4 months ago by [vladowsky](https://wordpress.org/support/users/vladowsky/).
 *  Plugin Author [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * (@tigroumeow)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/custom-context/#post-16349588)
 * Hi [@vladowsky](https://wordpress.org/support/users/vladowsky/),
 * Please open a new support thread; it’s not related to the current topic of this
   thread.
 * Also, in this new thread, please mention exactly what is the shortcode you are
   using (with all the parameters). So that we can replicate the issue 🙂 And we’ll
   find a solution.

Viewing 15 replies - 1 through 15 (of 19 total)

1 [2](https://wordpress.org/support/topic/custom-context/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/custom-context/page/2/?output_format=md)

The topic ‘Custom Context?’ is closed to new replies.

 * ![](https://ps.w.org/ai-engine/assets/icon-256x256.png?rev=3431928)
 * [AI Engine - The Chatbot, AI Framework & MCP for WordPress](https://wordpress.org/plugins/ai-engine/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ai-engine/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ai-engine/)
 * [Active Topics](https://wordpress.org/support/plugin/ai-engine/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ai-engine/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ai-engine/reviews/)

 * 19 replies
 * 3 participants
 * Last reply from: [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * Last activity: [3 years, 4 months ago](https://wordpress.org/support/topic/custom-context/page/2/#post-16380410)
 * Status: resolved