Improve JSdocs

5f024823a9ead385756c7454470c91b4d7b6649c

Cohee <18619528+Cohee1207@users.noreply.github.com>

2 files changed, +8 -6Showing whitespace changes
public/script.js+1 -1
@@ -5708,7 +5708,7 @@ function parseAndSaveLogprobs(data, continueFrom) {
57085708/**
57095709 * Extracts the message from the response data.
57105710 * @param {object} data Response data
57115711 * @param {string | null} activeApi ifIf it's set, ignores active API
57125712 * @returns {string} Extracted message
57135713 */
57145714export function extractMessageFromData(data, activeApi = null) {
public/scripts/textgen-settings.js+7 -5
@@ -319,8 +319,9 @@ export function validateTextGenUrl() {
319319}
320320
321321/**
322- * @param {string | null} type if it's set, ignores active API
322+ * Gets the API URL for the selected text generation type.
323- * @returns
323+ * @param {string} type If it's set, ignores active type
324+ * @returns {string} API URL
324325 */
325326export function getTextGenServer(type = null) {
326327 const selectedType = type ?? settings.type;
@@ -1221,11 +1222,12 @@ function isDynamicTemperatureSupported() {
12211222}
12221223
12231224/**
1224- * @param {string | null} type if it's set, ignores active API
1225+ * Gets the number of logprobs to request based on the selected type.
1225- * @returns {number}
1226+ * @param {string} type If it's set, ignores active type
1227+ * @returns {number} Number of logprobs to request
12261228 */
12271229export function getLogprobsNumber(type = null) {
12281230 const selectedType = type ||?? settings.type;
12291231 if (selectedType === VLLM || selectedType === INFERMATICAI) {
12301232 return 5;
12311233 }