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) {
5708/**5708/**
5709 * Extracts the message from the response data.5709 * Extracts the message from the response data.
5710 * @param {object} data Response data5710 * @param {object} data Response data
5711 * @param {string | null} activeApi if it's set, ignores active API5711 * @param {string} activeApi If it's set, ignores active API
5712 * @returns {string} Extracted message5712 * @returns {string} Extracted message
5713 */5713 */
5714export function extractMessageFromData(data, activeApi = null) {5714export function extractMessageFromData(data, activeApi = null) {
public/scripts/textgen-settings.js+7 -5
@@ -319,8 +319,9 @@ export function validateTextGenUrl() {
319}319}
320320
321/**321/**
322 * @param {string | null} type if it's set, ignores active API322 * Gets the API URL for the selected text generation type.
323 * @returns323 * @param {string} type If it's set, ignores active type
324 * @returns {string} API URL
324 */325 */
325export function getTextGenServer(type = null) {326export function getTextGenServer(type = null) {
326 const selectedType = type ?? settings.type;327 const selectedType = type ?? settings.type;
@@ -1221,11 +1222,12 @@ function isDynamicTemperatureSupported() {
1221}1222}
12221223
1223/**1224/**
1224 * @param {string | null} type if it's set, ignores active API1225 * 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
1226 */1228 */
1227export function getLogprobsNumber(type = null) {1229export function getLogprobsNumber(type = null) {
1228 const selectedType = type || settings.type;1230 const selectedType = type ?? settings.type;
1229 if (selectedType === VLLM || selectedType === INFERMATICAI) {1231 if (selectedType === VLLM || selectedType === INFERMATICAI) {
1230 return 5;1232 return 5;
1231 }1233 }