mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Support more parameters for Infermatic
This commit is contained in:
@ -224,6 +224,17 @@ const INFERMATICAI_KEYS = [
|
||||
'repetition_penalty',
|
||||
'stream',
|
||||
'stop',
|
||||
'presence_penalty',
|
||||
'frequency_penalty',
|
||||
'min_p',
|
||||
'seed',
|
||||
'ignore_eos',
|
||||
'n',
|
||||
'best_of',
|
||||
'min_tokens',
|
||||
'spaces_between_special_tokens',
|
||||
'skip_special_tokens',
|
||||
'logprobs',
|
||||
];
|
||||
|
||||
// https://dreamgen.com/docs/api#openai-text
|
||||
|
@ -340,7 +340,7 @@ router.post('/generate', jsonParser, async function (request, response) {
|
||||
|
||||
// Map InfermaticAI response to OAI completions format
|
||||
if (apiType === TEXTGEN_TYPES.INFERMATICAI) {
|
||||
data['choices'] = (data?.choices || []).map(choice => ({ text: choice?.message?.content || choice.text }));
|
||||
data['choices'] = (data?.choices || []).map(choice => ({ text: choice?.message?.content || choice.text, logprobs: choice?.logprobs, index: choice?.index }));
|
||||
}
|
||||
|
||||
return response.send(data);
|
||||
|
Reference in New Issue
Block a user