Title: Using variables
Last modified: March 23, 2023

---

# Using variables

 *  Resolved [amadden46](https://wordpress.org/support/users/amadden46/)
 * (@amadden46)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/using-variables-3/)
 * Sorry, it’s me again.
 * Is there a way to use variables in our completions? For example, given the prompt“
   What is the value of x” the chatbot shall return “The value of x is $VALUE”
 * So that if the value of the variable $VALUE changes, it is reflected in all the
   completions which reference this variable.
 * Sorry if this is a super basic/stupid question.
 * Once again I really appreciate your help.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * (@tigroumeow)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/using-variables-3/#post-16592368)
 * Hi [@amadden46](https://wordpress.org/support/users/amadden46/),
 * Yes, sure! You can do that, for example:
 *     ```wp-block-code
       add_filter( 'mwai_ai_reply', function ( $reply, $query ) {
         $reply->replace( '{EMAIL}', "neko@shrine.com" );
         return $reply;
       }, 10, 2 );
       ```
   
 *  Thread Starter [amadden46](https://wordpress.org/support/users/amadden46/)
 * (@amadden46)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/using-variables-3/#post-16604399)
 * Thanks for the reply, where do I actually put this code? Is it in the context
   box on the chatbot? is it directly in the AI Engine plugin files? I am using 
   this plugin on WordPress. Please assist
 *  Plugin Author [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * (@tigroumeow)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/using-variables-3/#post-16608336)
 * Please follow this little tutorial I made: [https://meowapps.com/add-custom-php-code-wordpress/](https://meowapps.com/add-custom-php-code-wordpress/)

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Using variables’ 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/)

 * 3 replies
 * 2 participants
 * Last reply from: [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * Last activity: [3 years, 2 months ago](https://wordpress.org/support/topic/using-variables-3/#post-16608336)
 * Status: resolved