mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Improve JSdocs
This commit is contained in:
@ -5708,7 +5708,7 @@ function parseAndSaveLogprobs(data, continueFrom) {
|
|||||||
/**
|
/**
|
||||||
* Extracts the message from the response data.
|
* Extracts the message from the response data.
|
||||||
* @param {object} data 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
|
* @returns {string} Extracted message
|
||||||
*/
|
*/
|
||||||
export function extractMessageFromData(data, activeApi = null) {
|
export function extractMessageFromData(data, activeApi = null) {
|
||||||
|
@ -319,8 +319,9 @@ export function validateTextGenUrl() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string | null} type if it's set, ignores active API
|
* Gets the API URL for the selected text generation type.
|
||||||
* @returns
|
* @param {string} type If it's set, ignores active type
|
||||||
|
* @returns {string} API URL
|
||||||
*/
|
*/
|
||||||
export function getTextGenServer(type = null) {
|
export function getTextGenServer(type = null) {
|
||||||
const selectedType = type ?? settings.type;
|
const selectedType = type ?? settings.type;
|
||||||
@ -1221,11 +1222,12 @@ function isDynamicTemperatureSupported() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string | null} type if it's set, ignores active API
|
* Gets the number of logprobs to request based on the selected type.
|
||||||
* @returns {number}
|
* @param {string} type If it's set, ignores active type
|
||||||
|
* @returns {number} Number of logprobs to request
|
||||||
*/
|
*/
|
||||||
export function getLogprobsNumber(type = null) {
|
export function getLogprobsNumber(type = null) {
|
||||||
const selectedType = type || settings.type;
|
const selectedType = type ?? settings.type;
|
||||||
if (selectedType === VLLM || selectedType === INFERMATICAI) {
|
if (selectedType === VLLM || selectedType === INFERMATICAI) {
|
||||||
return 5;
|
return 5;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user