Skip to content

Commit

Permalink
Remove admin notice used for testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixarntz committed Aug 27, 2024
1 parent e2a3cf9 commit 034ffff
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions includes/Chatbot/Chatbot.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,24 +96,6 @@ public function add_hooks(): void {
} else {
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_assets' ) );
}

// Testing.
add_action(
'admin_notices',
function () {
echo '<div class="notice notice-info"><p>';
$model = $this->ai->get_model();
try {
$candidates = $model->generate_content( 'Where can I add new pages?' );
$text = $this->ai->get_text_from_candidates( $candidates );
var_dump( $text ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions
} catch ( \Exception $e ) {
echo 'An error occurred: ';
echo esc_html( $e->getMessage() );
}
echo '</p></div>';
}
);
}

/**
Expand Down

0 comments on commit 034ffff

Please sign in to comment.