Merge pull request #3186 from Succubyss/getcontext_gettexttokens

Expose `tokenizers` & `getTextTokens` in `getContext`
This commit is contained in:
Cohee 2024-12-14 14:14:00 +02:00 committed by GitHub
commit 103251070f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -63,7 +63,7 @@ import { ARGUMENT_TYPE, SlashCommandArgument, SlashCommandNamedArgument } from '
import { SlashCommandParser } from './slash-commands/SlashCommandParser.js';
import { tag_map, tags } from './tags.js';
import { textgenerationwebui_settings } from './textgen-settings.js';
import { getTokenCount, getTokenCountAsync, getTokenizerModel } from './tokenizers.js';
import { tokenizers, getTextTokens, getTokenCount, getTokenCountAsync, getTokenizerModel } from './tokenizers.js';
import { ToolManager } from './tool-calling.js';
import { timestampToMoment } from './utils.js';
@ -95,6 +95,8 @@ export function getContext() {
sendStreamingRequest,
sendGenerationRequest,
stopGeneration,
tokenizers,
getTextTokens,
/** @deprecated Use getTokenCountAsync instead */
getTokenCount,
getTokenCountAsync,