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.
|
||||
* @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) {
|
||||
|
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user