mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Generic generate methods (#3566)
* sendOpenAIRequest/getTextGenGenerationData methods are improved, now it can use custom API, instead of active ones * Added missing model param * Removed unnecessary variable * active_oai_settings -> settings * settings -> textgenerationwebui_settings * Better presetToSettings names, simpler settings name in getTextGenGenerationData, * Removed unused jailbreak_system * Reverted most core changes, new custom-request.js file * Forced stream to false, removed duplicate method, exported settingsToUpdate * Rewrite typedefs to define props one by one * Added extractData param for simplicity * Fixed typehints * Fixed typehints (again) --------- Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
This commit is contained in:
@ -77,6 +77,7 @@ import { accountStorage } from './util/AccountStorage.js';
|
||||
import { timestampToMoment, uuidv4 } from './utils.js';
|
||||
import { getGlobalVariable, getLocalVariable, setGlobalVariable, setLocalVariable } from './variables.js';
|
||||
import { convertCharacterBook, loadWorldInfo, saveWorldInfo, updateWorldInfoList } from './world-info.js';
|
||||
import { ChatCompletionService, TextCompletionService } from './custom-request.js';
|
||||
|
||||
export function getContext() {
|
||||
return {
|
||||
@ -207,6 +208,8 @@ export function getContext() {
|
||||
getChatCompletionModel,
|
||||
printMessages,
|
||||
clearChat,
|
||||
ChatCompletionService,
|
||||
TextCompletionService,
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user