Improve JSdocs

This commit is contained in:
Cohee
2025-02-25 10:20:59 +00:00
parent 092ef26144
commit 5f024823a9
2 changed files with 8 additions and 6 deletions

View File

@ -5708,7 +5708,7 @@ function parseAndSaveLogprobs(data, continueFrom) {
/**
* Extracts the message from the response data.
* @param {object} data Response data
* @param {string | null} activeApi if it's set, ignores active API
* @param {string} activeApi If it's set, ignores active API
* @returns {string} Extracted message
*/
export function extractMessageFromData(data, activeApi = null) {

View File

@ -319,8 +319,9 @@ export function validateTextGenUrl() {
}
/**
* @param {string | null} type if it's set, ignores active API
* @returns
* Gets the API URL for the selected text generation type.
* @param {string} type If it's set, ignores active type
* @returns {string} API URL
*/
export function getTextGenServer(type = null) {
const selectedType = type ?? settings.type;
@ -1221,11 +1222,12 @@ function isDynamicTemperatureSupported() {
}
/**
* @param {string | null} type if it's set, ignores active API
* @returns {number}
* Gets the number of logprobs to request based on the selected type.
* @param {string} type If it's set, ignores active type
* @returns {number} Number of logprobs to request
*/
export function getLogprobsNumber(type = null) {
const selectedType = type || settings.type;
const selectedType = type ?? settings.type;
if (selectedType === VLLM || selectedType === INFERMATICAI) {
return 5;
}