SYMBOL INDEX (687 symbols across 55 files) FILE: download-model.py class ModelDownloader (line 32) | class ModelDownloader: method __init__ (line 33) | def __init__(self, max_retries=7): method get_session (line 39) | def get_session(self): method sanitize_model_and_branch_names (line 59) | def sanitize_model_and_branch_names(self, model, branch): method get_download_links_from_huggingface (line 80) | def get_download_links_from_huggingface(self, model, branch, text_only... method get_output_folder (line 187) | def get_output_folder(self, model, branch, is_lora, is_llamacpp=False,... method progress_bar_slots (line 207) | def progress_bar_slots(self): method initialize_progress_bar_slots (line 213) | def initialize_progress_bar_slots(self, num_threads): method get_progress_bar_position (line 216) | def get_progress_bar_position(self): method release_progress_bar_position (line 225) | def release_progress_bar_position(self, slot): method get_single_file (line 229) | def get_single_file(self, url, output_folder, start_from_scratch=False): method start_download_threads (line 326) | def start_download_threads(self, file_list, output_folder, start_from_... method download_model_files (line 339) | def download_model_files(self, model, branch, links, sha256, output_fo... method check_model_files (line 363) | def check_model_files(self, model, branch, links, sha256, output_folder): FILE: js/dark_theme.js function toggleDarkMode (line 1) | function toggleDarkMode() { FILE: js/global_scope_js.js function copyToClipboard (line 5) | function copyToClipboard(element) { function fallbackCopyToClipboard (line 29) | function fallbackCopyToClipboard(text) { function branchHere (line 50) | function branchHere(element) { function editHere (line 84) | function editHere(buttonElement) { function startEditing (line 108) | function startEditing(messageElement, messageBody, isUserMessage) { function createEditingInterface (line 142) | function createEditingInterface(text) { function setupEditingHandlers (line 167) | function setupEditingHandlers(textarea, messageElement, originalHTML, me... function submitMessageEdit (line 197) | function submitMessageEdit(index, newText, isUserMessage) { function navigateVersion (line 220) | function navigateVersion(element, direction) { function regenerateClick (line 260) | function regenerateClick() { function continueClick (line 264) | function continueClick() { function removeLastClick (line 268) | function removeLastClick() { function autoScrollToBottom (line 272) | function autoScrollToBottom() { function updateInstructPadding (line 284) | function updateInstructPadding() { function handleMorphdomUpdate (line 303) | function handleMorphdomUpdate(data) { function applyMorphdomUpdate (line 314) | function applyMorphdomUpdate(data) { FILE: js/katex/auto-render.js function r (line 13) | function r(e) { FILE: js/main.js function isModifiedKeyboardEvent (line 52) | function isModifiedKeyboardEvent() { function isFocusedOnEditableTextbox (line 60) | function isFocusedOnEditableTextbox() { function isElementVisibleOnScreen (line 215) | function isElementVisibleOnScreen(element) { function showMenu (line 323) | function showMenu() { function hideMenu (line 327) | function hideMenu() { function isMouseOverButtonOrMenu (line 358) | function isMouseOverButtonOrMenu() { function respondToChatInputVisibility (line 436) | function respondToChatInputVisibility(element, callback) { function handleChatInputVisibilityChange (line 450) | function handleChatInputVisibilityChange(isVisible) { function addBigPicture (line 464) | function addBigPicture() { function deleteBigPicture (line 480) | function deleteBigPicture() { function toggleBigPicture (line 487) | function toggleBigPicture() { function respondToRenameVisibility (line 513) | function respondToRenameVisibility(element, callback) { function handleVisibilityChange (line 528) | function handleVisibilityChange(isVisible) { function moveToChatTab (line 602) | function moveToChatTab() { function restoreOriginalPosition (line 630) | function restoreOriginalPosition() { function handleIndividualSidebarClose (line 735) | function handleIndividualSidebarClose(event) { function toggleSidebar (line 754) | function toggleSidebar(sidebar, toggle, forceClose = false) { function isMobile (line 787) | function isMobile() { function initializeSidebars (line 792) | function initializeSidebars() { function createMobileTopBar (line 905) | function createMobileTopBar() { function navigateLastAssistantMessage (line 924) | function navigateLastAssistantMessage(direction) { constant MAX_PLAIN_TEXT_LENGTH (line 976) | const MAX_PLAIN_TEXT_LENGTH = 2500; function setupPasteHandler (line 978) | function setupPasteHandler() { function addMiniDeletes (line 1026) | function addMiniDeletes() { function updateMargin (line 1112) | function updateMargin() { FILE: js/save_files.js function getCurrentTimestamp (line 2) | function getCurrentTimestamp() { function saveFile (line 10) | function saveFile(contents, filename) { function saveHistory (line 20) | function saveHistory(history, character, mode) { function saveSession (line 35) | function saveSession(session) { FILE: js/show_controls.js function toggle_controls (line 3) | function toggle_controls(value) { FILE: js/switch_tabs.js function scrollToTop (line 1) | function scrollToTop() { function findButtonsByText (line 5) | function findButtonsByText(buttonText) { function switch_to_chat (line 18) | function switch_to_chat() { function switch_to_notebook (line 23) | function switch_to_notebook() { function switch_to_generation_parameters (line 29) | function switch_to_generation_parameters() { function switch_to_character (line 35) | function switch_to_character() { function switch_to_image_ai_generate (line 40) | function switch_to_image_ai_generate() { FILE: js/update_big_picture.js function updateBigPicture (line 1) | function updateBigPicture() { FILE: modules/LoRA.py function add_lora_to_model (line 7) | def add_lora_to_model(lora_names): function get_lora_path (line 11) | def get_lora_path(lora_name): function add_lora_transformers (line 19) | def add_lora_transformers(lora_names): function merge_loras (line 74) | def merge_loras(): FILE: modules/callbacks.py class StopNowException (line 8) | class StopNowException(Exception): class Iteratorize (line 12) | class Iteratorize: method __init__ (line 21) | def __init__(self, func, args=None, kwargs=None, callback=None): method __iter__ (line 51) | def __iter__(self): method __next__ (line 54) | def __next__(self): method __del__ (line 61) | def __del__(self): method __enter__ (line 64) | def __enter__(self): method __exit__ (line 67) | def __exit__(self, exc_type, exc_val, exc_tb): FILE: modules/chat.py function strftime_now (line 50) | def strftime_now(format): function get_current_timestamp (line 54) | def get_current_timestamp(): function update_message_metadata (line 59) | def update_message_metadata(metadata_dict, role, index, **fields): function custom_tojson (line 85) | def custom_tojson(value, indent=None, ensure_ascii=True): function _raise_exception (line 93) | def _raise_exception(message): function get_compiled_template (line 102) | def get_compiled_template(template_str): function str_presenter (line 112) | def str_presenter(dumper, data): class _JsonDict (line 128) | class _JsonDict(dict): method __str__ (line 136) | def __str__(self): method __add__ (line 139) | def __add__(self, other): method __radd__ (line 142) | def __radd__(self, other): function _deserialize_tool_call_arguments (line 146) | def _deserialize_tool_call_arguments(tool_calls): function _expand_tool_sequence (line 172) | def _expand_tool_sequence(tool_seq): function generate_chat_prompt (line 215) | def generate_chat_prompt(user_input, state, **kwargs): function count_prompt_tokens (line 583) | def count_prompt_tokens(text_input, state): function get_stopping_strings (line 627) | def get_stopping_strings(state): function add_message_version (line 700) | def add_message_version(history, role, row_idx, is_current=True): function add_message_attachment (line 726) | def add_message_attachment(history, row_idx, file_path, is_user=True): function extract_pdf_text (line 806) | def extract_pdf_text(pdf_path): function extract_docx_text (line 822) | def extract_docx_text(docx_path): function generate_search_query (line 869) | def generate_search_query(user_message, state): function chatbot_wrapper (line 906) | def chatbot_wrapper(text, state, regenerate=False, _continue=False, load... function impersonate_wrapper (line 1147) | def impersonate_wrapper(textbox, state): function generate_chat_reply (line 1164) | def generate_chat_reply(text, state, regenerate=False, _continue=False, ... function character_is_loaded (line 1176) | def character_is_loaded(state, raise_exception=False): function generate_chat_reply_wrapper (line 1187) | def generate_chat_reply_wrapper(text, state, regenerate=False, _continue... function remove_last_message (line 1463) | def remove_last_message(history): function send_dummy_message (line 1483) | def send_dummy_message(text, state): function send_dummy_reply (line 1502) | def send_dummy_reply(text, state): function redraw_html (line 1527) | def redraw_html(history, name1, name2, mode, style, character, reset_cac... function start_new_chat (line 1531) | def start_new_chat(state, unique_id=None): function get_history_file_path (line 1553) | def get_history_file_path(unique_id, character, mode): function save_history (line 1562) | def save_history(history, unique_id, character, mode): function rename_history (line 1578) | def rename_history(old_id, new_id, character, mode): function get_paths (line 1595) | def get_paths(state): function find_all_histories (line 1618) | def find_all_histories(state): function find_all_histories_with_first_prompts (line 1627) | def find_all_histories_with_first_prompts(state): function load_latest_history (line 1671) | def load_latest_history(state): function load_history_after_deletion (line 1701) | def load_history_after_deletion(state, idx): function update_character_menu_after_deletion (line 1724) | def update_character_menu_after_deletion(idx): function get_chat_state_key (line 1732) | def get_chat_state_key(character, mode): function load_last_chat_state (line 1740) | def load_last_chat_state(): function save_last_chat_state (line 1753) | def save_last_chat_state(character, mode, unique_id): function load_history (line 1771) | def load_history(unique_id, character, mode): function load_history_json (line 1799) | def load_history_json(file, history): function delete_history (line 1826) | def delete_history(unique_id, character, mode): function replace_character_names (line 1831) | def replace_character_names(text, name1, name2): function generate_pfp_cache (line 1836) | def generate_pfp_cache(character): function load_character (line 1859) | def load_character(character, name1, name2): function restore_character_for_ui (line 1906) | def restore_character_for_ui(state): function clear_character_for_ui (line 1926) | def clear_character_for_ui(state): function load_character_memoized (line 1944) | def load_character_memoized(character, name1, name2): function load_instruction_template_memoized (line 1949) | def load_instruction_template_memoized(template): function upload_character (line 1954) | def upload_character(file, img_path, tavern=False): function build_pygmalion_style_context (line 1988) | def build_pygmalion_style_context(data): function upload_tavern_character (line 2003) | def upload_tavern_character(img_path, _json): function check_tavern_character (line 2008) | def check_tavern_character(img_path): function upload_your_profile_picture (line 2026) | def upload_your_profile_picture(img_path): function generate_character_yaml (line 2041) | def generate_character_yaml(name, greeting, context): function generate_instruction_template_yaml (line 2052) | def generate_instruction_template_yaml(instruction_template): function save_character (line 2060) | def save_character(name, greeting, context, picture, filename): function delete_character (line 2076) | def delete_character(name, instruct=False): function generate_user_pfp_cache (line 2087) | def generate_user_pfp_cache(user): function load_user (line 2109) | def load_user(user_name, name1, user_bio): function generate_user_yaml (line 2149) | def generate_user_yaml(name, user_bio): function save_user (line 2159) | def save_user(name, user_bio, picture, filename): function delete_user (line 2181) | def delete_user(name): function update_user_menu_after_deletion (line 2193) | def update_user_menu_after_deletion(idx): function handle_user_menu_change (line 2207) | def handle_user_menu_change(state): function handle_save_user_click (line 2226) | def handle_save_user_click(name1): function my_yaml_output (line 2235) | def my_yaml_output(data): function handle_send_dummy_message_click (line 2249) | def handle_send_dummy_message_click(text, state): function handle_send_dummy_reply_click (line 2257) | def handle_send_dummy_reply_click(text, state): function handle_remove_last_click (line 2265) | def handle_remove_last_click(state): function handle_unique_id_select (line 2273) | def handle_unique_id_select(state): function handle_start_new_chat_click (line 2285) | def handle_start_new_chat_click(state): function handle_start_incognito_chat_click (line 2301) | def handle_start_incognito_chat_click(state): function handle_delete_chat_confirm_click (line 2315) | def handle_delete_chat_confirm_click(state): function handle_branch_chat_click (line 2334) | def handle_branch_chat_click(state): function handle_edit_message_click (line 2361) | def handle_edit_message_click(state): function handle_navigate_version_click (line 2408) | def handle_navigate_version_click(state): function handle_rename_chat_click (line 2460) | def handle_rename_chat_click(): function handle_rename_chat_confirm (line 2468) | def handle_rename_chat_confirm(rename_to, state): function handle_search_chat_change (line 2486) | def handle_search_chat_change(state): function handle_upload_chat_history (line 2492) | def handle_upload_chat_history(load_chat_history, state): function handle_character_menu_change (line 2515) | def handle_character_menu_change(state): function handle_character_picture_change (line 2548) | def handle_character_picture_change(picture_path): function handle_mode_change (line 2568) | def handle_mode_change(state): function handle_save_character_click (line 2595) | def handle_save_character_click(name2): function handle_load_template_click (line 2603) | def handle_load_template_click(instruction_template): function handle_save_template_click (line 2612) | def handle_save_template_click(instruction_template_str): function handle_delete_template_click (line 2625) | def handle_delete_template_click(template): function handle_your_picture_change (line 2636) | def handle_your_picture_change(picture, state): function handle_send_instruction_click (line 2643) | def handle_send_instruction_click(state): function handle_send_chat_click (line 2656) | def handle_send_chat_click(state): FILE: modules/evaluate.py function load_past_evaluations (line 14) | def load_past_evaluations(): function save_past_evaluations (line 26) | def save_past_evaluations(df): function calculate_perplexity (line 34) | def calculate_perplexity(models, input_dataset, stride, _max_length): function add_entry_to_past_evaluations (line 136) | def add_entry_to_past_evaluations(perplexity, model, dataset, stride, ma... function is_in_past_evaluations (line 151) | def is_in_past_evaluations(model, dataset, stride, max_length): function generate_markdown_table (line 163) | def generate_markdown_table(): FILE: modules/exllamav3.py class LogitBiasFilter (line 41) | class LogitBiasFilter(Filter): method __init__ (line 44) | def __init__(self, tokenizer, logit_bias_dict): method reset (line 49) | def reset(self): pass method accept_token (line 50) | def accept_token(self, token): pass method is_completed (line 51) | def is_completed(self): return False method use_background_worker (line 52) | def use_background_worker(self): return False method get_next_logit_mask (line 54) | def get_next_logit_mask(self): class ConcurrentGenerator (line 64) | class ConcurrentGenerator: method __init__ (line 65) | def __init__(self, generator): method _iterate_loop (line 74) | def _iterate_loop(self): method submit (line 101) | def submit(self, job) -> queue.Queue: method cancel (line 109) | def cancel(self, job): method stop (line 116) | def stop(self): class Exllamav3Model (line 122) | class Exllamav3Model: method __init__ (line 123) | def __init__(self): method device (line 127) | def device(self) -> torch.device: method from_pretrained (line 131) | def from_pretrained(cls, path_to_model): method is_multimodal (line 257) | def is_multimodal(self) -> bool: method _process_images_for_generation (line 261) | def _process_images_for_generation(self, prompt: str, state: dict) -> ... method generate_with_streaming (line 316) | def generate_with_streaming(self, prompt, state): method _capture_logprobs (line 477) | def _capture_logprobs(self, result): method generate (line 496) | def generate(self, prompt, state): method get_logits (line 503) | def get_logits(self, token_ids, **kwargs): method encode (line 540) | def encode(self, string, **kwargs): method decode (line 544) | def decode(self, ids, **kwargs): method last_prompt_token_count (line 551) | def last_prompt_token_count(self): method unload (line 554) | def unload(self): FILE: modules/exllamav3_hf.py class Exllamav3HF (line 28) | class Exllamav3HF(PreTrainedModel, GenerationMixin): method __init__ (line 29) | def __init__(self, model_dir): method _validate_model_class (line 94) | def _validate_model_class(self): method _validate_model_kwargs (line 97) | def _validate_model_kwargs(self, model_kwargs: Dict[str, Any]): method prepare_inputs_for_generation (line 100) | def prepare_inputs_for_generation(self, input_ids, **kwargs): method device (line 104) | def device(self) -> torch.device: method __call__ (line 107) | def __call__(self, *args, **kwargs): method from_pretrained (line 253) | def from_pretrained(cls, pretrained_model_name_or_path: Optional[Union... method unload (line 262) | def unload(self): FILE: modules/extensions.py function apply_settings (line 17) | def apply_settings(extension, name): function load_extensions (line 28) | def load_extensions(): function iterator (line 83) | def iterator(): function _apply_string_extensions (line 90) | def _apply_string_extensions(function_name, text, state, is_chat=False): function _apply_chat_input_extensions (line 121) | def _apply_chat_input_extensions(text, visible_text, state): function _apply_custom_generate_chat_prompt (line 130) | def _apply_custom_generate_chat_prompt(text, state, **kwargs): function _apply_state_modifier_extensions (line 139) | def _apply_state_modifier_extensions(state): function _apply_history_modifier_extensions (line 148) | def _apply_history_modifier_extensions(history): function _apply_tokenizer_extensions (line 157) | def _apply_tokenizer_extensions(function_name, state, prompt, input_ids,... function _apply_logits_processor_extensions (line 167) | def _apply_logits_processor_extensions(function_name, processor_list, in... function _apply_custom_tokenized_length (line 179) | def _apply_custom_tokenized_length(prompt): function _apply_custom_generate_reply (line 188) | def _apply_custom_generate_reply(): function _apply_custom_css (line 196) | def _apply_custom_css(): function _apply_custom_js (line 205) | def _apply_custom_js(): function create_extensions_block (line 214) | def create_extensions_block(): function create_extensions_tabs (line 229) | def create_extensions_tabs(): function apply_extensions (line 255) | def apply_extensions(typ, *args, **kwargs): FILE: modules/grammar/grammar_utils.py class ParseState (line 36) | class ParseState: method __init__ (line 37) | def __init__(self): function get_symbol_id (line 42) | def get_symbol_id(state, src): function generate_symbol_id (line 48) | def generate_symbol_id(state, base_name): function is_word_char (line 54) | def is_word_char(c): function hex_to_int (line 58) | def hex_to_int(c): function remove_leading_white_space (line 66) | def remove_leading_white_space(src, newline_ok): function parse_name (line 94) | def parse_name(src): function read_hex (line 103) | def read_hex(s): function parse_char (line 110) | def parse_char(src): function parse_sequence (line 142) | def parse_sequence(state, src, rule_name, outbuf, is_nested): function parse_alternates (line 249) | def parse_alternates(state, src, rule_name, rule_id, is_nested): function parse_rule (line 262) | def parse_rule(state, src): function parse_ebnf (line 282) | def parse_ebnf(src): function print_rule (line 300) | def print_rule(file, grammar_encoding, index, symbol_id_names): function print_grammar (line 333) | def print_grammar(file, state): class GrammarConstraint (line 353) | class GrammarConstraint(ABC): method __init__ (line 354) | def __init__(self, grammar_str, start_rule_name, tokenizer): method init_stacks (line 389) | def init_stacks(self): method advance_stack (line 404) | def advance_stack(self, stack): method accept_char (line 449) | def accept_char(self, *args, **kwargs): method accept_token_id (line 453) | def accept_token_id(self, *args, **kwargs): method filter_vocab (line 457) | def filter_vocab(self, *args, **kwargs): class IncrementalGrammarConstraint (line 461) | class IncrementalGrammarConstraint(GrammarConstraint): method __init__ (line 462) | def __init__(self, grammar_str, start_rule_name, tokenizer): method accept_char (line 465) | def accept_char(self, char, stacks): method accept_string (line 497) | def accept_string(self, string: str, stacks: List[List[int]]): method accept_token_id (line 502) | def accept_token_id(self, token_id: int, stacks: List[List[int]]): method accept_token_ids (line 520) | def accept_token_ids(self, token_ids: List[int], stacks: List[List[int... method batch_filter_vocab (line 529) | def batch_filter_vocab(self, batch_stacks, device): method filter_vocab (line 535) | def filter_vocab(self, stacks, device): method pos_char_acceptance (line 551) | def pos_char_acceptance(self, pos, char): method token_acceptance_for_stack (line 571) | def token_acceptance_for_stack(self, stack, device): class StaticGrammarConstraint (line 617) | class StaticGrammarConstraint(GrammarConstraint): method __init__ (line 618) | def __init__(self, grammar_str, start_rule_name, tokenizer): method accept_char (line 621) | def accept_char(self): class TokenTrie (line 633) | class TokenTrie: method __init__ (line 634) | def __init__(self, tokenizer): method id2str (line 640) | def id2str(self, token_id): method __len__ (line 643) | def __len__(self): method load_tokens (line 646) | def load_tokens(self, tokenizer): method insert_into_trie (line 689) | def insert_into_trie(self, trie, token_bytes, token_id): function initialize_grammar (line 699) | def initialize_grammar(grammar_string): FILE: modules/grammar/logits_process.py class GrammarConstrainedLogitsProcessor (line 31) | class GrammarConstrainedLogitsProcessor(LogitsProcessor): method __init__ (line 32) | def __init__(self, grammar_constraint): method filter_logits (line 37) | def filter_logits(self, logits, device): method process_logits (line 47) | def process_logits(self, input_ids, scores, parse_start_index=None): method __call__ (line 103) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... FILE: modules/html_generator.py function minify_css (line 21) | def minify_css(css: str) -> str: function fix_newlines (line 71) | def fix_newlines(string): function replace_quotes (line 78) | def replace_quotes(text): function replace_blockquote (line 108) | def replace_blockquote(m): function extract_thinking_block (line 112) | def extract_thinking_block(string): function build_tool_call_block (line 118) | def build_tool_call_block(header, body, message_id, index): function build_thinking_block (line 146) | def build_thinking_block(thinking_content, message_id, has_remaining_con... function build_main_content_block (line 172) | def build_main_content_block(content): function process_markdown_content (line 180) | def process_markdown_content(string): function convert_to_markdown (line 327) | def convert_to_markdown(string, message_id=None): function convert_to_markdown_wrapped (line 401) | def convert_to_markdown_wrapped(string, message_id=None, use_cache=True): function generate_basic_html (line 412) | def generate_basic_html(string): function make_thumbnail (line 419) | def make_thumbnail(image): function get_image_cache (line 427) | def get_image_cache(path): function format_message_timestamp (line 468) | def format_message_timestamp(history, role, index, tooltip_include_times... function format_message_attachments (line 480) | def format_message_attachments(history, role, index): function get_message_tooltip (line 518) | def get_message_tooltip(history, role, index, include_timestamp=True): function get_version_navigation_html (line 535) | def get_version_navigation_html(history, i, role): function actions_html (line 560) | def actions_html(history, i, role, info_message=""): function generate_instruct_html (line 590) | def generate_instruct_html(history, last_message_only=False): function get_character_image_with_cache_buster (line 648) | def get_character_image_with_cache_buster(): function generate_cai_chat_html (line 658) | def generate_cai_chat_html(history, name1, name2, style, character, rese... function time_greeting (line 722) | def time_greeting(): function chat_html_wrapper (line 732) | def chat_html_wrapper(history, name1, name2, mode, style, character, res... FILE: modules/image_models.py function get_quantization_config (line 8) | def get_quantization_config(quant_method): function get_pipeline_type (line 87) | def get_pipeline_type(pipe): function load_image_model (line 103) | def load_image_model(model_name, dtype='bfloat16', attn_backend='sdpa', ... function unload_image_model (line 187) | def unload_image_model(): FILE: modules/image_utils.py function open_image_safely (line 12) | def open_image_safely(path): function convert_pil_to_base64 (line 26) | def convert_pil_to_base64(image: Image.Image) -> str: function decode_base64_image (line 35) | def decode_base64_image(base64_string: str) -> Image.Image: function process_message_content (line 49) | def process_message_content(content: Any) -> Tuple[str, List[Image.Image]]: function convert_image_attachments_to_pil (line 107) | def convert_image_attachments_to_pil(image_attachments: List[dict]) -> L... function convert_openai_messages_to_images (line 122) | def convert_openai_messages_to_images(messages: List[dict]) -> List[Imag... FILE: modules/llama_cpp_server.py class LlamaServer (line 28) | class LlamaServer: method __init__ (line 29) | def __init__(self, model_path, server_path=None): method encode (line 46) | def encode(self, text, add_bos_token=False, **kwargs): method decode (line 60) | def decode(self, token_ids, **kwargs): method prepare_payload (line 70) | def prepare_payload(self, state): method _process_images_for_generation (line 154) | def _process_images_for_generation(self, state: dict) -> List[Any]: method is_multimodal (line 171) | def is_multimodal(self) -> bool: method generate_with_streaming (line 175) | def generate_with_streaming(self, prompt, state): method generate (line 272) | def generate(self, prompt, state): method get_logits (line 279) | def get_logits(self, prompt, state, n_probs=128, use_samplers=False): method _get_vocabulary_size (line 313) | def _get_vocabulary_size(self): method _get_bos_token (line 323) | def _get_bos_token(self): method _is_port_available (line 335) | def _is_port_available(self, port): method _find_available_port (line 344) | def _find_available_port(self): method _start_server (line 355) | def _start_server(self): method __enter__ (line 514) | def __enter__(self): method __exit__ (line 518) | def __exit__(self, exc_type, exc_val, exc_tb): method __del__ (line 522) | def __del__(self): method stop (line 526) | def stop(self): function filter_stderr_with_progress (line 539) | def filter_stderr_with_progress(process_stderr): FILE: modules/loaders.py function transformers_samplers (line 79) | def transformers_samplers(): function list_all_samplers (line 265) | def list_all_samplers(): function blacklist_samplers (line 274) | def blacklist_samplers(loader, dynamic_temperature): function get_all_params (line 292) | def get_all_params(): function list_model_elements (line 301) | def list_model_elements(): function make_loader_params_visible (line 351) | def make_loader_params_visible(loader): FILE: modules/logging_colors.py function setup_logging (line 6) | def setup_logging(): FILE: modules/logits.py function get_next_logits (line 15) | def get_next_logits(*args, **kwargs): function _get_next_logits (line 36) | def _get_next_logits(prompt, state, use_samplers, previous, top_logits=2... FILE: modules/metadata_gguf.py class GGUFValueType (line 5) | class GGUFValueType(IntEnum): function get_single (line 50) | def get_single(value_type, file): function load_metadata (line 66) | def load_metadata(fname): FILE: modules/models.py function load_model (line 12) | def load_model(model_name, loader=None): function llama_cpp_server_loader (line 74) | def llama_cpp_server_loader(model_name): function transformers_loader (line 97) | def transformers_loader(model_name): function ExLlamav3_HF_loader (line 102) | def ExLlamav3_HF_loader(model_name): function ExLlamav3_loader (line 108) | def ExLlamav3_loader(model_name): function TensorRT_LLM_loader (line 115) | def TensorRT_LLM_loader(model_name): function unload_model (line 125) | def unload_model(keep_model_name=False): function reload_model (line 149) | def reload_model(): function unload_model_if_idle (line 154) | def unload_model_if_idle(): FILE: modules/models_settings.py function get_fallback_settings (line 14) | def get_fallback_settings(): function get_model_metadata (line 24) | def get_model_metadata(model): function infer_loader (line 184) | def infer_loader(model_name, model_settings, hf_quant_method=None): function update_model_parameters (line 204) | def update_model_parameters(state, initial=False): function apply_model_settings_to_state (line 224) | def apply_model_settings_to_state(model, state): function save_model_settings (line 258) | def save_model_settings(model, state): function save_instruction_template (line 285) | def save_instruction_template(model, template): function load_gguf_metadata_with_cache (line 317) | def load_gguf_metadata_with_cache(model_file): function get_model_size_mb (line 321) | def get_model_size_mb(model_file: Path) -> float: function estimate_vram (line 339) | def estimate_vram(gguf_file, gpu_layers, ctx_size, cache_type): function update_gpu_layers_and_vram (line 390) | def update_gpu_layers_and_vram(loader, model, gpu_layers, ctx_size, cach... function load_instruction_template (line 402) | def load_instruction_template(template): function _jinja_template_from_old_format (line 421) | def _jinja_template_from_old_format(params, verbose=False): FILE: modules/paths.py function resolve_user_data_dir (line 5) | def resolve_user_data_dir(): FILE: modules/presets.py function default_preset (line 54) | def default_preset(): function presets_params (line 65) | def presets_params(): function load_preset (line 69) | def load_preset(name, verbose=False): function load_preset_memoized (line 90) | def load_preset_memoized(name): function load_preset_for_ui (line 94) | def load_preset_for_ui(name, state): function reset_preset_for_ui (line 100) | def reset_preset_for_ui(name, state): function neutralize_samplers_for_ui (line 107) | def neutralize_samplers_for_ui(state): function loader_contains (line 114) | def loader_contains(sampler): function remove_defaults (line 121) | def remove_defaults(state): function generate_preset_yaml (line 132) | def generate_preset_yaml(state): FILE: modules/prompts.py function load_prompt (line 7) | def load_prompt(fname): function count_tokens (line 32) | def count_tokens(text): FILE: modules/reasoning.py function extract_reasoning (line 16) | def extract_reasoning(text, html_escaped=False): FILE: modules/sampler_hijack.py class TemperatureLogitsWarperCustom (line 24) | class TemperatureLogitsWarperCustom(LogitsProcessor): method __init__ (line 29) | def __init__(self, temperature: float): method __call__ (line 42) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class DynamicTemperatureLogitsWarper (line 47) | class DynamicTemperatureLogitsWarper(LogitsProcessor): method __init__ (line 52) | def __init__(self, dynatemp_low: float, dynatemp_high: float, dynatemp... method __call__ (line 57) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class QuadraticSamplingLogitsWarper (line 105) | class QuadraticSamplingLogitsWarper(LogitsProcessor): method __init__ (line 110) | def __init__(self, smoothing_factor, smoothing_curve): method __call__ (line 114) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class TailFreeLogitsWarper (line 132) | class TailFreeLogitsWarper(LogitsProcessor): method __init__ (line 133) | def __init__(self, tfs: float, filter_value: float = -float("Inf"), mi... method __call__ (line 141) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class TopALogitsWarper (line 172) | class TopALogitsWarper(LogitsProcessor): method __init__ (line 173) | def __init__(self, top_a: float, filter_value: float = -float("Inf"), ... method __call__ (line 181) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class TopNSigmaLogitsWarper (line 198) | class TopNSigmaLogitsWarper(LogitsProcessor): method __init__ (line 199) | def __init__(self, n_sigma: float = 2.0, filter_value: float = -float(... method __call__ (line 214) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class AdaptivePLogitsWarper (line 238) | class AdaptivePLogitsWarper(LogitsProcessor): method __init__ (line 251) | def __init__(self, adaptive_target, adaptive_decay, filter_value=-floa... method __call__ (line 265) | def __call__(self, input_ids, scores): class XTCLogitsWarper (line 306) | class XTCLogitsWarper(LogitsProcessor): method __init__ (line 307) | def __init__(self, threshold: float, probability: float, filter_value:... method __call__ (line 318) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class DRYLogitsProcessor (line 352) | class DRYLogitsProcessor(LogitsProcessor): method __init__ (line 353) | def __init__(self, multiplier: float, base: float, allowed_length: int... method __call__ (line 360) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class MirostatLogitsWarper (line 424) | class MirostatLogitsWarper(LogitsProcessor): method __init__ (line 425) | def __init__(self, mirostat_mode: int, mirostat_tau: float, mirostat_e... method __call__ (line 437) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class SpyLogitsWarper (line 473) | class SpyLogitsWarper(LogitsProcessor): method __init__ (line 474) | def __init__(self): method __call__ (line 477) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class RepetitionPenaltyLogitsProcessorWithRange (line 483) | class RepetitionPenaltyLogitsProcessorWithRange(LogitsProcessor): method __init__ (line 484) | def __init__(self, penalty: float, _range: int): method apply_repetition_penalty (line 490) | def apply_repetition_penalty(self, input_ids_row, scores_row): method __call__ (line 499) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class PresencePenaltyLogitsProcessor (line 507) | class PresencePenaltyLogitsProcessor(LogitsProcessor): method __init__ (line 508) | def __init__(self, presence_penalty: float, _range: int): method apply_presence_penalty (line 512) | def apply_presence_penalty(self, input_ids_row, scores_row): method __call__ (line 521) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class FrequencyPenaltyLogitsProcessor (line 528) | class FrequencyPenaltyLogitsProcessor(LogitsProcessor): method __init__ (line 529) | def __init__(self, frequency_penalty: float, _range: int): method apply_frequency_penalty (line 533) | def apply_frequency_penalty(self, input_ids_row, scores_row): method __call__ (line 542) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... function get_logits_processor_patch (line 549) | def get_logits_processor_patch(self, **kwargs): function generation_config_init_patch (line 756) | def generation_config_init_patch(self, **kwargs): function hijack_samplers (line 786) | def hijack_samplers(): FILE: modules/sane_markdown_lists.py class SaneListIndentProcessor (line 42) | class SaneListIndentProcessor(ListIndentProcessor): method __init__ (line 54) | def __init__(self, *args): method test (line 58) | def test(self, parent: etree.Element, block: str) -> bool: method get_level (line 64) | def get_level(self, parent: etree.Element, block: str) -> tuple[int, e... method detab (line 91) | def detab(self, text: str, length: int | None = None) -> tuple[str, str]: method looseDetab (line 106) | def looseDetab(self, text: str, level: int = 1) -> str: class SaneOListProcessor (line 115) | class SaneOListProcessor(OListProcessor): method __init__ (line 123) | def __init__(self, parser: blockparser.BlockParser): method run (line 134) | def run(self, parent: etree.Element, blocks: list[str]) -> None: method looseDetab (line 193) | def looseDetab(self, text: str, indent_length: int, level: int = 1) ->... method get_items (line 201) | def get_items(self, block: str) -> list[str]: class SaneUListProcessor (line 231) | class SaneUListProcessor(SaneOListProcessor): method __init__ (line 238) | def __init__(self, parser: blockparser.BlockParser): method get_items (line 245) | def get_items(self, block: str) -> list[str]: class SaneParagraphProcessor (line 269) | class SaneParagraphProcessor(ParagraphProcessor): method __init__ (line 272) | def __init__(self, parser: BlockParser): method run (line 277) | def run(self, parent: etree.Element, blocks: list[str]) -> None: class SaneListExtension (line 320) | class SaneListExtension(Extension): method extendMarkdown (line 323) | def extendMarkdown(self, md): function makeExtension (line 334) | def makeExtension(**kwargs): # pragma: no cover FILE: modules/shared.py function do_cmd_flags_warnings (line 374) | def do_cmd_flags_warnings(): function apply_image_model_cli_overrides (line 405) | def apply_image_model_cli_overrides(): function fix_loader_name (line 421) | def fix_loader_name(name): function add_extension (line 438) | def add_extension(name, last=False): function is_chat (line 448) | def is_chat(): function load_user_config (line 452) | def load_user_config(): FILE: modules/tensorrt_llm.py class TensorRTLLMModel (line 10) | class TensorRTLLMModel: method __init__ (line 11) | def __init__(self): method from_pretrained (line 15) | def from_pretrained(cls, path_to_model): method generate_with_streaming (line 28) | def generate_with_streaming(self, prompt, state): method generate (line 61) | def generate(self, prompt, state): method unload (line 68) | def unload(self): FILE: modules/text_generation.py function generate_reply (line 20) | def generate_reply(*args, **kwargs): function _generate_reply (line 44) | def _generate_reply(question, state, stopping_strings=None, is_chat=Fals... function encode (line 128) | def encode(prompt, add_special_tokens=True, add_bos_token=True, truncati... function decode (line 178) | def decode(output_ids, skip_special_tokens=True): function get_encoded_length (line 185) | def get_encoded_length(prompt): function get_token_ids (line 193) | def get_token_ids(prompt): function get_max_prompt_length (line 204) | def get_max_prompt_length(state): function generate_reply_wrapper (line 208) | def generate_reply_wrapper(question, state, stopping_strings=None): function formatted_outputs (line 222) | def formatted_outputs(reply, model_name): function set_manual_seed (line 226) | def set_manual_seed(seed): function stop_everything_event (line 246) | def stop_everything_event(): function apply_stopping_strings (line 250) | def apply_stopping_strings(reply, all_stop_strings): function get_reply_from_output_ids (line 275) | def get_reply_from_output_ids(output_ids, state=None, starting_from=0): function generate_reply_HF (line 300) | def generate_reply_HF(question, original_question, state, stopping_strin... function generate_reply_custom (line 489) | def generate_reply_custom(question, original_question, state, stopping_s... function print_prompt (line 528) | def print_prompt(prompt, max_chars=-1): FILE: modules/tool_parsing.py function get_tool_call_id (line 6) | def get_tool_call_id() -> str: function streaming_tool_buffer_check (line 27) | def streaming_tool_buffer_check(text, markers=None, tool_names=None, che... function check_and_sanitize_tool_call_candidate (line 70) | def check_and_sanitize_tool_call_candidate(candidate_dict: dict, tool_na... function _extract_balanced_json (line 90) | def _extract_balanced_json(text: str, start: int) -> str | None: function _parse_channel_tool_calls (line 123) | def _parse_channel_tool_calls(answer: str, tool_names: list[str]): function _parse_mistral_token_tool_calls (line 166) | def _parse_mistral_token_tool_calls(answer: str, tool_names: list[str]): function _parse_bare_name_tool_calls (line 200) | def _parse_bare_name_tool_calls(answer: str, tool_names: list[str]): function _parse_xml_param_tool_calls (line 241) | def _parse_xml_param_tool_calls(answer: str, tool_names: list[str]): function _parse_kimi_tool_calls (line 282) | def _parse_kimi_tool_calls(answer: str, tool_names: list[str]): function _parse_minimax_tool_calls (line 320) | def _parse_minimax_tool_calls(answer: str, tool_names: list[str]): function _parse_deep_seek_tool_calls (line 361) | def _parse_deep_seek_tool_calls(answer: str, tool_names: list[str]): function _parse_glm_tool_calls (line 397) | def _parse_glm_tool_calls(answer: str, tool_names: list[str]): function _parse_pythonic_tool_calls (line 441) | def _parse_pythonic_tool_calls(answer: str, tool_names: list[str]): function detect_tool_call_format (line 560) | def detect_tool_call_format(template_str): function parse_tool_call (line 595) | def parse_tool_call(answer: str, tool_names: list[str], return_prefix: b... FILE: modules/tool_use.py function get_available_tools (line 9) | def get_available_tools(): function load_tools (line 16) | def load_tools(selected_names): function execute_tool (line 58) | def execute_tool(func_name, arguments, executors): FILE: modules/torch_utils.py function get_device (line 10) | def get_device(): function clear_torch_cache (line 25) | def clear_torch_cache(): FILE: modules/training.py function create_ui (line 36) | def create_ui(): function do_interrupt (line 188) | def do_interrupt(): function do_copy_params (line 193) | def do_copy_params(lora_name: str, *args): function change_rank_limit (line 212) | def change_rank_limit(use_higher_ranks: bool): function clean_path (line 217) | def clean_path(base_path: str, path: str): function get_instruction_templates (line 226) | def get_instruction_templates(): function load_template (line 235) | def load_template(name): function backup_adapter (line 249) | def backup_adapter(input_folder): function calc_trainable_parameters (line 280) | def calc_trainable_parameters(model): function do_train (line 296) | def do_train(lora_name: str, always_override: bool, all_linear: bool, q_... function format_time (line 841) | def format_time(seconds: float): FILE: modules/transformers_loader.py class _StopEverythingStoppingCriteria (line 27) | class _StopEverythingStoppingCriteria(transformers.StoppingCriteria): method __init__ (line 28) | def __init__(self): method __call__ (line 31) | def __call__(self, input_ids: torch.LongTensor, _scores: torch.FloatTe... class Stream (line 35) | class Stream(transformers.StoppingCriteria): method __init__ (line 36) | def __init__(self, callback_func=None): method __call__ (line 39) | def __call__(self, input_ids, scores) -> bool: class LogitsBiasProcessor (line 46) | class LogitsBiasProcessor(LogitsProcessor): method __init__ (line 47) | def __init__(self, logit_bias={}): method __call__ (line 54) | def __call__(self, input_ids: torch.LongTensor, logits: torch.FloatTen... method __repr__ (line 60) | def __repr__(self): class LogprobProcessor (line 64) | class LogprobProcessor(LogitsProcessor): method __init__ (line 65) | def __init__(self, logprobs=None): method __call__ (line 70) | def __call__(self, input_ids: torch.LongTensor, logits: torch.FloatTen... method __repr__ (line 81) | def __repr__(self): function load_tokenizer (line 85) | def load_tokenizer(model_name, tokenizer_dir=None): function load_model_HF (line 105) | def load_model_HF(model_name): function get_max_memory_dict (line 209) | def get_max_memory_dict(): FILE: modules/ui.py function list_model_elements (line 122) | def list_model_elements(): function list_interface_input_elements (line 127) | def list_interface_input_elements(): function gather_interface_values (line 263) | def gather_interface_values(*args): function apply_interface_values (line 283) | def apply_interface_values(state, use_persistent=False): function save_settings (line 300) | def save_settings(state, preset, extensions_list, show_controls, theme_s... function store_current_state_and_debounce (line 365) | def store_current_state_and_debounce(interface_state, preset, extensions... function _perform_debounced_save (line 388) | def _perform_debounced_save(): function setup_auto_save (line 406) | def setup_auto_save(): function create_refresh_button (line 532) | def create_refresh_button(refresh_component, refresh_method, refreshed_a... FILE: modules/ui_chat.py function create_ui (line 17) | def create_ui(): function create_character_settings_ui (line 138) | def create_character_settings_ui(): function create_chat_settings_ui (line 197) | def create_chat_settings_ui(): function create_event_handlers (line 222) | def create_event_handlers(): FILE: modules/ui_default.py function create_ui (line 19) | def create_ui(): function create_event_handlers (line 76) | def create_event_handlers(): function handle_new_prompt (line 158) | def handle_new_prompt(): function handle_delete_prompt_confirm_default (line 169) | def handle_delete_prompt_confirm_default(prompt_name): function handle_rename_prompt_click_default (line 192) | def handle_rename_prompt_click_default(current_name): function handle_rename_prompt_confirm_default (line 201) | def handle_rename_prompt_confirm_default(new_name, current_name): FILE: modules/ui_file_saving.py function create_ui (line 9) | def create_ui(): function create_event_handlers (line 70) | def create_event_handlers(): function handle_save_preset_confirm_click (line 98) | def handle_save_preset_confirm_click(filename, contents): function handle_save_confirm_click (line 114) | def handle_save_confirm_click(root_state, filename, contents): function handle_delete_confirm_click (line 127) | def handle_delete_confirm_click(root_state, filename): function handle_save_character_confirm_click (line 140) | def handle_save_character_confirm_click(name2, greeting, context, charac... function handle_delete_character_confirm_click (line 155) | def handle_delete_character_confirm_click(character): function handle_save_preset_click (line 170) | def handle_save_preset_click(state): function handle_delete_preset_click (line 179) | def handle_delete_preset_click(preset): function handle_save_grammar_click (line 189) | def handle_save_grammar_click(grammar_string): function handle_delete_grammar_click (line 200) | def handle_delete_grammar_click(grammar_file): function handle_save_user_confirm_click (line 210) | def handle_save_user_confirm_click(name1, user_bio, your_picture, filena... function handle_delete_user_confirm_click (line 225) | def handle_delete_user_confirm_click(user): FILE: modules/ui_image_generation.py function round_to_step (line 51) | def round_to_step(value, step=STEP): function clamp (line 55) | def clamp(value, min_val, max_val): function apply_aspect_ratio (line 59) | def apply_aspect_ratio(aspect_ratio, current_width, current_height): function update_height_from_width (line 82) | def update_height_from_width(width, aspect_ratio): function update_width_from_height (line 93) | def update_width_from_height(height, aspect_ratio): function swap_dimensions_and_update_ratio (line 104) | def swap_dimensions_and_update_ratio(width, height, aspect_ratio): function build_generation_metadata (line 120) | def build_generation_metadata(state, actual_seed): function save_generated_images (line 135) | def save_generated_images(images, state, actual_seed): function read_image_metadata (line 164) | def read_image_metadata(image_path): function format_metadata_for_display (line 180) | def format_metadata_for_display(metadata): function get_all_history_images (line 213) | def get_all_history_images(force_refresh=False): function get_paginated_images (line 240) | def get_paginated_images(page=0, force_refresh=False): function get_initial_page_info (line 257) | def get_initial_page_info(): function refresh_gallery (line 263) | def refresh_gallery(current_page=0): function go_to_page (line 270) | def go_to_page(page_num, current_page): function next_page (line 282) | def next_page(current_page): function prev_page (line 289) | def prev_page(current_page): function on_gallery_select (line 296) | def on_gallery_select(evt: gr.SelectData, current_page): function send_to_generate (line 321) | def send_to_generate(selected_image_path): function read_dropped_image_metadata (line 346) | def read_dropped_image_metadata(image_path): function create_ui (line 355) | def create_ui(): function create_event_handlers (line 537) | def create_event_handlers(): function generate_prompt_variation (line 692) | def generate_prompt_variation(state): function progress_bar_html (line 748) | def progress_bar_html(progress=0, text=""): function generate (line 761) | def generate(state, save_images=True): function load_image_model_wrapper (line 926) | def load_image_model_wrapper(model_name, dtype, attn_backend, cpu_offloa... function unload_image_model_wrapper (line 953) | def unload_image_model_wrapper(): function download_image_model_wrapper (line 961) | def download_image_model_wrapper(model_path): FILE: modules/ui_model_menu.py function create_ui (line 26) | def create_ui(): function create_event_handlers (line 143) | def create_event_handlers(): function load_model_wrapper (line 199) | def load_model_wrapper(selected_model, loader, autoload=False): function load_lora_wrapper (line 231) | def load_lora_wrapper(selected_loras): function download_model_wrapper (line 237) | def download_model_wrapper(repo_id, specific_file, progress=gr.Progress(... function update_truncation_length (line 385) | def update_truncation_length(current_length, state): function get_initial_vram_info (line 397) | def get_initial_vram_info(): function get_initial_gpu_layers_max (line 410) | def get_initial_gpu_layers_max(): function handle_load_model_event_initial (line 418) | def handle_load_model_event_initial(model, state): function handle_load_model_event_final (line 427) | def handle_load_model_event_final(truncation_length, loader, state): function handle_unload_model_click (line 432) | def handle_unload_model_click(): function format_file_size (line 437) | def format_file_size(size_bytes): FILE: modules/ui_notebook.py function create_ui (line 25) | def create_ui(): function create_event_handlers (line 83) | def create_event_handlers(): function generate_and_save_wrapper_notebook (line 171) | def generate_and_save_wrapper_notebook(textbox_content, interface_state,... function handle_new_prompt (line 193) | def handle_new_prompt(): function handle_delete_prompt_confirm_notebook (line 204) | def handle_delete_prompt_confirm_notebook(prompt_name): function handle_rename_prompt_click_notebook (line 227) | def handle_rename_prompt_click_notebook(current_name): function handle_rename_prompt_confirm_notebook (line 235) | def handle_rename_prompt_confirm_notebook(new_name, current_name): function autosave_prompt (line 250) | def autosave_prompt(text, prompt_name): function safe_autosave_prompt (line 258) | def safe_autosave_prompt(content, prompt_name): function store_notebook_state_and_debounce (line 264) | def store_notebook_state_and_debounce(text, prompt_name): function _perform_notebook_debounced_save (line 281) | def _perform_notebook_debounced_save(): FILE: modules/ui_parameters.py function create_ui (line 9) | def create_ui(): function create_event_handlers (line 112) | def create_event_handlers(): function get_truncation_length (line 130) | def get_truncation_length(): function load_grammar (line 137) | def load_grammar(name): FILE: modules/ui_session.py function create_ui (line 7) | def create_ui(): function handle_save_settings (line 52) | def handle_save_settings(state, preset, extensions, show_controls, theme): function handle_default_to_notebook_change (line 64) | def handle_default_to_notebook_change(show_two_columns, default_input, d... function set_interface_arguments (line 89) | def set_interface_arguments(extensions, bool_active): function get_boolean_arguments (line 104) | def get_boolean_arguments(active=False): FILE: modules/utils.py function gradio (line 11) | def gradio(*keys): function sanitize_filename (line 18) | def sanitize_filename(name): function _is_path_allowed (line 29) | def _is_path_allowed(abs_path_str): function save_file (line 40) | def save_file(fname, contents): function delete_file (line 60) | def delete_file(fname): function current_time (line 76) | def current_time(): function atoi (line 80) | def atoi(text): function replace_all (line 85) | def replace_all(text, dic): function natural_keys (line 92) | def natural_keys(text): function check_model_loaded (line 96) | def check_model_loaded(): function resolve_model_path (line 110) | def resolve_model_path(model_name_or_path, image_model=False): function get_available_models (line 125) | def get_available_models(): function get_available_image_models (line 179) | def get_available_image_models(): function get_available_ggufs (line 197) | def get_available_ggufs(): function get_available_mmproj (line 211) | def get_available_mmproj(): function get_available_presets (line 224) | def get_available_presets(): function get_available_prompts (line 228) | def get_available_prompts(): function get_available_characters (line 244) | def get_available_characters(): function get_available_users (line 249) | def get_available_users(): function get_available_instruction_templates (line 256) | def get_available_instruction_templates(): function get_available_extensions (line 265) | def get_available_extensions(): function get_available_loras (line 280) | def get_available_loras(): function get_datasets (line 284) | def get_datasets(path: str, ext: str): function get_chat_datasets (line 292) | def get_chat_datasets(path: str): function get_text_datasets (line 297) | def get_text_datasets(path: str): function _peek_json_keys (line 302) | def _peek_json_keys(filepath): function _is_chat_dataset (line 342) | def _is_chat_dataset(filepath): function _is_text_dataset (line 347) | def _is_text_dataset(filepath): function get_available_chat_styles (line 352) | def get_available_chat_styles(): function get_available_grammars (line 356) | def get_available_grammars(): FILE: modules/web_search.py function _validate_url (line 17) | def _validate_url(url): function get_current_timestamp (line 37) | def get_current_timestamp(): function download_web_page (line 42) | def download_web_page(url, timeout=10, include_links=False): function perform_web_search (line 79) | def perform_web_search(query, num_pages=3, max_workers=5, timeout=10, fe... function truncate_content_by_tokens (line 156) | def truncate_content_by_tokens(content, max_tokens=8192): function add_web_search_attachments (line 172) | def add_web_search_attachments(history, row_idx, user_message, search_qu... FILE: one_click.py function signal_handler (line 27) | def signal_handler(sig, frame): function is_linux (line 34) | def is_linux(): function is_windows (line 38) | def is_windows(): function is_macos (line 42) | def is_macos(): function is_x86_64 (line 46) | def is_x86_64(): function is_installed (line 50) | def is_installed(): function load_state (line 63) | def load_state(): function save_state (line 74) | def save_state(state): function get_gpu_choice (line 80) | def get_gpu_choice(): function get_pytorch_install_command (line 111) | def get_pytorch_install_command(gpu_choice): function get_pytorch_update_command (line 129) | def get_pytorch_update_command(gpu_choice): function get_requirements_file (line 147) | def get_requirements_file(gpu_choice): function get_current_commit (line 165) | def get_current_commit(): function get_extensions_names (line 170) | def get_extensions_names(): function check_env (line 174) | def check_env(): function clear_cache (line 187) | def clear_cache(): function run_cmd (line 192) | def run_cmd(cmd, assert_success=False, environment=False, capture_output... function print_big_message (line 218) | def print_big_message(message): function calculate_file_hash (line 228) | def calculate_file_hash(file_path): function generate_alphabetic_sequence (line 237) | def generate_alphabetic_sequence(index): function get_user_choice (line 247) | def get_user_choice(question, options_dict): function update_pytorch_and_python (line 265) | def update_pytorch_and_python(): function clean_outdated_pytorch_cuda_dependencies (line 272) | def clean_outdated_pytorch_cuda_dependencies(): function install_webui (line 290) | def install_webui(): function update_requirements (line 323) | def update_requirements(initial_installation=False, pull=True): function install_extensions_requirements (line 467) | def install_extensions_requirements(): function launch_webui (line 476) | def launch_webui(): FILE: server.py function signal_handler (line 35) | def signal_handler(sig, frame): function create_interface (line 56) | def create_interface():