@@ -56,7 +56,7 @@ class TinyAiInstance extends EventEmitter {
5656 * Initializes internal variables, sets up initial configurations for handling AI models,
5757 * session history, and content generation, with the option to use a single or multiple instances.
5858 *
59- * @param {boolean } isSingle - If true, configures the instance to handle a single session only.
59+ * @param {boolean } [ isSingle] - If true, configures the instance to handle a single session only.
6060 */
6161 constructor ( isSingle = false ) {
6262 super ( ) ;
@@ -719,8 +719,8 @@ class TinyAiInstance extends EventEmitter {
719719 * If the function to count tokens is not set, an error is thrown.
720720 *
721721 * @param {Record<string, any> } data - The data that needs to be tokenized.
722- * @param {string } model - The model to use for counting tokens. If not provided, the default model is used.
723- * @param {AbortController } controller - The controller that manages the process or settings for counting tokens.
722+ * @param {string } [ model] - The model to use for counting tokens. If not provided, the default model is used.
723+ * @param {AbortController } [ controller] - The controller that manages the process or settings for counting tokens.
724724 * @throws {Error } Throws an error if no token counting function is defined.
725725 * @returns {Record<string, any> } The count of tokens.
726726 */
@@ -776,8 +776,8 @@ class TinyAiInstance extends EventEmitter {
776776 * Generates content for the AI session.
777777 *
778778 * @param {Record<string, any> } data - The data for content generation.
779- * @param {string } model - The model to be used for content generation. If not provided, the default model is used.
780- * @param {AbortController } controller - The controller managing the content generation process.
779+ * @param {string } [ model] - The model to be used for content generation. If not provided, the default model is used.
780+ * @param {AbortController } [ controller] - The controller managing the content generation process.
781781 * @param {Function } [streamCallback] - The callback function for streaming content (optional).
782782 * @returns {Record<string, any> } The generated content returned by the API.
783783 * @throws {Error } If no content generator API script is defined.
@@ -1143,7 +1143,7 @@ class TinyAiInstance extends EventEmitter {
11431143 /**
11441144 * Sets a prompt for the selected session history.
11451145 *
1146- * @param {string } promptData - The prompt to be set for the session.
1146+ * @param {string } [ promptData] - The prompt to be set for the session.
11471147 * @param {number } [tokenAmount] - The number of tokens associated with the prompt (optional).
11481148 * @param {string } [id] - The session ID. If omitted, the currently selected session history ID will be used.
11491149 * @throws {Error } If the provided session ID is invalid or the prompt data is not a string.
@@ -1186,7 +1186,7 @@ class TinyAiInstance extends EventEmitter {
11861186 /**
11871187 * Sets the first dialogue for the selected session history.
11881188 *
1189- * @param {string } dialogue - The dialogue to set as the first dialogue.
1189+ * @param {string } [ dialogue] - The dialogue to set as the first dialogue.
11901190 * @param {number } [tokenAmount] - The number of tokens associated with the dialogue (optional).
11911191 * @param {string } [id] - The session ID. If omitted, the currently selected session history ID will be used.
11921192 * @throws {Error } Throws an error if the session ID is invalid or the dialogue is not a string.
@@ -1231,8 +1231,8 @@ class TinyAiInstance extends EventEmitter {
12311231 /**
12321232 * Sets file data for the selected session history.
12331233 *
1234- * @param {string } mime - The MIME type of the file (e.g., 'text/plain', 'application/pdf').
1235- * @param {string } data - The file content, either as a string or base64-encoded.
1234+ * @param {string } [ mime] - The MIME type of the file (e.g., 'text/plain', 'application/pdf').
1235+ * @param {string } [ data] - The file content, either as a string or base64-encoded.
12361236 * @param {boolean } [isBase64=false] - A flag indicating whether the `data` is already base64-encoded. Defaults to false.
12371237 * @param {number } [tokenAmount] - The token count associated with the file data (optional).
12381238 * @param {string } [id] - The session ID. If omitted, the currently selected session history ID will be used.
@@ -1304,7 +1304,7 @@ class TinyAiInstance extends EventEmitter {
13041304 /**
13051305 * Sets a system instruction for the selected session history.
13061306 *
1307- * @param {string } data - The system instruction to set.
1307+ * @param {string } [ data] - The system instruction to set.
13081308 * @param {number } [tokenAmount] - The token count associated with the system instruction (optional).
13091309 * @param {string } [id] - The session ID. If omitted, the currently selected session history ID will be used.
13101310 * @throws {Error } If the session history ID is invalid or the provided data is not a string.
0 commit comments