SYMBOL INDEX (594 symbols across 50 files) FILE: ChuanhuChatbot.py function create_new_model (line 28) | def create_new_model(): function create_greeting (line 504) | def create_greeting(request: gr.Request): FILE: locale/extract_locale.py function get_current_strings (line 19) | def get_current_strings(): function get_locale_strings (line 43) | def get_locale_strings(filename): function sort_strings (line 52) | def sort_strings(existing_translations): function auto_translate (line 71) | async def auto_translate(str, language): function main (line 94) | async def main(auto=False): FILE: modules/config.py function load_config_to_environ (line 49) | def load_config_to_environ(key_list): function retrieve_openai_api (line 218) | def retrieve_openai_api(api_key=None): function retrieve_proxy (line 244) | def retrieve_proxy(proxy=None): function update_doc_config (line 309) | def update_doc_config(two_column_pdf): FILE: modules/index_func.py function get_documents (line 11) | def get_documents(file_src): function construct_index (line 106) | def construct_index( FILE: modules/models/Azure.py class Azure_OpenAI_Client (line 8) | class Azure_OpenAI_Client(Base_Chat_Langchain_Client): method setup_model (line 9) | def setup_model(self): FILE: modules/models/ChatGLM.py class ChatGLM_Client (line 17) | class ChatGLM_Client(BaseLLMModel): method __init__ (line 18) | def __init__(self, model_name, user_name="") -> None: method _get_glm3_style_input (line 59) | def _get_glm3_style_input(self): method _get_glm2_style_input (line 64) | def _get_glm2_style_input(self): method _get_glm_style_input (line 76) | def _get_glm_style_input(self): method get_answer_at_once (line 82) | def get_answer_at_once(self): method get_answer_stream_iter (line 88) | def get_answer_stream_iter(self): method deinitialize (line 100) | def deinitialize(self): FILE: modules/models/ChuanhuAgent.py class GoogleSearchInput (line 34) | class GoogleSearchInput(BaseModel): class WebBrowsingInput (line 38) | class WebBrowsingInput(BaseModel): class KnowledgeBaseQueryInput (line 42) | class KnowledgeBaseQueryInput(BaseModel): class WebAskingInput (line 48) | class WebAskingInput(BaseModel): class ChuanhuAgent_Client (line 55) | class ChuanhuAgent_Client(BaseLLMModel): method __init__ (line 56) | def __init__(self, model_name, openai_api_key, user_name="") -> None: method google_search_simple (line 140) | def google_search_simple(self, query): method handle_file_upload (line 150) | def handle_file_upload(self, files, chatbot, language): method prepare_inputs (line 163) | def prepare_inputs( method query_index (line 171) | def query_index(self, query): method summary (line 184) | def summary(self, text): method fetch_url_content (line 191) | def fetch_url_content(self, url): method summary_url (line 200) | def summary_url(self, url): method ask_url (line 209) | def ask_url(self, url, question): method get_answer_at_once (line 230) | def get_answer_at_once(self): method get_answer_stream_iter (line 242) | def get_answer_stream_iter(self): FILE: modules/models/Claude.py class Claude_Client (line 8) | class Claude_Client(BaseLLMModel): method __init__ (line 9) | def __init__(self, model_name, api_secret) -> None: method _get_claude_style_history (line 16) | def _get_claude_style_history(self): method get_answer_stream_iter (line 73) | def get_answer_stream_iter(self): method get_answer_at_once (line 91) | def get_answer_at_once(self): FILE: modules/models/DALLE3.py class OpenAI_DALLE3_Client (line 8) | class OpenAI_DALLE3_Client(BaseLLMModel): method __init__ (line 9) | def __init__(self, model_name, api_key, user_name="") -> None: method _get_dalle3_prompt (line 17) | def _get_dalle3_prompt(self): method get_answer_at_once (line 23) | def get_answer_at_once(self, stream=False): method _refresh_header (line 62) | def _refresh_header(self): FILE: modules/models/ERNIE.py class ERNIE_Client (line 7) | class ERNIE_Client(BaseLLMModel): method __init__ (line 8) | def __init__(self, model_name, api_key, secret_key) -> None: method get_access_token (line 22) | def get_access_token(self): method get_answer_stream_iter (line 38) | def get_answer_stream_iter(self): method get_answer_at_once (line 70) | def get_answer_at_once(self): FILE: modules/models/GoogleGemini.py class GoogleGeminiClient (line 15) | class GoogleGeminiClient(BaseLLMModel): method __init__ (line 16) | def __init__(self, model_name, api_key, user_name="") -> None: method _encode_image_to_base64 (line 39) | def _encode_image_to_base64(self, image_path: str) -> str: method _get_mime_type (line 44) | def _get_mime_type(self, image_path: str) -> str: method _prepare_request_payload (line 61) | def _prepare_request_payload(self, stream: bool = False) -> Dict[str, ... method _send_request (line 177) | def _send_request(self, payload: Dict[str, Any], stream: bool = False)... method _process_streaming_response (line 203) | def _process_streaming_response(self, response: requests.Response) -> ... method _process_response (line 237) | def _process_response(self, response: requests.Response) -> str: method get_answer_at_once (line 260) | def get_answer_at_once(self): method get_answer_stream_iter (line 272) | def get_answer_stream_iter(self): FILE: modules/models/GoogleGemma.py class GoogleGemmaClient (line 11) | class GoogleGemmaClient(BaseLLMModel): method __init__ (line 12) | def __init__(self, model_name, api_key, user_name="") -> None: method deinitialize (line 52) | def deinitialize(self): method _get_gemma_style_input (line 59) | def _get_gemma_style_input(self): method get_answer_at_once (line 71) | def get_answer_at_once(self): method get_answer_stream_iter (line 84) | def get_answer_stream_iter(self): FILE: modules/models/GooglePaLM.py class Google_PaLM_Client (line 5) | class Google_PaLM_Client(BaseLLMModel): method __init__ (line 6) | def __init__(self, model_name, api_key, user_name="") -> None: method _get_palm_style_input (line 9) | def _get_palm_style_input(self): method get_answer_at_once (line 18) | def get_answer_at_once(self): FILE: modules/models/Groq.py class Groq_Client (line 19) | class Groq_Client(BaseLLMModel): method __init__ (line 20) | def __init__(self, model_name, api_key, user_name="") -> None: method _get_groq_style_input (line 33) | def _get_groq_style_input(self): method get_answer_at_once (line 37) | def get_answer_at_once(self): method get_answer_stream_iter (line 46) | def get_answer_stream_iter(self): FILE: modules/models/LLaMA.py class LLaMA_Client (line 20) | class LLaMA_Client(BaseLLMModel): method __init__ (line 21) | def __init__(self, model_name, lora_path=None, user_name="") -> None: method _get_llama_style_input (line 49) | def _get_llama_style_input(self): method get_answer_at_once (line 72) | def get_answer_at_once(self): method get_answer_stream_iter (line 83) | def get_answer_stream_iter(self): FILE: modules/models/MOSS.py class MOSS_Client (line 27) | class MOSS_Client(BaseLLMModel): method __init__ (line 28) | def __init__(self, model_name, user_name="") -> None: method _get_main_instruction (line 100) | def _get_main_instruction(self): method _get_moss_style_inputs (line 103) | def _get_moss_style_inputs(self): method get_answer_at_once (line 112) | def get_answer_at_once(self): method get_answer_stream_iter (line 133) | def get_answer_stream_iter(self): method preprocess (line 139) | def preprocess(self, raw_text: str) -> Tuple[torch.Tensor, torch.Tensor]: method forward (line 156) | def forward( method streaming_topk_search (line 195) | def streaming_topk_search( method top_k_top_p_filtering (line 303) | def top_k_top_p_filtering(self, logits, top_k, top_p, filter_value=-fl... method infer_ (line 331) | def infer_( method __call__ (line 358) | def __call__(self, input): FILE: modules/models/Ollama.py class OllamaClient (line 15) | class OllamaClient(BaseLLMModel): method __init__ (line 16) | def __init__(self, model_name, user_name="", ollama_host="", backend_m... method get_model_list (line 22) | def get_model_list(self): method update_token_limit (line 26) | def update_token_limit(self): method get_answer_stream_iter (line 43) | def get_answer_stream_iter(self): FILE: modules/models/OpenAIInstruct.py class OpenAI_Instruct_Client (line 9) | class OpenAI_Instruct_Client(BaseLLMModel): method __init__ (line 10) | def __init__(self, model_name, api_key, user_name="") -> None: method _get_instruct_style_input (line 13) | def _get_instruct_style_input(self): method get_answer_at_once (line 17) | def get_answer_at_once(self): FILE: modules/models/OpenAIVision.py class OpenAIVisionClient (line 25) | class OpenAIVisionClient(BaseLLMModel): method __init__ (line 26) | def __init__( method get_answer_stream_iter (line 45) | def get_answer_stream_iter(self): method get_answer_at_once (line 74) | def get_answer_at_once(self): method count_token (line 82) | def count_token(self, user_input): method count_image_tokens (line 91) | def count_image_tokens(self, width: int, height: int): method billing_info (line 98) | def billing_info(self): method _get_gpt4v_style_history (line 140) | def _get_gpt4v_style_history(self): method _get_response (line 170) | def _get_response(self, stream=False): method _refresh_header (line 226) | def _refresh_header(self): method _get_billing_data (line 233) | def _get_billing_data(self, billing_url): method _decode_chat_response (line 249) | def _decode_chat_response(self, response): method set_key (line 289) | def set_key(self, new_access_key): method _single_query_at_once (line 294) | def _single_query_at_once(self, history, temperature=1.0): method auto_name_chat_history (line 317) | def auto_name_chat_history(self, name_chat_method, user_question, sing... FILE: modules/models/Qwen.py class Qwen_Client (line 10) | class Qwen_Client(BaseLLMModel): method __init__ (line 11) | def __init__(self, model_name, user_name="") -> None: method generation_config (line 26) | def generation_config(self): method _get_glm_style_input (line 42) | def _get_glm_style_input(self): method get_answer_at_once (line 54) | def get_answer_at_once(self): method get_answer_stream_iter (line 60) | def get_answer_stream_iter(self): FILE: modules/models/StableLM.py class StopOnTokens (line 14) | class StopOnTokens(StoppingCriteria): method __call__ (line 15) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class StableLM_Client (line 23) | class StableLM_Client(BaseLLMModel): method __init__ (line 24) | def __init__(self, model_name, user_name="") -> None: method _get_stablelm_style_input (line 49) | def _get_stablelm_style_input(self): method _generate (line 57) | def _generate(self, text, bad_text=None): method get_answer_at_once (line 63) | def get_answer_at_once(self): method get_answer_stream_iter (line 67) | def get_answer_stream_iter(self): FILE: modules/models/XMChat.py class XMChat (line 19) | class XMChat(BaseLLMModel): method __init__ (line 20) | def __init__(self, api_key, user_name=""): method reset (line 33) | def reset(self, remain_system_prompt=False): method image_to_base64 (line 38) | def image_to_base64(self, image_path): method try_read_image (line 67) | def try_read_image(self, filepath): method like (line 83) | def like(self): method dislike (line 93) | def dislike(self): method prepare_inputs (line 103) | def prepare_inputs(self, real_inputs, use_websearch, files, reply_lang... method handle_file_upload (line 109) | def handle_file_upload(self, files, chatbot, language): method get_answer_at_once (line 135) | def get_answer_at_once(self): FILE: modules/models/base_model.py class CallbackToIterator (line 41) | class CallbackToIterator: method __init__ (line 42) | def __init__(self): method callback (line 47) | def callback(self, result): method __iter__ (line 52) | def __iter__(self): method __next__ (line 55) | def __next__(self): method finish (line 64) | def finish(self): function get_action_description (line 70) | def get_action_description(action): class ChuanhuCallbackHandler (line 82) | class ChuanhuCallbackHandler(BaseCallbackHandler): method __init__ (line 83) | def __init__(self, callback) -> None: method on_agent_action (line 87) | def on_agent_action( method on_tool_end (line 92) | def on_tool_end( method on_agent_finish (line 112) | def on_agent_finish( method on_llm_new_token (line 118) | def on_llm_new_token( class ModelType (line 138) | class ModelType(Enum): method get_type (line 166) | def get_type(cls, model_name: str): function download (line 235) | def download(repo_id, filename, retry=10): class BaseLLMModel (line 263) | class BaseLLMModel: method __init__ (line 264) | def __init__( method get_answer_stream_iter (line 324) | def get_answer_stream_iter(self): method get_answer_at_once (line 335) | def get_answer_at_once(self): method billing_info (line 349) | def billing_info(self): method count_token (line 354) | def count_token(self, user_input): method stream_next_chatbot (line 359) | def stream_next_chatbot(self, inputs, chatbot, fake_input=None, displa... method next_chatbot_at_once (line 393) | def next_chatbot_at_once(self, inputs, chatbot, fake_input=None, displ... method handle_file_upload (line 415) | def handle_file_upload(self, files, chatbot, language): method summarize_index (line 446) | def summarize_index(self, files, chatbot, language): method prepare_inputs (line 480) | def prepare_inputs( method predict (line 595) | def predict( method retry (line 739) | def retry( method interrupt (line 792) | def interrupt(self): method recover (line 795) | def recover(self): method set_token_upper_limit (line 798) | def set_token_upper_limit(self, new_upper_limit): method set_temperature (line 802) | def set_temperature(self, new_temperature): method set_top_p (line 806) | def set_top_p(self, new_top_p): method set_n_choices (line 810) | def set_n_choices(self, new_n_choices): method set_stop_sequence (line 814) | def set_stop_sequence(self, new_stop_sequence: str): method set_max_tokens (line 819) | def set_max_tokens(self, new_max_tokens): method set_presence_penalty (line 823) | def set_presence_penalty(self, new_presence_penalty): method set_frequency_penalty (line 827) | def set_frequency_penalty(self, new_frequency_penalty): method set_logit_bias (line 831) | def set_logit_bias(self, logit_bias): method encoded_logit_bias (line 835) | def encoded_logit_bias(self): method set_user_identifier (line 848) | def set_user_identifier(self, new_user_identifier): method set_system_prompt (line 852) | def set_system_prompt(self, new_system_prompt): method set_key (line 856) | def set_key(self, new_access_key): method set_single_turn (line 865) | def set_single_turn(self, new_single_turn): method set_streaming (line 869) | def set_streaming(self, new_streaming): method reset (line 873) | def reset(self, remain_system_prompt=False): method delete_first_conversation (line 915) | def delete_first_conversation(self): method delete_last_conversation (line 921) | def delete_last_conversation(self, chatbot): method token_message (line 939) | def token_message(self, token_lst=None): method rename_chat_history (line 952) | def rename_chat_history(self, filename): method auto_name_chat_history (line 972) | def auto_name_chat_history( method auto_save (line 984) | def auto_save(self, chatbot=None): method export_markdown (line 988) | def export_markdown(self, filename, chatbot): method upload_chat_history (line 995) | def upload_chat_history(self, new_history_file_content=None): method load_chat_history (line 1023) | def load_chat_history(self, new_history_file_path=None): method delete_chat_history (line 1132) | def delete_chat_history(self, filename): method auto_load (line 1163) | def auto_load(self): method new_auto_history_filename (line 1167) | def new_auto_history_filename(self): method like (line 1170) | def like(self): method dislike (line 1174) | def dislike(self): method deinitialize (line 1178) | def deinitialize(self): method clear_cuda_cache (line 1182) | def clear_cuda_cache(self): method get_base64_image (line 1189) | def get_base64_image(self, image_path): method get_image_type (line 1201) | def get_image_type(self, image_path): class Base_Chat_Langchain_Client (line 1208) | class Base_Chat_Langchain_Client(BaseLLMModel): method __init__ (line 1209) | def __init__(self, model_name, user_name=""): method setup_model (line 1214) | def setup_model(self): method _get_langchain_style_history (line 1218) | def _get_langchain_style_history(self): method get_answer_at_once (line 1227) | def get_answer_at_once(self): method get_answer_stream_iter (line 1235) | def get_answer_stream_iter(self): FILE: modules/models/configuration_moss.py class MossConfig (line 10) | class MossConfig(PretrainedConfig): method __init__ (line 75) | def __init__( FILE: modules/models/inspurai.py class Example (line 17) | class Example: method __init__ (line 20) | def __init__(self, inp, out): method get_input (line 25) | def get_input(self): method get_output (line 29) | def get_output(self): method get_id (line 33) | def get_id(self): method as_dict (line 37) | def as_dict(self): class Yuan (line 45) | class Yuan: method __init__ (line 50) | def __init__(self, method set_account (line 84) | def set_account(self, api_key): method add_example (line 88) | def add_example(self, ex): method delete_example (line 94) | def delete_example(self, id): method get_example (line 99) | def get_example(self, id): method get_all_examples (line 103) | def get_all_examples(self): method get_prime_text (line 107) | def get_prime_text(self): method get_engine (line 112) | def get_engine(self): method get_temperature (line 116) | def get_temperature(self): method get_max_tokens (line 120) | def get_max_tokens(self): method craft_query (line 124) | def craft_query(self, prompt): method format_example (line 133) | def format_example(self, ex): method response (line 139) | def response(self, method del_special_chars (line 163) | def del_special_chars(self, msg): method submit_API (line 169) | def submit_API(self, prompt, trun=[]): class YuanAPI (line 209) | class YuanAPI: method __init__ (line 216) | def __init__(self, user, phone): method code_md5 (line 221) | def code_md5(str): method rest_get (line 229) | def rest_get(url, header, timeout, show_error=False): method header_generation (line 239) | def header_generation(self): method submit_request (line 246) | def submit_request(self, query, temperature, topP, topK, max_tokens, e... method reply_request (line 265) | def reply_request(self, requestId, cycle_count=5): class Yuan_Client (line 281) | class Yuan_Client(BaseLLMModel): method __init__ (line 283) | def __init__(self, model_name, api_key, user_name="", system_prompt=No... method set_text_prefix (line 292) | def set_text_prefix(self, option, value): method get_answer_at_once (line 298) | def get_answer_at_once(self): FILE: modules/models/midjourney.py class Midjourney_Client (line 23) | class Midjourney_Client(XMChat): class FetchDataPack (line 25) | class FetchDataPack: method __init__ (line 38) | def __init__(self, action, prefix_content, task_id, timeout=900): method __init__ (line 46) | def __init__(self, model_name, api_key, user_name=""): method use_mj_self_proxy_url (line 69) | def use_mj_self_proxy_url(self, img_url): method split_image (line 78) | def split_image(self, image_url): method auth_mj (line 98) | def auth_mj(self): method request_mj (line 105) | def request_mj(self, path: str, action: str, data: str, retries=3): method fetch_status (line 133) | def fetch_status(self, fetch_data: FetchDataPack): method handle_file_upload (line 205) | def handle_file_upload(self, files, chatbot, language): method reset (line 220) | def reset(self, remain_system_prompt=False): method get_answer_at_once (line 225) | def get_answer_at_once(self): method get_answer_stream_iter (line 289) | def get_answer_stream_iter(self): method get_help (line 355) | def get_help(self): FILE: modules/models/minimax.py class MiniMax_Client (line 14) | class MiniMax_Client(BaseLLMModel): method __init__ (line 20) | def __init__(self, model_name, api_key, user_name="", system_prompt=No... method get_answer_at_once (line 31) | def get_answer_at_once(self): method get_answer_stream_iter (line 57) | def get_answer_stream_iter(self): method _get_response (line 68) | def _get_response(self, stream=False): method _decode_chat_response (line 130) | def _decode_chat_response(self, response): FILE: modules/models/modeling_moss.py function create_sinusoidal_positions (line 37) | def create_sinusoidal_positions(num_pos: int, dim: int) -> torch.Tensor: function rotate_every_two (line 44) | def rotate_every_two(x: torch.Tensor) -> torch.Tensor: function apply_rotary_pos_emb (line 52) | def apply_rotary_pos_emb(tensor: torch.Tensor, sin: torch.Tensor, cos: t... class MossAttention (line 58) | class MossAttention(nn.Module): method __init__ (line 59) | def __init__(self, config): method _split_heads (line 89) | def _split_heads(self, x, n_head, dim_head, mp_num): method _merge_heads (line 94) | def _merge_heads(self, tensor, num_attention_heads, attn_head_size): method _attn (line 107) | def _attn( method forward (line 148) | def forward( class MossMLP (line 227) | class MossMLP(nn.Module): method __init__ (line 228) | def __init__(self, intermediate_size, config): # in MLP: intermediate... method forward (line 238) | def forward(self, hidden_states: Optional[torch.FloatTensor]) -> torch... class MossBlock (line 247) | class MossBlock(nn.Module): method __init__ (line 248) | def __init__(self, config): method forward (line 255) | def forward( class MossPreTrainedModel (line 290) | class MossPreTrainedModel(PreTrainedModel): method __init__ (line 301) | def __init__(self, *inputs, **kwargs): method _init_weights (line 304) | def _init_weights(self, module): method _set_gradient_checkpointing (line 320) | def _set_gradient_checkpointing(self, module, value=False): class MossModel (line 390) | class MossModel(MossPreTrainedModel): method __init__ (line 391) | def __init__(self, config): method get_input_embeddings (line 407) | def get_input_embeddings(self): method set_input_embeddings (line 410) | def set_input_embeddings(self, new_embeddings): method forward (line 419) | def forward( class MossForCausalLM (line 583) | class MossForCausalLM(MossPreTrainedModel): method __init__ (line 586) | def __init__(self, config): method get_output_embeddings (line 594) | def get_output_embeddings(self): method set_output_embeddings (line 597) | def set_output_embeddings(self, new_embeddings): method prepare_inputs_for_generation (line 600) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method forward (line 633) | def forward( method _reorder_cache (line 700) | def _reorder_cache( FILE: modules/models/models.py function get_model (line 17) | def get_model( FILE: modules/models/spark.py class Ws_Param (line 21) | class Ws_Param(object): method __init__ (line 24) | def __init__(self, APPID, APIKey, APISecret, Spark_url): method create_url (line 33) | def create_url(self): class Spark_Client (line 67) | class Spark_Client(BaseLLMModel): method __init__ (line 68) | def __init__(self, model_name, appid, api_key, api_secret, user_name="... method on_error (line 79) | def on_error(self, ws, error): method on_close (line 83) | def on_close(self, ws, one, two): method on_open (line 87) | def on_open(self, ws): method run (line 90) | def run(self, ws, *args): method on_message (line 97) | def on_message(self, ws, message): method gen_params (line 100) | def gen_params(self): method get_answer_stream_iter (line 118) | def get_answer_stream_iter(self): FILE: modules/models/tokenization_moss.py function bytes_to_unicode (line 50) | def bytes_to_unicode(): function get_pairs (line 74) | def get_pairs(word): class MossTokenizer (line 88) | class MossTokenizer(PreTrainedTokenizer): method __init__ (line 132) | def __init__( method vocab_size (line 178) | def vocab_size(self): method get_vocab (line 181) | def get_vocab(self): method bpe (line 184) | def bpe(self, token): method build_inputs_with_special_tokens (line 226) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method _tokenize (line 239) | def _tokenize(self, text): method _convert_token_to_id (line 249) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 253) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 257) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 263) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method prepare_for_tokenization (line 292) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... method decode (line 298) | def decode( method truncate (line 342) | def truncate(self, completion, truncate_before_pattern): FILE: modules/overwrites.py function postprocess (line 14) | def postprocess( function postprocess_chat_messages (line 45) | def postprocess_chat_messages( function init_with_class_name_as_elem_classes (line 70) | def init_with_class_name_as_elem_classes(original_func): function multipart_internal_write (line 87) | def multipart_internal_write(self, data: bytes, length: int) -> int: function patch_gradio (line 488) | def patch_gradio(): FILE: modules/pdf_func.py function prepare_table_config (line 6) | def prepare_table_config(crop_page): function get_text_outside_table (line 28) | def get_text_outside_table(crop_page): function get_title_with_cropped_page (line 51) | def get_title_with_cropped_page(first_page): function get_column_cropped_pages (line 68) | def get_column_cropped_pages(pages, two_column=True): function parse_pdf (line 81) | def parse_pdf(filename, two_column = True): FILE: modules/repo.py function run (line 25) | def run( function run_pip (line 57) | def run_pip(command, desc=None, pref=None, live=default_command_live): function commit_hash (line 71) | def commit_hash(): function commit_html (line 80) | def commit_html(): function tag_html (line 91) | def tag_html(): function repo_tag_html (line 112) | def repo_tag_html(): function versions_html (line 118) | def versions_html(): function version_time (line 130) | def version_time(): function get_current_branch (line 161) | def get_current_branch(): function get_latest_release (line 172) | def get_latest_release(): function get_tag_commit_hash (line 189) | def get_tag_commit_hash(tag): function repo_need_stash (line 202) | def repo_need_stash(): function background_update (line 216) | def background_update(): FILE: modules/shared.py function format_openai_host (line 6) | def format_openai_host(api_host: str): class State (line 19) | class State: method interrupt (line 29) | def interrupt(self): method recover (line 32) | def recover(self): method set_api_host (line 35) | def set_api_host(self, api_host: str): method reset_api_host (line 40) | def reset_api_host(self): method reset_all (line 49) | def reset_all(self): method set_api_key_queue (line 53) | def set_api_key_queue(self, api_key_list): method switching_api_key (line 59) | def switching_api_key(self, func): FILE: modules/train_func.py function excel_to_jsonl (line 17) | def excel_to_jsonl(filepath, preview=False): function jsonl_save_to_disk (line 58) | def jsonl_save_to_disk(jsonl, filepath): function estimate_cost (line 66) | def estimate_cost(ds): function handle_dataset_selection (line 76) | def handle_dataset_selection(file_src): function upload_to_openai (line 88) | def upload_to_openai(file_src): function build_event_description (line 103) | def build_event_description(id, status, trained_tokens, name=i18n("暂时未知")): function start_training (line 115) | def start_training(file_id, suffix, epochs): function get_training_status (line 125) | def get_training_status(): function handle_dataset_clear (line 129) | def handle_dataset_clear(): function add_to_models (line 132) | def add_to_models(): function cancel_all_jobs (line 158) | def cancel_all_jobs(): FILE: modules/utils.py class DataframeData (line 36) | class DataframeData(TypedDict): function predict (line 41) | def predict(current_model, *args): function billing_info (line 47) | def billing_info(current_model): function set_key (line 51) | def set_key(current_model, *args): function load_chat_history (line 55) | def load_chat_history(current_model, *args): function delete_chat_history (line 59) | def delete_chat_history(current_model, *args): function interrupt (line 63) | def interrupt(current_model, *args): function reset (line 67) | def reset(current_model, *args): function retry (line 71) | def retry(current_model, *args): function delete_first_conversation (line 77) | def delete_first_conversation(current_model, *args): function delete_last_conversation (line 81) | def delete_last_conversation(current_model, *args): function set_system_prompt (line 85) | def set_system_prompt(current_model, *args): function rename_chat_history (line 89) | def rename_chat_history(current_model, *args): function auto_name_chat_history (line 93) | def auto_name_chat_history(current_model, *args): function export_markdown (line 97) | def export_markdown(current_model, *args): function upload_chat_history (line 101) | def upload_chat_history(current_model, *args): function set_token_upper_limit (line 105) | def set_token_upper_limit(current_model, *args): function set_temperature (line 109) | def set_temperature(current_model, *args): function set_top_p (line 113) | def set_top_p(current_model, *args): function set_n_choices (line 117) | def set_n_choices(current_model, *args): function set_stop_sequence (line 121) | def set_stop_sequence(current_model, *args): function set_max_tokens (line 125) | def set_max_tokens(current_model, *args): function set_presence_penalty (line 129) | def set_presence_penalty(current_model, *args): function set_frequency_penalty (line 133) | def set_frequency_penalty(current_model, *args): function set_logit_bias (line 137) | def set_logit_bias(current_model, *args): function set_user_identifier (line 141) | def set_user_identifier(current_model, *args): function set_single_turn (line 145) | def set_single_turn(current_model, *args): function set_streaming (line 148) | def set_streaming(current_model, *args): function handle_file_upload (line 152) | def handle_file_upload(current_model, *args): function handle_summarize_index (line 156) | def handle_summarize_index(current_model, *args): function like (line 160) | def like(current_model, *args): function dislike (line 164) | def dislike(current_model, *args): function count_token (line 168) | def count_token(input_str): function markdown_to_html_with_syntax_highlight (line 176) | def markdown_to_html_with_syntax_highlight(md_str): # deprecated function normalize_markdown (line 198) | def normalize_markdown(md_text: str) -> str: # deprecated function convert_mdtext (line 222) | def convert_mdtext(md_text): # deprecated function remove_html_tags (line 246) | def remove_html_tags(chatbot): function clip_rawtext (line 282) | def clip_rawtext(chat_message, need_escape=True): function convert_bot_before_marked (line 308) | def convert_bot_before_marked(chat_message): function convert_user_before_marked (line 333) | def convert_user_before_marked(chat_message): function escape_markdown (line 340) | def escape_markdown(text): function convert_asis (line 372) | def convert_asis(userinput): # deprecated function detect_converted_mark (line 379) | def detect_converted_mark(userinput): # deprecated function detect_language (line 389) | def detect_language(code): # deprecated function construct_text (line 399) | def construct_text(role, text): function construct_user (line 403) | def construct_user(text): function construct_image (line 406) | def construct_image(path): function construct_system (line 410) | def construct_system(text): function construct_assistant (line 414) | def construct_assistant(text): function save_file (line 418) | def save_file(filename, model): function save_md_file (line 480) | def save_md_file(json_file_path): function sorted_by_pinyin (line 492) | def sorted_by_pinyin(list): function sorted_by_last_modified_time (line 496) | def sorted_by_last_modified_time(list, dir): function get_file_names_by_type (line 502) | def get_file_names_by_type(dir, filetypes=[".json"]): function get_file_names_by_pinyin (line 512) | def get_file_names_by_pinyin(dir, filetypes=[".json"]): function get_file_names_dropdown_by_pinyin (line 520) | def get_file_names_dropdown_by_pinyin(dir, filetypes=[".json"]): function get_file_names_by_last_modified_time (line 525) | def get_file_names_by_last_modified_time(dir, filetypes=[".json"]): function get_history_names (line 533) | def get_history_names(user_name=""): function get_first_history_name (line 548) | def get_first_history_name(user_name=""): function get_history_list (line 553) | def get_history_list(user_name=""): function init_history_list (line 558) | def init_history_list(user_name="", prepend=None): function filter_history (line 567) | def filter_history(user_name, keyword): function load_template (line 576) | def load_template(filename, mode=0): function get_template_names (line 603) | def get_template_names(): function get_template_dropdown (line 608) | def get_template_dropdown(): function get_template_content (line 614) | def get_template_content(templates, selection, original_system_prompt): function reset_textbox (line 622) | def reset_textbox(): function reset_default (line 627) | def reset_default(): function change_api_host (line 633) | def change_api_host(host): function change_proxy (line 640) | def change_proxy(proxy): function hide_middle_chars (line 648) | def hide_middle_chars(s): function submit_key (line 660) | def submit_key(key): function replace_today (line 667) | def replace_today(prompt): function get_geoip (line 676) | def get_geoip(): function find_n (line 724) | def find_n(lst, max_num): function start_outputing (line 738) | def start_outputing(): function end_outputing (line 743) | def end_outputing(): function cancel_outputing (line 750) | def cancel_outputing(): function transfer_input (line 755) | def transfer_input(inputs): function update_chuanhu (line 767) | def update_chuanhu(username): function add_source_numbers (line 788) | def add_source_numbers(lst, source_name="Source", use_source=True): function add_details (line 798) | def add_details(lst): function sheet_to_string (line 806) | def sheet_to_string(sheet, sheet_name=None): function excel_to_string (line 818) | def excel_to_string(file_path): function get_last_day_of_month (line 833) | def get_last_day_of_month(any_day): function get_model_source (line 840) | def get_model_source(model_name, alternative_source): function refresh_ui_elements_on_load (line 845) | def refresh_ui_elements_on_load(current_model, selected_model_name, user... function toggle_like_btn_visibility (line 850) | def toggle_like_btn_visibility(selected_model_name): function get_corresponding_file_type_by_model_name (line 857) | def get_corresponding_file_type_by_model_name(selected_model_name): function new_auto_history_filename (line 868) | def new_auto_history_filename(username): function get_history_filepath (line 882) | def get_history_filepath(username): function beautify_err_msg (line 893) | def beautify_err_msg(err_msg): function auth_from_conf (line 911) | def auth_from_conf(username, password): function get_file_hash (line 935) | def get_file_hash(file_src=None, file_paths=None): function myprint (line 949) | def myprint(**args): function replace_special_symbols (line 953) | def replace_special_symbols(string, replace_string=" "): class ConfigType (line 962) | class ConfigType(Enum): class ConfigItem (line 970) | class ConfigItem: method __init__ (line 971) | def __init__(self, key, name, default=None, type=ConfigType.String) ->... function generate_prompt_string (line 978) | def generate_prompt_string(config_item): function generate_result_string (line 1001) | def generate_result_string(config_item, config_value): class SetupWizard (line 1012) | class SetupWizard: method __init__ (line 1013) | def __init__(self, file_path="config.json") -> None: method set (line 1044) | def set(self, config_items: List[ConfigItem], prompt: str): method set_users (line 1104) | def set_users(self): method __setitem__ (line 1121) | def __setitem__(self, setting_key: str, value): method __getitem__ (line 1124) | def __getitem__(self, setting_key: str): method save (line 1127) | def save(self): function setup_wizard (line 1132) | def setup_wizard(): function reboot_chuanhu (line 1500) | def reboot_chuanhu(): function setPlaceholder (line 1506) | def setPlaceholder(model_name: str | None = "", model: BaseLLMModel | No... function download_file (line 1570) | def download_file(path): FILE: modules/webui.py function get_html (line 14) | def get_html(filename): function webpath (line 21) | def webpath(fn): function javascript_html (line 30) | def javascript_html(): function css_html (line 38) | def css_html(): function list_scripts (line 44) | def list_scripts(scriptdirname, extension): function reload_javascript (line 54) | def reload_javascript(): FILE: modules/webui_locale.py class I18nAuto (line 6) | class I18nAuto: method __init__ (line 7) | def __init__(self): method change_language (line 33) | def change_language(self, language): method __call__ (line 46) | def __call__(self, key): FILE: web_assets/javascript/ChuanhuChat.js constant MAX_HISTORY_LENGTH (line 4) | const MAX_HISTORY_LENGTH = 32; function addInit (line 51) | function addInit() { function initialize (line 76) | function initialize() { function gradioApp (line 145) | function gradioApp() { function showConfirmationDialog (line 157) | function showConfirmationDialog(a, file, c) { function selectHistory (line 167) | function selectHistory() { function disableSendBtn (line 215) | function disableSendBtn() { function checkModel (line 222) | function checkModel() { function bindChatbotPlaceholderButtons (line 266) | function bindChatbotPlaceholderButtons() { function toggleDarkMode (line 288) | function toggleDarkMode(isEnabled) { function adjustDarkMode (line 299) | function adjustDarkMode() { function btnToggleDarkMode (line 311) | function btnToggleDarkMode() { function setScrollShadow (line 316) | function setScrollShadow() { function setPopupBoxPosition (line 342) | function setPopupBoxPosition() { function setChatbotHeight (line 358) | function setChatbotHeight() { function setChatbotScroll (line 381) | function setChatbotScroll() { function setAutocomplete (line 386) | function setAutocomplete() { function clearChatbot (line 392) | function clearChatbot(a, b) { function chatbotContentChanged (line 398) | function chatbotContentChanged(attempt = 1, force = false) { function makeML (line 502) | function makeML(str) { FILE: web_assets/javascript/chat-history.js function saveHistoryHtml (line 6) | function saveHistoryHtml() { function loadHistoryHtml (line 14) | function loadHistoryHtml() { function clearHistoryHtml (line 79) | function clearHistoryHtml() { FILE: web_assets/javascript/chat-list.js function setChatListHeader (line 4) | function setChatListHeader() { function setChatList (line 15) | function setChatList() { function disableChatListClick (line 53) | function disableChatListClick() { function enableChatListClick (line 63) | function enableChatListClick() { function exportBtnCheck (line 78) | function exportBtnCheck() { function saveChatHistory (line 85) | function saveChatHistory(a, b, c, d) { function isValidFileName (line 104) | function isValidFileName(fileName) { FILE: web_assets/javascript/fake-gradio.js function newChatClick (line 5) | function newChatClick() { function jsonDownloadClick (line 8) | function jsonDownloadClick() { function mdDownloadClick (line 11) | function mdDownloadClick() { function setUploader (line 16) | function setUploader() { function transUpload (line 43) | function transUpload() { function setCheckboxes (line 59) | function setCheckboxes() { function bgChangeSingleSession (line 81) | function bgChangeSingleSession() { function bgChangeOnlineSearch (line 86) | function bgChangeOnlineSearch() { function updateCheckboxes (line 92) | function updateCheckboxes() { function transEventListeners (line 98) | function transEventListeners(target, source, events) { function bgSelectHistory (line 111) | function bgSelectHistory(a,b){ function bgRebootChuanhu (line 117) | function bgRebootChuanhu() { FILE: web_assets/javascript/file-input.js function setPasteUploader (line 7) | function setPasteUploader() { function setDragUploader (line 34) | function setDragUploader() { function upload_files (line 75) | async function upload_files(files) { function draggingHint (line 105) | function draggingHint() { FILE: web_assets/javascript/localization.js function setLoclize (line 20) | function setLoclize() { function i18n (line 36) | function i18n(msg) { FILE: web_assets/javascript/message-button.js function convertBotMessage (line 4) | function convertBotMessage(gradioButtonMsg) { function addChuanhuButton (line 54) | function addChuanhuButton(botElement) { function setLatestMessage (line 187) | function setLatestMessage() { function addLatestMessageButtons (line 205) | function addLatestMessageButtons(botElement) { function addGeneratingLoader (line 274) | function addGeneratingLoader(botElement) { FILE: web_assets/javascript/updater.js function setUpdater (line 5) | function setUpdater() { function getLatestRelease (line 50) | async function getLatestRelease() { function updateLatestVersion (line 83) | async function updateLatestVersion() { function getUpdateInfo (line 177) | function getUpdateInfo() { function bgUpdateChuanhu (line 184) | function bgUpdateChuanhu() { function cancelUpdate (line 199) | function cancelUpdate() { function openUpdateToast (line 202) | function openUpdateToast() { function closeUpdateToast (line 207) | function closeUpdateToast() { function manualCheckUpdate (line 215) | function manualCheckUpdate() { function updateSuccessHtml (line 222) | function updateSuccessHtml() { function noUpdate (line 229) | function noUpdate(message="") { function noUpdateHtml (line 234) | function noUpdateHtml(message="") { function getUpdateStatus (line 250) | function getUpdateStatus() { function disableUpdateBtns (line 259) | function disableUpdateBtns() { function enableUpdateBtns (line 265) | function enableUpdateBtns() { function disableUpdateBtn_enableCancelBtn (line 271) | function disableUpdateBtn_enableCancelBtn() { FILE: web_assets/javascript/user-info.js function getUserInfo (line 8) | function getUserInfo() { function showOrHideUserInfo (line 36) | function showOrHideUserInfo() { FILE: web_assets/javascript/utils.js function isImgUrl (line 3) | function isImgUrl(url) { function escapeMarkdown (line 18) | function escapeMarkdown(text) { function downloadHistory (line 56) | function downloadHistory(gradioUsername, historyname, format=".json") { function downloadFile (line 66) | function downloadFile(fileUrl, filename = "", format = "", retryTimeout ... function statusDisplayMessage (line 111) | function statusDisplayMessage(message) { function bindFancyBox (line 116) | function bindFancyBox() { function rebootingChuanhu (line 126) | function rebootingChuanhu() { function restart_reload (line 150) | function restart_reload() { function requestGet (line 166) | function requestGet(url, data, handler, errorHandler) { FILE: web_assets/javascript/webui.js function openSettingBox (line 2) | function openSettingBox() { function openTrainingBox (line 11) | function openTrainingBox() { function openChatMore (line 19) | function openChatMore() { function closeChatMore (line 24) | function closeChatMore() { function showMask (line 30) | function showMask(obj) { function chatMoreBtnClick (line 63) | function chatMoreBtnClick() { function closeBtnClick (line 71) | function closeBtnClick(obj) { function closeBox (line 80) | function closeBox() { function closeSide (line 89) | function closeSide(sideArea) { function openSide (line 103) | function openSide(sideArea) { function menuClick (line 116) | function menuClick() { function toolboxClick (line 132) | function toolboxClick() { function adjustSide (line 154) | function adjustSide() { function adjustMask (line 198) | function adjustMask() { function checkChatbotWidth (line 228) | function checkChatbotWidth() { function checkChatMoreMask (line 254) | function checkChatMoreMask() { function showKnowledgeBase (line 261) | function showKnowledgeBase(){ function letThisSparkle (line 276) | function letThisSparkle(element, sparkleTime = 3000) { function switchToolBoxTab (line 281) | function switchToolBoxTab(tabIndex) {