Add support for DreamGen API.

API docs: https://dreamgen.com/docs/models/opus/v1
API keys: https://dreamgen.com/account/api-keys

I decided to base this on the text-completion API since it's more
flexible with SillyTavern's prompt formating capabilities.

This also means that custom context and instruct settings are required.

Will add documentation in a followup PR.
This commit is contained in:
DreamGenX
2024-03-07 10:55:08 +01:00
parent bb53fef531
commit 5c410986a4
14 changed files with 223 additions and 8 deletions

View File

@ -17,6 +17,7 @@ export const SECRET_KEYS = {
MISTRALAI: 'api_key_mistralai',
TOGETHERAI: 'api_key_togetherai',
INFERMATICAI: 'api_key_infermaticai',
DREAMGEN: 'api_key_dreamgen',
CUSTOM: 'api_key_custom',
OOBA: 'api_key_ooba',
};
@ -39,6 +40,7 @@ const INPUT_MAP = {
[SECRET_KEYS.TOGETHERAI]: '#api_key_togetherai',
[SECRET_KEYS.OOBA]: '#api_key_ooba',
[SECRET_KEYS.INFERMATICAI]: '#api_key_infermaticai',
[SECRET_KEYS.DREAMGEN]: '#api_key_dreamgen',
};
async function clearSecret() {