• Resolved troyeccles

    (@troyeccles)


    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)
  • Plugin Author Jordy Meow

    (@tigroumeow)

    Hi @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

    (@troyeccles)

    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

    (@tigroumeow)

    Hi @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:

    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

    (@tigroumeow)

    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/.

    Thread Starter troyeccles

    (@troyeccles)

    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

    (@tigroumeow)

    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/

    Thread Starter troyeccles

    (@troyeccles)

    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:
    Photoshop
    Illustrator
    Premiere Pro
    Admin/Marketing
    A 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

    (@tigroumeow)

    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

    (@troyeccles)

    [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

    (@tigroumeow)

    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

    (@troyeccles)

    I can’t wait! Thank you SO MUCH.

    You. Are. Awesome.

    Plugin Author Jordy Meow

    (@tigroumeow)

    And done! ??

    Thread Starter troyeccles

    (@troyeccles)

    I’ll have a look over the weekend. Thank you!!!!!

    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/

    • This reply was modified 1 year, 10 months ago by vladowsky.
    • This reply was modified 1 year, 10 months ago by vladowsky.
    Plugin Author Jordy Meow

    (@tigroumeow)

    Hi @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)
  • The topic ‘Custom Context?’ is closed to new replies.