Add Instructions

Currently, AI Forms do not have a built-in way to set a context prompt, similar to configuring your chatbot's context. However, this doesn't mean you can't achieve this. You can accomplish it by using filters. Before the query is sent, we will inject a system prompt:

add_filter( 'mwai_ai_query', function ( $query ) {
  
  if ( $query instanceof Meow_MWAI_Query_Text ) {
    if ( $query->scope === 'form' ){
      $query->set_instructions( 'You are a prompt engineer.' );
    }
  }

  return $query;
} );
Did this answer your question?
😞
😐
🤩