$vars Variables available in template scope. * @return string Rendered prompt text or empty string. */ public static function render( string $template_name, array $vars = array() ): string { $template_name = trim( $template_name ); if ( '' === $template_name || ! defined( 'OBENWEB_OPENWEBUI_PROVIDER_PLUGIN_DIR' ) ) { return ''; } $template_path = OBENWEB_OPENWEBUI_PROVIDER_PLUGIN_DIR . 'includes/Prompts/' . $template_name . '.php'; if ( ! file_exists( $template_path ) || ! is_readable( $template_path ) ) { return ''; } $prompt_vars = $vars; $result = include $template_path; return is_string( $result ) ? trim( $result ) : ''; } }