Add generic text completion API type (100% OAI compatible)

This commit is contained in:
Cohee
2024-12-13 01:12:10 +02:00
parent e7b53dcb46
commit 3167019faf
11 changed files with 100 additions and 3 deletions

View File

@ -225,6 +225,7 @@ export const TEXTGEN_TYPES = {
OPENROUTER: 'openrouter',
FEATHERLESS: 'featherless',
HUGGINGFACE: 'huggingface',
GENERIC: 'generic',
};
export const INFERMATICAI_KEYS = [
@ -346,6 +347,24 @@ export const OLLAMA_KEYS = [
'min_p',
];
// https://platform.openai.com/docs/api-reference/completions
export const OPENAI_KEYS = [
'model',
'prompt',
'stream',
'temperature',
'top_p',
'frequency_penalty',
'presence_penalty',
'stop',
'seed',
'logit_bias',
'logprobs',
'max_tokens',
'n',
'best_of',
];
export const AVATAR_WIDTH = 512;
export const AVATAR_HEIGHT = 768;