mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Add generic text completion API type (100% OAI compatible)
This commit is contained in:
@@ -33,9 +33,11 @@ export const textgen_types = {
|
||||
OPENROUTER: 'openrouter',
|
||||
FEATHERLESS: 'featherless',
|
||||
HUGGINGFACE: 'huggingface',
|
||||
GENERIC: 'generic',
|
||||
};
|
||||
|
||||
const {
|
||||
GENERIC,
|
||||
MANCER,
|
||||
VLLM,
|
||||
APHRODITE,
|
||||
@@ -120,6 +122,7 @@ export const SERVER_INPUTS = {
|
||||
[textgen_types.LLAMACPP]: '#llamacpp_api_url_text',
|
||||
[textgen_types.OLLAMA]: '#ollama_api_url_text',
|
||||
[textgen_types.HUGGINGFACE]: '#huggingface_api_url_text',
|
||||
[textgen_types.GENERIC]: '#generic_api_url_text',
|
||||
};
|
||||
|
||||
const KOBOLDCPP_ORDER = [6, 0, 1, 3, 4, 2, 5];
|
||||
@@ -205,6 +208,7 @@ const settings = {
|
||||
xtc_probability: 0,
|
||||
nsigma: 0.0,
|
||||
featherless_model: '',
|
||||
generic_model: '',
|
||||
};
|
||||
|
||||
export {
|
||||
@@ -282,6 +286,7 @@ export const setting_names = [
|
||||
'xtc_threshold',
|
||||
'xtc_probability',
|
||||
'nsigma',
|
||||
'generic_model',
|
||||
];
|
||||
|
||||
const DYNATEMP_BLOCK = document.getElementById('dynatemp_block_ooba');
|
||||
@@ -1100,6 +1105,11 @@ export function getTextGenModel() {
|
||||
return settings.custom_model;
|
||||
}
|
||||
break;
|
||||
case GENERIC:
|
||||
if (settings.generic_model) {
|
||||
return settings.generic_model;
|
||||
}
|
||||
break;
|
||||
case MANCER:
|
||||
return settings.mancer_model;
|
||||
case TOGETHERAI:
|
||||
|
Reference in New Issue
Block a user