SYMBOL INDEX (2251 symbols across 259 files) FILE: check_proxy.py function check_proxy (line 3) | def check_proxy(proxies, return_ip=False): function _check_with_backup_source (line 47) | def _check_with_backup_source(proxies): function backup_and_download (line 65) | def backup_and_download(current_version, remote_version): function patch_and_restart (line 104) | def patch_and_restart(path): function get_current_version (line 152) | def get_current_version(): function auto_update (line 168) | def auto_update(raise_error=False): function warm_up_modules (line 221) | def warm_up_modules(): function try_warm_up_vectordb (line 250) | def try_warm_up_vectordb(): function warm_up_vectordb (line 276) | def warm_up_vectordb(): FILE: core_functional.py function get_core_functions (line 10) | def get_core_functions(): function handle_core_functionality (line 150) | def handle_core_functionality(additional_fn, inputs, history, chatbot): FILE: crazy_functional.py function get_crazy_functions (line 5) | def get_crazy_functions(): function get_multiplex_button_functions (line 767) | def get_multiplex_button_functions(): FILE: crazy_functions/Academic_Conversation.py function 学术对话 (line 22) | def 学术对话(txt: str, llm_kwargs: Dict, plugin_kwargs: Dict, chatbot: List, FILE: crazy_functions/Arxiv_Downloader.py function download_arxiv_ (line 8) | def download_arxiv_(url_pdf): function get_name (line 64) | def get_name(_url_): function 下载arxiv论文并翻译摘要 (line 122) | def 下载arxiv论文并翻译摘要(txt, llm_kwargs, plugin_kwargs, chatbot, history, sys... FILE: crazy_functions/Audio_Assistant.py function chatbot2history (line 15) | def chatbot2history(chatbot): function visualize_audio (line 27) | def visualize_audio(chatbot, audio_shape): class AsyncGptTask (line 35) | class AsyncGptTask(): method __init__ (line 36) | def __init__(self) -> None: method gpt_thread_worker (line 40) | def gpt_thread_worker(self, i_say, llm_kwargs, history, sys_prompt, ob... method add_async_gpt_task (line 51) | def add_async_gpt_task(self, i_say, chatbot_index, llm_kwargs, history... method update_chatbot (line 59) | def update_chatbot(self, chatbot): class InterviewAssistant (line 69) | class InterviewAssistant(AliyunASR): method __init__ (line 70) | def __init__(self): method __del__ (line 81) | def __del__(self): method init (line 87) | def init(self, chatbot): method no_audio_for_a_while (line 102) | def no_audio_for_a_while(self): method begin (line 108) | def begin(self, llm_kwargs, plugin_kwargs, chatbot, history, system_pr... function Audio_Assistant (line 171) | def Audio_Assistant(txt, llm_kwargs, plugin_kwargs, chatbot, history, sy... FILE: crazy_functions/Audio_Summary.py function split_audio_file (line 5) | def split_audio_file(filename, split_duration=1000): function AnalyAudio (line 41) | def AnalyAudio(parse_prompt, file_manifest, llm_kwargs, chatbot, history): function Audio_Summary (line 135) | def Audio_Summary(txt, llm_kwargs, plugin_kwargs, chatbot, history, syst... FILE: crazy_functions/Commandline_Assistant.py function Commandline_Assistant (line 7) | def Commandline_Assistant(txt, llm_kwargs, plugin_kwargs, chatbot, histo... FILE: crazy_functions/Conversation_To_File.py function write_chat_to_file_legacy (line 8) | def write_chat_to_file_legacy(chatbot, history=None, file_name=None): function write_chat_to_file (line 75) | def write_chat_to_file(chatbot, history=None, file_name=None): function gen_file_preview (line 216) | def gen_file_preview(file_name): function read_file_to_chat (line 231) | def read_file_to_chat(chatbot, history, file_name): function 对话历史存档 (line 256) | def 对话历史存档(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_prom... class Conversation_To_File_Wrap (line 283) | class Conversation_To_File_Wrap(GptAcademicPluginTemplate): method __init__ (line 284) | def __init__(self): method define_arg_selection_menu (line 290) | def define_arg_selection_menu(self): method execute (line 301) | def execute(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_p... function hide_cwd (line 311) | def hide_cwd(str): function 载入对话历史存档 (line 318) | def 载入对话历史存档(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_pr... function 删除所有本地对话历史记录 (line 353) | def 删除所有本地对话历史记录(txt, llm_kwargs, plugin_kwargs, chatbot, history, syste... FILE: crazy_functions/Document_Conversation.py class FileFragment (line 15) | class FileFragment: class BatchDocumentSummarizer (line 24) | class BatchDocumentSummarizer: method __init__ (line 27) | def __init__(self, llm_kwargs: Dict, query: str, chatbot: List, histor... method _get_token_limit (line 37) | def _get_token_limit(self) -> int: method _create_batch_inputs (line 42) | def _create_batch_inputs(self, fragments: List[FileFragment]) -> Tuple... method _process_single_file_with_timeout (line 65) | def _process_single_file_with_timeout(self, file_info: Tuple[str, str]... method prepare_fragments (line 194) | def prepare_fragments(self, project_folder: str, file_paths: List[str]... method _process_fragments_batch (line 291) | def _process_fragments_batch(self, fragments: List[FileFragment]) -> G... method _generate_final_summary_request (line 339) | def _generate_final_summary_request(self) -> Tuple[List, List, List]: method process_files (line 355) | def process_files(self, project_folder: str, file_paths: List[str]) ->... method save_results (line 440) | def save_results(self, final_summary: str): function 批量文件询问 (line 497) | def 批量文件询问(txt: str, llm_kwargs: Dict, plugin_kwargs: Dict, chatbot: List, FILE: crazy_functions/Document_Conversation_Wrap.py class Document_Conversation_Wrap (line 7) | class Document_Conversation_Wrap(GptAcademicPluginTemplate): method __init__ (line 8) | def __init__(self): method define_arg_selection_menu (line 14) | def define_arg_selection_menu(self): method execute (line 31) | def execute(txt, llm_kwargs, plugin_kwargs:dict, chatbot, history, sys... FILE: crazy_functions/Document_Optimize.py class TextFragment (line 28) | class TextFragment: class DocumentProcessor (line 35) | class DocumentProcessor: method __init__ (line 38) | def __init__(self, llm_kwargs: Dict, plugin_kwargs: Dict, chatbot: Lis... method _get_token_limit (line 50) | def _get_token_limit(self) -> int: method _create_batch_inputs (line 56) | def _create_batch_inputs(self, fragments: List[TextFragment]) -> Tuple... method _extract_decision (line 77) | def _extract_decision(self, text: str) -> str: method process_file (line 89) | def process_file(self, file_path: str) -> Generator: method _process_structured_paper (line 114) | def _process_structured_paper(self, file_path: str) -> Generator: method _process_regular_file (line 361) | def _process_regular_file(self, file_path: str) -> Generator: method save_results (line 450) | def save_results(self, content: str, original_file_path: str) -> List[... method _breakdown_section_content (line 528) | def _breakdown_section_content(self, content: str) -> List[str]: function 自定义智能文档处理 (line 611) | def 自定义智能文档处理(txt: str, llm_kwargs: Dict, plugin_kwargs: Dict, chatbot: ... FILE: crazy_functions/Dynamic_Function_Generate.py function inspect_dependency (line 43) | def inspect_dependency(chatbot, history): function get_code_block (line 47) | def get_code_block(reply): function gpt_interact_multi_step (line 58) | def gpt_interact_multi_step(txt, file_type, llm_kwargs, chatbot, history): function for_immediate_show_off_when_possible (line 117) | def for_immediate_show_off_when_possible(file_type, fp, chatbot): function have_any_recent_upload_files (line 128) | def have_any_recent_upload_files(chatbot): function get_recent_file_prompt_support (line 136) | def get_recent_file_prompt_support(chatbot): function Dynamic_Function_Generate (line 142) | def Dynamic_Function_Generate(txt, llm_kwargs, plugin_kwargs, chatbot, h... FILE: crazy_functions/Google_Scholar_Assistant_Legacy.py function get_meta_information (line 11) | def get_meta_information(url, chatbot, history): function Google_Scholar_Assistant_Legacy (line 135) | def Google_Scholar_Assistant_Legacy(txt, llm_kwargs, plugin_kwargs, chat... FILE: crazy_functions/Helpers.py function 猜你想问 (line 14) | def 猜你想问(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt... function 清除缓存 (line 35) | def 清除缓存(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt... FILE: crazy_functions/Image_Generate.py function gen_image (line 11) | def gen_image(llm_kwargs, prompt, resolution="1024x1024", model="dall-e-... function edit_image (line 54) | def edit_image(llm_kwargs, prompt, image_path, resolution="1024x1024", m... function 图片生成_DALLE2 (line 100) | def 图片生成_DALLE2(prompt, llm_kwargs, plugin_kwargs, chatbot, history, sys... function 图片生成_DALLE3 (line 130) | def 图片生成_DALLE3(prompt, llm_kwargs, plugin_kwargs, chatbot, history, sys... function gen_image_banana (line 161) | def gen_image_banana(chatbot, history, text_prompt, image_base64_list=No... function 图片生成_NanoBanana (line 290) | def 图片生成_NanoBanana(prompt, llm_kwargs, plugin_kwargs, chatbot, history,... class ImageEditState (line 353) | class ImageEditState(GptAcademicState): method get_image_file (line 355) | def get_image_file(self, x): method lock_plugin (line 365) | def lock_plugin(self, chatbot): method unlock_plugin (line 369) | def unlock_plugin(self, chatbot): method get_resolution (line 374) | def get_resolution(self, x): method get_prompt (line 377) | def get_prompt(self, x): method reset (line 381) | def reset(self): method feed (line 389) | def feed(self, prompt, chatbot): method next_req (line 399) | def next_req(self): method already_obtained_all_materials (line 405) | def already_obtained_all_materials(self): function 图片修改_DALLE2 (line 409) | def 图片修改_DALLE2(prompt, llm_kwargs, plugin_kwargs, chatbot, history, sys... function make_transparent (line 435) | def make_transparent(input_image_path, output_image_path): function resize_image (line 449) | def resize_image(input_path, output_path, max_size=1024): function make_square_image (line 466) | def make_square_image(input_path, output_path): FILE: crazy_functions/Image_Generate_Wrap.py class ImageGen_Wrap (line 7) | class ImageGen_Wrap(GptAcademicPluginTemplate): method __init__ (line 8) | def __init__(self): method define_arg_selection_menu (line 14) | def define_arg_selection_menu(self): method execute (line 45) | def execute(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_p... FILE: crazy_functions/Interactive_Func_Template.py function 交互功能模板函数 (line 5) | def 交互功能模板函数(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_pr... function get_image_page_by_keyword (line 51) | def get_image_page_by_keyword(keyword): FILE: crazy_functions/Interactive_Mini_Game.py function 随机小游戏 (line 8) | def 随机小游戏(prompt, llm_kwargs, plugin_kwargs, chatbot, history, system_pr... function 随机小游戏1 (line 26) | def 随机小游戏1(prompt, llm_kwargs, plugin_kwargs, chatbot, history, system_p... FILE: crazy_functions/Internet_GPT.py function search_optimizer (line 16) | def search_optimizer( function get_auth_ip (line 109) | def get_auth_ip(): function searxng_request (line 116) | def searxng_request(query, proxies, categories='general', searxng_url=No... function scrape_text (line 169) | def scrape_text(url, proxies) -> str: function jina_scrape_text (line 204) | def jina_scrape_text(url) -> str: function internet_search_with_analysis_prompt (line 221) | def internet_search_with_analysis_prompt(prompt, analysis_prompt, llm_kw... function 连接网络回答问题 (line 255) | def 连接网络回答问题(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_pr... FILE: crazy_functions/Internet_GPT_Bing_Legacy.py function bing_search (line 8) | def bing_search(query, proxies=None): function scrape_text (line 30) | def scrape_text(url, proxies) -> str: function 连接bing搜索回答问题 (line 58) | def 连接bing搜索回答问题(txt, llm_kwargs, plugin_kwargs, chatbot, history, syste... FILE: crazy_functions/Internet_GPT_Legacy.py function google (line 7) | def google(query, proxies): function scrape_text (line 30) | def scrape_text(url, proxies) -> str: function 连接网络回答问题 (line 58) | def 连接网络回答问题(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_pr... FILE: crazy_functions/Internet_GPT_Wrap.py class NetworkGPT_Wrap (line 7) | class NetworkGPT_Wrap(GptAcademicPluginTemplate): method __init__ (line 8) | def __init__(self): method define_arg_selection_menu (line 14) | def define_arg_selection_menu(self): method execute (line 41) | def execute(txt, llm_kwargs, plugin_kwargs:dict, chatbot, history, sys... FILE: crazy_functions/Latex_Function.py function switch_prompt (line 14) | def switch_prompt(pfg, mode, more_requirement): function descend_to_extracted_folder_if_exist (line 44) | def descend_to_extracted_folder_if_exist(project_folder): function move_project (line 60) | def move_project(project_folder, arxiv_id=None): function arxiv_download (line 91) | def arxiv_download(chatbot, history, txt, allow_cache=True): function pdf2tex_project (line 181) | def pdf2tex_project(pdf_file_path, plugin_kwargs): function Latex英文纠错加PDF对比 (line 253) | def Latex英文纠错加PDF对比(txt, llm_kwargs, plugin_kwargs, chatbot, history, sy... function Latex翻译中文并重新编译PDF (line 331) | def Latex翻译中文并重新编译PDF(txt, llm_kwargs, plugin_kwargs, chatbot, history, ... function PDF翻译中文并重新编译PDF (line 454) | def PDF翻译中文并重新编译PDF(txt, llm_kwargs, plugin_kwargs, chatbot, history, sy... FILE: crazy_functions/Latex_Function_Wrap.py class Arxiv_Localize (line 6) | class Arxiv_Localize(GptAcademicPluginTemplate): method __init__ (line 7) | def __init__(self): method define_arg_selection_menu (line 13) | def define_arg_selection_menu(self): method execute (line 38) | def execute(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_p... class PDF_Localize (line 55) | class PDF_Localize(GptAcademicPluginTemplate): method __init__ (line 56) | def __init__(self): method define_arg_selection_menu (line 62) | def define_arg_selection_menu(self): method execute (line 81) | def execute(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_p... FILE: crazy_functions/Latex_Project_Polish.py class PaperFileGroup (line 5) | class PaperFileGroup(): method __init__ (line 6) | def __init__(self): method run_file_split (line 19) | def run_file_split(self, max_token_limit=1900): method merge_result (line 37) | def merge_result(self): method write_result (line 42) | def write_result(self): method zip_result (line 50) | def zip_result(self): function 多文件润色 (line 57) | def 多文件润色(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chat... function Latex英文润色 (line 138) | def Latex英文润色(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_p... function Latex中文润色 (line 176) | def Latex中文润色(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_p... function Latex英文纠错 (line 212) | def Latex英文纠错(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_p... FILE: crazy_functions/Latex_Project_Translate_Legacy.py class PaperFileGroup (line 5) | class PaperFileGroup(): method __init__ (line 6) | def __init__(self): method run_file_split (line 19) | def run_file_split(self, max_token_limit=1900): function 多文件翻译 (line 38) | def 多文件翻译(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chat... function Latex英译中 (line 109) | def Latex英译中(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_pr... function Latex中译英 (line 146) | def Latex中译英(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_pr... FILE: crazy_functions/Markdown_Translate.py class PaperFileGroup (line 8) | class PaperFileGroup(): method __init__ (line 9) | def __init__(self): method run_file_split (line 22) | def run_file_split(self, max_token_limit=2048): method merge_result (line 40) | def merge_result(self): method write_result (line 45) | def write_result(self, language): function 多文件翻译 (line 54) | def 多文件翻译(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chat... function get_files_from_everything (line 121) | def get_files_from_everything(txt, preference=''): function Markdown英译中 (line 162) | def Markdown英译中(txt, llm_kwargs, plugin_kwargs, chatbot, history, system... function Markdown中译英 (line 201) | def Markdown中译英(txt, llm_kwargs, plugin_kwargs, chatbot, history, system... function Markdown翻译指定语言 (line 233) | def Markdown翻译指定语言(txt, llm_kwargs, plugin_kwargs, chatbot, history, sys... FILE: crazy_functions/Math_Animation_Gen.py function inspect_dependency (line 7) | def inspect_dependency(chatbot, history): function eval_manim (line 17) | def eval_manim(code): function get_code_block (line 45) | def get_code_block(reply): function 动画生成 (line 54) | def 动画生成(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt... function examples_of_manim (line 105) | def examples_of_manim(): FILE: crazy_functions/Mermaid_Figure_Gen.py function 解析历史输入 (line 185) | def 解析历史输入(history, llm_kwargs, file_manifest, chatbot, plugin_kwargs): function Mermaid_Figure_Gen (line 300) | def Mermaid_Figure_Gen( class Mermaid_Gen (line 386) | class Mermaid_Gen(GptAcademicPluginTemplate): method __init__ (line 387) | def __init__(self): method define_arg_selection_menu (line 390) | def define_arg_selection_menu(self): method execute (line 413) | def execute( FILE: crazy_functions/Multi_Agent_Legacy.py function remove_model_prefix (line 18) | def remove_model_prefix(llm): function Multi_Agent_Legacy终端 (line 25) | def Multi_Agent_Legacy终端(txt, llm_kwargs, plugin_kwargs, chatbot, histor... FILE: crazy_functions/Multi_LLM_Query.py function 同时问询 (line 5) | def 同时问询(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt... function 同时问询_指定模型 (line 35) | def 同时问询_指定模型(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_p... FILE: crazy_functions/PDF_QA.py function 解析PDF (line 8) | def 解析PDF(file_name, llm_kwargs, plugin_kwargs, chatbot, history, system... function PDF_QA标准文件输入 (line 65) | def PDF_QA标准文件输入(txt, llm_kwargs, plugin_kwargs, chatbot, history, syste... FILE: crazy_functions/PDF_Summary.py function 解析PDF (line 12) | def 解析PDF(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chat... function PDF_Summary (line 106) | def PDF_Summary(txt, llm_kwargs, plugin_kwargs, chatbot, history, system... FILE: crazy_functions/PDF_Translate.py function 批量翻译PDF文档 (line 12) | def 批量翻译PDF文档(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_p... FILE: crazy_functions/PDF_Translate_Nougat.py function markdown_to_dict (line 14) | def markdown_to_dict(article_content): function 批量翻译PDF文档 (line 51) | def 批量翻译PDF文档(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_p... function 解析PDF_基于NOUGAT (line 98) | def 解析PDF_基于NOUGAT(file_manifest, project_folder, llm_kwargs, plugin_kwa... FILE: crazy_functions/PDF_Translate_Wrap.py class PDF_Tran (line 5) | class PDF_Tran(GptAcademicPluginTemplate): method __init__ (line 6) | def __init__(self): method define_arg_selection_menu (line 12) | def define_arg_selection_menu(self): method execute (line 26) | def execute(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_p... FILE: crazy_functions/Paper_Abstract_Writer.py function 解析Paper (line 7) | def 解析Paper(file_manifest, project_folder, llm_kwargs, plugin_kwargs, ch... function Paper_Abstract_Writer (line 46) | def Paper_Abstract_Writer(txt, llm_kwargs, plugin_kwargs, chatbot, histo... FILE: crazy_functions/Paper_Reading.py class PaperQuestion (line 16) | class PaperQuestion: class PaperAnalyzer (line 24) | class PaperAnalyzer: method __init__ (line 27) | def __init__(self, llm_kwargs: Dict, plugin_kwargs: Dict, chatbot: Lis... method _load_paper (line 68) | def _load_paper(self, paper_path: str) -> Generator: method _analyze_question (line 88) | def _analyze_question(self, question: PaperQuestion) -> Generator: method _generate_summary (line 114) | def _generate_summary(self) -> Generator: method save_report (line 145) | def save_report(self, report: str) -> Generator: method analyze_paper (line 172) | def analyze_paper(self, paper_path: str) -> Generator: function _find_paper_file (line 194) | def _find_paper_file(path: str) -> str: function download_paper_by_id (line 224) | def download_paper_by_id(paper_info, chatbot, history) -> str: function 快速论文解读 (line 295) | def 快速论文解读(txt: str, llm_kwargs: Dict, plugin_kwargs: Dict, chatbot: List, FILE: crazy_functions/Program_Comment_Gen.py function Program_Comment_Gen (line 7) | def Program_Comment_Gen(file_manifest, project_folder, llm_kwargs, plugi... function 批量Program_Comment_Gen (line 37) | def 批量Program_Comment_Gen(txt, llm_kwargs, plugin_kwargs, chatbot, histo... FILE: crazy_functions/Rag_Interface.py function handle_document_upload (line 18) | def handle_document_upload(files: List[str], llm_kwargs, plugin_kwargs, ... function Rag问答 (line 49) | def Rag问答(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_promp... FILE: crazy_functions/Social_Helper.py class SocialNetwork (line 14) | class SocialNetwork(): method __init__ (line 15) | def __init__(self): class SaveAndLoad (line 18) | class SaveAndLoad(): method __init__ (line 19) | def __init__(self, user_name, llm_kwargs, auto_load_checkpoint=True, c... method does_checkpoint_exist (line 27) | def does_checkpoint_exist(self, checkpoint_dir=None): method save_to_checkpoint (line 34) | def save_to_checkpoint(self, checkpoint_dir=None): method load_from_checkpoint (line 40) | def load_from_checkpoint(self, checkpoint_dir=None): class Friend (line 50) | class Friend(BaseModel): class FriendList (line 55) | class FriendList(BaseModel): class SocialNetworkWorker (line 59) | class SocialNetworkWorker(SaveAndLoad): method ai_socail_advice (line 60) | def ai_socail_advice(self, prompt, llm_kwargs, plugin_kwargs, chatbot,... method ai_remove_friend (line 63) | def ai_remove_friend(self, prompt, llm_kwargs, plugin_kwargs, chatbot,... method ai_list_friends (line 66) | def ai_list_friends(self, prompt, llm_kwargs, plugin_kwargs, chatbot, ... method ai_add_multi_friends (line 69) | def ai_add_multi_friends(self, prompt, llm_kwargs, plugin_kwargs, chat... method run (line 84) | def run(self, txt, llm_kwargs, plugin_kwargs, chatbot, history, system... method add_friend (line 134) | def add_friend(self, friend): function I人助手 (line 148) | def I人助手(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt... FILE: crazy_functions/SourceCode_Analyse.py function 解析源代码新 (line 6) | def 解析源代码新(file_manifest, project_folder, llm_kwargs, plugin_kwargs, cha... function make_diagram (line 108) | def make_diagram(this_iteration_files, result, this_iteration_history_fe... function 解析项目本身 (line 113) | def 解析项目本身(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_prom... function 解析一个Python项目 (line 126) | def 解析一个Python项目(txt, llm_kwargs, plugin_kwargs, chatbot, history, syste... function 解析一个Matlab项目 (line 145) | def 解析一个Matlab项目(txt, llm_kwargs, plugin_kwargs, chatbot, history, syste... function 解析一个C项目的头文件 (line 164) | def 解析一个C项目的头文件(txt, llm_kwargs, plugin_kwargs, chatbot, history, system... function 解析一个C项目 (line 185) | def 解析一个C项目(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_pro... function 解析一个Java项目 (line 208) | def 解析一个Java项目(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_... function 解析一个前端项目 (line 231) | def 解析一个前端项目(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_pr... function 解析一个Golang项目 (line 261) | def 解析一个Golang项目(txt, llm_kwargs, plugin_kwargs, chatbot, history, syste... function 解析一个Rust项目 (line 283) | def 解析一个Rust项目(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_... function 解析一个Lua项目 (line 304) | def 解析一个Lua项目(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_p... function 解析一个CSharp项目 (line 327) | def 解析一个CSharp项目(txt, llm_kwargs, plugin_kwargs, chatbot, history, syste... function 解析任意code项目 (line 348) | def 解析任意code项目(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_... FILE: crazy_functions/SourceCode_Analyse_JupyterNotebook.py class PaperFileGroup (line 7) | class PaperFileGroup(): method __init__ (line 8) | def __init__(self): method run_file_split (line 21) | def run_file_split(self, max_token_limit=1900): function parseNotebook (line 41) | def parseNotebook(filename, enable_markdown=1): function ipynb解释 (line 66) | def ipynb解释(file_manifest, project_folder, llm_kwargs, plugin_kwargs, ch... function 解析ipynb文件 (line 118) | def 解析ipynb文件(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_p... FILE: crazy_functions/SourceCode_Comment.py function 注释源代码 (line 14) | def 注释源代码(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chat... function 注释Python项目 (line 144) | def 注释Python项目(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_... FILE: crazy_functions/SourceCode_Comment_Wrap.py class SourceCodeComment_Wrap (line 6) | class SourceCodeComment_Wrap(GptAcademicPluginTemplate): method __init__ (line 7) | def __init__(self): method define_arg_selection_menu (line 13) | def define_arg_selection_menu(self): method execute (line 27) | def execute(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_p... FILE: crazy_functions/Vectorstore_QA.py function 知识库文件注入 (line 16) | def 知识库文件注入(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_pro... function 读取知识库作答 (line 87) | def 读取知识库作答(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_pro... FILE: crazy_functions/VideoResource_GPT.py class Query (line 20) | class Query(BaseModel): class VideoResource (line 24) | class VideoResource(BaseModel): function get_video_resource (line 32) | def get_video_resource(search_keyword): function download_video (line 43) | def download_video(bvid, user_name, chatbot, history): class Strategy (line 87) | class Strategy(BaseModel): function 多媒体任务 (line 95) | def 多媒体任务(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_promp... function debug (line 203) | def debug(bvid, llm_kwargs, plugin_kwargs, chatbot, history, system_prom... FILE: crazy_functions/Void_Terminal.py class UserIntention (line 60) | class UserIntention(BaseModel): function chat (line 67) | def chat(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt... function analyze_intention_with_simple_rules (line 86) | def analyze_intention_with_simple_rules(txt): function Void_Terminal (line 107) | def Void_Terminal(txt, llm_kwargs, plugin_kwargs, chatbot, history, syst... function Void_Terminal主路由 (line 136) | def Void_Terminal主路由(txt, llm_kwargs, plugin_kwargs, chatbot, history, s... FILE: crazy_functions/Word_Summary.py function 解析docx (line 8) | def 解析docx(file_manifest, project_folder, llm_kwargs, plugin_kwargs, cha... function Word_Summary (line 82) | def Word_Summary(txt, llm_kwargs, plugin_kwargs, chatbot, history, syste... FILE: crazy_functions/agent_fns/auto_agent.py class AutoGenMath (line 8) | class AutoGenMath(AutoGenGeneral): method define_agents (line 10) | def define_agents(self): FILE: crazy_functions/agent_fns/echo_agent.py class EchoDemo (line 4) | class EchoDemo(PluginMultiprocessManager): method subprocess_worker (line 5) | def subprocess_worker(self, child_conn): FILE: crazy_functions/agent_fns/general.py function gpt_academic_generate_oai_reply (line 6) | def gpt_academic_generate_oai_reply( class AutoGenGeneral (line 35) | class AutoGenGeneral(PluginMultiprocessManager): method gpt_academic_print_override (line 36) | def gpt_academic_print_override(self, user_proxy, message, sender): method gpt_academic_get_human_input (line 44) | def gpt_academic_get_human_input(self, user_proxy, message): method define_agents (line 63) | def define_agents(self): method exe_autogen (line 66) | def exe_autogen(self, input): method subprocess_worker (line 97) | def subprocess_worker(self, child_conn): class AutoGenGroupChat (line 105) | class AutoGenGroupChat(AutoGenGeneral): method exe_autogen (line 106) | def exe_autogen(self, input): method define_group_chat_manager_config (line 137) | def define_group_chat_manager_config(self): FILE: crazy_functions/agent_fns/persistent.py class GradioMultiuserManagerForPersistentClasses (line 3) | class GradioMultiuserManagerForPersistentClasses(): method __init__ (line 4) | def __init__(self): method already_alive (line 7) | def already_alive(self, key): method set (line 10) | def set(self, key, x): method get (line 14) | def get(self, key): FILE: crazy_functions/agent_fns/pipe.py class PipeCom (line 6) | class PipeCom: method __init__ (line 7) | def __init__(self, cmd, content) -> None: class PluginMultiprocessManager (line 12) | class PluginMultiprocessManager: method __init__ (line 13) | def __init__(self, llm_kwargs, plugin_kwargs, chatbot, history, system... method feed_heartbeat_watchdog (line 31) | def feed_heartbeat_watchdog(self): method is_alive (line 35) | def is_alive(self): method launch_subprocess_with_pipe (line 38) | def launch_subprocess_with_pipe(self): method terminate (line 48) | def terminate(self): method subprocess_worker (line 53) | def subprocess_worker(self, child_conn): method send_command (line 57) | def send_command(self, cmd): method immediate_showoff_when_possible (line 68) | def immediate_showoff_when_possible(self, fp): method overwatch_workdir_file_change (line 81) | def overwatch_workdir_file_change(self): method main_process_ui_control (line 112) | def main_process_ui_control(self, txt, create_or_resume) -> str: method subprocess_worker_wait_user_feedback (line 181) | def subprocess_worker_wait_user_feedback(self, wait_msg="wait user fee... FILE: crazy_functions/agent_fns/python_comment_agent.py class PythonCodeComment (line 177) | class PythonCodeComment(): method __init__ (line 179) | def __init__(self, llm_kwargs, plugin_kwargs, language, observe_window... method generate_tagged_code_from_full_context (line 198) | def generate_tagged_code_from_full_context(self): method read_file (line 206) | def read_file(self, path, brief): method find_next_function_begin (line 215) | def find_next_function_begin(self, tagged_code:list, begin_and_end): method _get_next_window (line 242) | def _get_next_window(self): method dedent (line 268) | def dedent(self, text): method get_next_batch (line 312) | def get_next_batch(self): method tag_code (line 316) | def tag_code(self, fn, hint): method get_markdown_block_in_html (line 354) | def get_markdown_block_in_html(self, html): method sync_and_patch (line 365) | def sync_and_patch(self, original, revised): method begin_comment_source_code (line 402) | def begin_comment_source_code(self, chatbot=None, history=None): method verify_successful (line 439) | def verify_successful(self, original, revised): FILE: crazy_functions/agent_fns/watchdog.py class WatchDog (line 4) | class WatchDog(): method __init__ (line 5) | def __init__(self, timeout, bark_fn, interval=3, msg="") -> None: method watch (line 13) | def watch(self): method begin_watch (line 22) | def begin_watch(self): method feed (line 28) | def feed(self): FILE: crazy_functions/ast_fns/comment_remove.py function remove_python_comments (line 7) | def remove_python_comments(input_source: str) -> str: FILE: crazy_functions/crazy_utils.py function input_clipping (line 7) | def input_clipping(inputs, history, max_token_limit, return_clip_flags=F... function request_gpt_model_in_new_thread_with_ui_alive (line 68) | def request_gpt_model_in_new_thread_with_ui_alive( function can_multi_process (line 166) | def can_multi_process(llm) -> bool: function request_gpt_model_multi_threads_with_very_awesome_ui_and_high_efficiency (line 187) | def request_gpt_model_multi_threads_with_very_awesome_ui_and_high_effici... function read_and_clean_pdf_text (line 359) | def read_and_clean_pdf_text(fp): function get_files_from_everything (line 542) | def get_files_from_everything(txt, type): # type='.md' class nougat_interface (line 592) | class nougat_interface(): method __init__ (line 593) | def __init__(self): method nougat_with_timeout (line 596) | def nougat_with_timeout(self, command, cwd, timeout=3600): method NOUGAT_parse_pdf (line 612) | def NOUGAT_parse_pdf(self, fp, chatbot, history): function try_install_deps (line 637) | def try_install_deps(deps, reload_m=[]): function get_plugin_arg (line 647) | def get_plugin_arg(plugin_kwargs, key, default): FILE: crazy_functions/diagram_fns/file_tree.py class FileNode (line 5) | class FileNode: method __init__ (line 6) | def __init__(self, name, build_manifest=False): method add_linebreaks_at_spaces (line 18) | def add_linebreaks_at_spaces(string, interval=10): method sanitize_comment (line 21) | def sanitize_comment(self, comment): method add_file (line 29) | def add_file(self, file_path, file_comment): method print_files_recursively (line 63) | def print_files_recursively(self, level=0, code="R0"): function build_file_tree_mermaid_diagram (line 94) | def build_file_tree_mermaid_diagram(file_manifest, file_comments, graph_... FILE: crazy_functions/doc_fns/AI_review_doc.py class DocumentFormatter (line 17) | class DocumentFormatter(ABC): method __init__ (line 20) | def __init__(self, final_summary: str, file_summaries_map: Dict, faile... method format_failed_files (line 26) | def format_failed_files(self) -> str: method format_file_summaries (line 31) | def format_file_summaries(self) -> str: method create_document (line 36) | def create_document(self) -> str: class WordFormatter (line 41) | class WordFormatter(DocumentFormatter): method __init__ (line 44) | def __init__(self, *args, **kwargs): method _setup_document (line 56) | def _setup_document(self): method _create_styles (line 81) | def _create_styles(self): method _create_heading_style (line 98) | def _create_heading_style(self, style_name: str, font_name: str, font_... method _get_heading_number (line 111) | def _get_heading_number(self, level: int) -> str: method _add_heading (line 139) | def _add_heading(self, text: str, level: int): method _get_run_style (line 175) | def _get_run_style(self, run, font_name: str, font_size: int, bold: bo... method format_failed_files (line 182) | def format_failed_files(self) -> str: method _add_content (line 199) | def _add_content(self, text: str, indent: bool = True): method format_file_summaries (line 208) | def format_file_summaries(self) -> str: method create_document (line 258) | def create_document(self): method save_as_pdf (line 283) | def save_as_pdf(self, word_path, pdf_path=None): class MarkdownFormatter (line 302) | class MarkdownFormatter(DocumentFormatter): method format_failed_files (line 305) | def format_failed_files(self) -> str: method format_file_summaries (line 315) | def format_file_summaries(self) -> str: method create_document (line 334) | def create_document(self) -> str: class HtmlFormatter (line 353) | class HtmlFormatter(DocumentFormatter): method __init__ (line 356) | def __init__(self, *args, **kwargs): method format_failed_files (line 744) | def format_failed_files(self) -> str: method format_file_summaries (line 758) | def format_file_summaries(self) -> str: method create_document (line 780) | def create_document(self) -> str: FILE: crazy_functions/doc_fns/batch_file_query_doc.py class DocumentFormatter (line 17) | class DocumentFormatter(ABC): method __init__ (line 20) | def __init__(self, final_summary: str, file_summaries_map: Dict, faile... method format_failed_files (line 26) | def format_failed_files(self) -> str: method format_file_summaries (line 31) | def format_file_summaries(self) -> str: method create_document (line 36) | def create_document(self) -> str: class WordFormatter (line 41) | class WordFormatter(DocumentFormatter): method __init__ (line 44) | def __init__(self, *args, **kwargs): method _setup_document (line 56) | def _setup_document(self): method _create_styles (line 81) | def _create_styles(self): method _create_heading_style (line 98) | def _create_heading_style(self, style_name: str, font_name: str, font_... method _get_heading_number (line 111) | def _get_heading_number(self, level: int) -> str: method _add_heading (line 139) | def _add_heading(self, text: str, level: int): method _get_run_style (line 175) | def _get_run_style(self, run, font_name: str, font_size: int, bold: bo... method format_failed_files (line 182) | def format_failed_files(self) -> str: method _add_content (line 199) | def _add_content(self, text: str, indent: bool = True): method format_file_summaries (line 208) | def format_file_summaries(self) -> str: method create_document (line 258) | def create_document(self): method save_as_pdf (line 283) | def save_as_pdf(self, word_path, pdf_path=None): class MarkdownFormatter (line 302) | class MarkdownFormatter(DocumentFormatter): method format_failed_files (line 305) | def format_failed_files(self) -> str: method format_file_summaries (line 315) | def format_file_summaries(self) -> str: method create_document (line 334) | def create_document(self) -> str: class HtmlFormatter (line 353) | class HtmlFormatter(DocumentFormatter): method __init__ (line 356) | def __init__(self, *args, **kwargs): method format_failed_files (line 744) | def format_failed_files(self) -> str: method format_file_summaries (line 758) | def format_file_summaries(self) -> str: method create_document (line 780) | def create_document(self) -> str: FILE: crazy_functions/doc_fns/content_folder.py class FoldingError (line 14) | class FoldingError(Exception): class FormattingError (line 19) | class FormattingError(FoldingError): class MetadataError (line 24) | class MetadataError(FoldingError): class ValidationError (line 29) | class ValidationError(FoldingError): class FoldingStyle (line 34) | class FoldingStyle(Enum): class FoldingOptions (line 42) | class FoldingOptions: class BaseMetadata (line 54) | class BaseMetadata(ABC): method validate (line 58) | def validate(self) -> bool: method _validate_non_empty_str (line 62) | def _validate_non_empty_str(self, value: Optional[str]) -> bool: class FileMetadata (line 68) | class FileMetadata(BaseMetadata): method validate (line 76) | def validate(self) -> bool: class ContentFormatter (line 91) | class ContentFormatter(ABC, Generic[T]): method format (line 98) | def format(self, method _create_summary (line 117) | def _create_summary(self, metadata: T) -> str: method _format_content_block (line 121) | def _format_content_block(self, method _add_indent (line 132) | def _add_indent(self, text: str, level: int) -> str: class FileContentFormatter (line 140) | class FileContentFormatter(ContentFormatter[FileMetadata]): method format (line 143) | def format(self, class ContentFoldingManager (line 183) | class ContentFoldingManager: method __init__ (line 186) | def __init__(self): method _register_default_formatters (line 191) | def _register_default_formatters(self) -> None: method register_formatter (line 195) | def register_formatter(self, name: str, formatter: ContentFormatter) -... method _guess_language (line 201) | def _guess_language(self, extension: str) -> Optional[str]: method format_content (line 223) | def format_content(self, FILE: crazy_functions/doc_fns/conversation_doc/excel_doc.py class ExcelTableFormatter (line 8) | class ExcelTableFormatter: method __init__ (line 11) | def __init__(self): method _normalize_table_row (line 17) | def _normalize_table_row(self, row): method _is_separator_row (line 26) | def _is_separator_row(self, row): method _extract_tables_from_text (line 31) | def _extract_tables_from_text(self, text): method _parse_table (line 66) | def _parse_table(self, table_lines): method _create_sheet (line 95) | def _create_sheet(self, question_num, table_num): method create_document (line 106) | def create_document(self, history): function save_chat_tables (line 147) | def save_chat_tables(history, save_dir, base_name): FILE: crazy_functions/doc_fns/conversation_doc/html_doc.py class HtmlFormatter (line 3) | class HtmlFormatter: method __init__ (line 6) | def __init__(self, chatbot, history): method format_chat_content (line 138) | def format_chat_content(self) -> str: method format_history_content (line 152) | def format_history_content(self) -> str: method create_document (line 166) | def create_document(self) -> str: FILE: crazy_functions/doc_fns/conversation_doc/markdown_doc.py class MarkdownFormatter (line 2) | class MarkdownFormatter: method __init__ (line 5) | def __init__(self): method _add_content (line 8) | def _add_content(self, text: str): method create_document (line 13) | def create_document(self, history: list) -> str: FILE: crazy_functions/doc_fns/conversation_doc/pdf_doc.py function convert_markdown_to_pdf (line 7) | def convert_markdown_to_pdf(markdown_text): class PDFFormatter (line 37) | class PDFFormatter: method __init__ (line 40) | def __init__(self): method _init_reportlab (line 46) | def _init_reportlab(self): method _get_reportlab_lib (line 66) | def _get_reportlab_lib(self): method _get_reportlab_platypus (line 69) | def _get_reportlab_platypus(self): method _register_fonts (line 72) | def _register_fonts(self): method _create_styles (line 96) | def _create_styles(self): method create_document (line 140) | def create_document(self, history, output_path): FILE: crazy_functions/doc_fns/conversation_doc/txt_doc.py function convert_markdown_to_txt (line 5) | def convert_markdown_to_txt(markdown_text): class TxtFormatter (line 38) | class TxtFormatter: method __init__ (line 41) | def __init__(self): method _setup_document (line 45) | def _setup_document(self): method _format_header (line 51) | def _format_header(self): method create_document (line 60) | def create_document(self, history): FILE: crazy_functions/doc_fns/conversation_doc/word2pdf.py class WordToPdfConverter (line 9) | class WordToPdfConverter: method convert_to_pdf (line 13) | def convert_to_pdf(word_path: Union[str, Path], pdf_path: Union[str, P... method batch_convert (line 89) | def batch_convert(word_dir: Union[str, Path], pdf_dir: Union[str, Path... method convert_doc_to_pdf (line 123) | def convert_doc_to_pdf(doc, output_dir: Union[str, Path] = None) -> str: FILE: crazy_functions/doc_fns/conversation_doc/word_doc.py function convert_markdown_to_word (line 10) | def convert_markdown_to_word(markdown_text): class WordFormatter (line 48) | class WordFormatter: method __init__ (line 51) | def __init__(self): method _setup_document (line 56) | def _setup_document(self): method _create_styles (line 81) | def _create_styles(self): method create_document (line 144) | def create_document(self, history): FILE: crazy_functions/doc_fns/read_fns/excel_reader.py class ExtractorConfig (line 16) | class ExtractorConfig: class ExcelTextExtractor (line 33) | class ExcelTextExtractor: method __init__ (line 40) | def __init__(self, config: Optional[ExtractorConfig] = None): method _setup_logging (line 45) | def _setup_logging(self) -> None: method _detect_encoding (line 56) | def _detect_encoding(self, file_path: Path) -> str: method _validate_file (line 69) | def _validate_file(self, file_path: Union[str, Path]) -> Path: method _format_value (line 89) | def _format_value(self, value: Any) -> str: method _process_chunk (line 96) | def _process_chunk(self, chunk: pd.DataFrame, columns: Optional[List[s... method _read_file (line 131) | def _read_file(self, file_path: Path) -> Union[pd.DataFrame, Iterator[... method extract_text (line 183) | def extract_text( method get_supported_formats (line 246) | def get_supported_formats() -> List[str]: function main (line 251) | def main(): FILE: crazy_functions/doc_fns/read_fns/markitdown/markdown_reader.py class MarkdownConverterConfig (line 14) | class MarkdownConverterConfig: class MarkdownConverter (line 50) | class MarkdownConverter: method __init__ (line 60) | def __init__(self, config: Optional[MarkdownConverterConfig] = None): method _setup_logging (line 72) | def _setup_logging(self) -> None: method _check_markitdown_installation (line 85) | def _check_markitdown_installation(self) -> None: method _validate_file (line 104) | def _validate_file(self, file_path: Union[str, Path], max_size_mb: int... method _cleanup_text (line 143) | def _cleanup_text(self, text: str) -> str: method get_supported_formats (line 164) | def get_supported_formats() -> List[str]: method convert_to_markdown (line 168) | def convert_to_markdown( method convert_to_markdown_and_save (line 245) | def convert_to_markdown_and_save( method batch_convert (line 265) | def batch_convert( function main (line 300) | def main(): FILE: crazy_functions/doc_fns/read_fns/unstructured_all/paper_metadata_extractor.py class PaperMetadata (line 18) | class PaperMetadata: class ExtractorConfig (line 36) | class ExtractorConfig: class PaperMetadataExtractor (line 47) | class PaperMetadataExtractor: method __init__ (line 65) | def __init__(self, config: Optional[ExtractorConfig] = None): method _setup_logging (line 74) | def _setup_logging(self) -> None: method _validate_file (line 87) | def _validate_file(self, file_path: Union[str, Path], max_size_mb: int... method _cleanup_text (line 126) | def _cleanup_text(self, text: str) -> str: method get_supported_formats (line 147) | def get_supported_formats() -> List[str]: method extract_metadata (line 151) | def extract_metadata(self, file_path: Union[str, Path], strategy: str ... method _extract_title_and_authors (line 194) | def _extract_title_and_authors(self, elements, metadata: PaperMetadata... method _evaluate_title_candidate (line 317) | def _evaluate_title_candidate(self, text, position, element): method _extract_abstract_and_keywords (line 378) | def _extract_abstract_and_keywords(self, elements, metadata: PaperMeta... method _extract_additional_metadata (line 432) | def _extract_additional_metadata(self, elements, metadata: PaperMetada... function main (line 461) | def main(): FILE: crazy_functions/doc_fns/read_fns/unstructured_all/paper_structure_extractor.py class PaperSection (line 21) | class PaperSection: class Figure (line 31) | class Figure: class Formula (line 40) | class Formula: class Reference (line 48) | class Reference: class StructuredPaper (line 59) | class StructuredPaper: class ExtractorConfig (line 72) | class ExtractorConfig: class PaperStructureExtractor (line 87) | class PaperStructureExtractor: method __init__ (line 112) | def __init__(self, config: Optional[ExtractorConfig] = None): method _setup_logging (line 122) | def _setup_logging(self) -> None: method _cleanup_text (line 135) | def _cleanup_text(self, text: str) -> str: method get_supported_formats (line 160) | def get_supported_formats() -> List[str]: method extract_paper_structure (line 164) | def extract_paper_structure(self, file_path: Union[str, Path], strateg... method _extract_sections (line 222) | def _extract_sections(self, elements) -> List[PaperSection]: method _is_likely_section_title (line 273) | def _is_likely_section_title(self, title_text: str, element, index: in... method _calculate_followup_content_length (line 526) | def _calculate_followup_content_length(self, index: int, elements, max... method _identify_section_type (line 546) | def _identify_section_type(self, title_text: str) -> str: method _estimate_title_level (line 561) | def _estimate_title_level(self, title_element, all_elements) -> int: method _extract_content_between_indices (line 602) | def _extract_content_between_indices(self, elements, start_index: int,... method _extract_content_after_index (line 613) | def _extract_content_after_index(self, elements, start_index: int) -> ... method _build_section_hierarchy (line 624) | def _build_section_hierarchy(self, sections: List[PaperSection]) -> Li... method _extract_figures_and_tables (line 661) | def _extract_figures_and_tables(self, elements) -> Tuple[List[Figure],... method _surrounding_has_math_symbols (line 750) | def _surrounding_has_math_symbols(self, index: int, elements, window: ... method _extract_formulas (line 786) | def _extract_formulas(self, elements) -> List[Formula]: method _extract_references (line 866) | def _extract_references(self, elements) -> List[Reference]: method _extract_full_text (line 960) | def _extract_full_text(self, elements) -> str: method generate_markdown (line 972) | def generate_markdown(self, paper: StructuredPaper) -> str: method _format_sections_markdown (line 1051) | def _format_sections_markdown(self, sections: List[PaperSection], leve... method _format_formula_content (line 1086) | def _format_formula_content(self, content: str) -> str: method _is_in_references_section (line 1111) | def _is_in_references_section(self, index: int, elements) -> bool: function main (line 1161) | def main(): FILE: crazy_functions/doc_fns/read_fns/unstructured_all/unstructured_md.py function extract_and_save_as_markdown (line 4) | def extract_and_save_as_markdown(paper_path, output_path=None): FILE: crazy_functions/doc_fns/read_fns/web_reader.py class WebExtractorConfig (line 13) | class WebExtractorConfig: class WebTextExtractor (line 41) | class WebTextExtractor: method __init__ (line 47) | def __init__(self, config: Optional[WebExtractorConfig] = None): method _setup_logging (line 56) | def _setup_logging(self) -> None: method _validate_url (line 69) | def _validate_url(self, url: str) -> bool: method _download_webpage (line 84) | def _download_webpage(self, url: str) -> Optional[str]: method _cleanup_text (line 113) | def _cleanup_text(self, text: str) -> str: method extract_text (line 136) | def extract_text(self, url: str) -> str: function main (line 187) | def main(): FILE: crazy_functions/doc_fns/text_content_loader.py class FileInfo (line 19) | class FileInfo: class TextContentLoader (line 28) | class TextContentLoader: method __init__ (line 42) | def __init__(self, chatbot: List, history: List): method _create_file_info (line 55) | def _create_file_info(self, entry: os.DirEntry, root_path: str) -> Fil... method _process_file_batch (line 78) | def _process_file_batch(self, file_batch: List[FileInfo]) -> List[Tupl... method _read_file_content (line 121) | def _read_file_content(self, file_info: FileInfo) -> Optional[str]: method _is_valid_file (line 139) | def _is_valid_file(self, file_path: str) -> bool: method _collect_files (line 160) | def _collect_files(self, path: str) -> List[FileInfo]: method _format_content_with_fold (line 229) | def _format_content_with_fold(self, file_info, content: str) -> str: method _format_content_for_llm (line 259) | def _format_content_for_llm(self, file_infos: List[FileInfo], contents... method execute (line 287) | def execute(self, txt: str) -> Generator: method execute_single_file (line 354) | def execute_single_file(self, file_path: str) -> Generator: method __del__ (line 446) | def __del__(self): FILE: crazy_functions/game_fns/game_ascii_art.py class MiniGame_ASCII_Art (line 9) | class MiniGame_ASCII_Art(GptAcademicGameBaseState): method step (line 10) | def step(self, prompt, chatbot, history): FILE: crazy_functions/game_fns/game_interactive_story.py class MiniGame_ResumeStory (line 74) | class MiniGame_ResumeStory(GptAcademicGameBaseState): method begin_game_step_0 (line 85) | def begin_game_step_0(self, prompt, chatbot, history): method generate_story_image (line 93) | def generate_story_image(self, story_paragraph): method step (line 102) | def step(self, prompt, chatbot, history): FILE: crazy_functions/game_fns/game_utils.py function get_code_block (line 4) | def get_code_block(reply): function is_same_thing (line 12) | def is_same_thing(a, b, llm_kwargs): FILE: crazy_functions/gen_fns/gen_fns_shared.py function get_class_name (line 8) | def get_class_name(class_string): function try_make_module (line 14) | def try_make_module(code, chatbot): function is_function_successfully_generated (line 30) | def is_function_successfully_generated(fn_path, class_name, return_dict): function subprocess_worker (line 49) | def subprocess_worker(code, file_path, return_dict): FILE: crazy_functions/ipc_fns/mp.py function run_in_subprocess_wrapper_func (line 5) | def run_in_subprocess_wrapper_func(v_args): function run_in_subprocess_with_timeout (line 15) | def run_in_subprocess_with_timeout(func, timeout=60): FILE: crazy_functions/json_fns/pydantic_io.py class JsonStringError (line 46) | class JsonStringError(Exception): ... class GptJsonIO (line 48) | class GptJsonIO(): method __init__ (line 50) | def __init__(self, schema, example_instruction=True): method generate_format_instructions (line 55) | def generate_format_instructions(self): method generate_output (line 71) | def generate_output(self, text): method generate_repair_prompt (line 82) | def generate_repair_prompt(self, broken_json, error): method generate_output_auto_repair (line 93) | def generate_output_auto_repair(self, response, gpt_gen_fn): FILE: crazy_functions/json_fns/select_tool.py function structure_output (line 3) | def structure_output(txt, prompt, err_msg, run_gpt_fn, pydantic_cls): function select_tool (line 18) | def select_tool(prompt, run_gpt_fn, pydantic_cls): FILE: crazy_functions/latex_fns/latex_actions.py function split_subprocess (line 19) | def split_subprocess(txt, project_folder, return_dict, opts): class LatexPaperSplit (line 84) | class LatexPaperSplit(): method __init__ (line 90) | def __init__(self) -> None: method read_title_and_abstract (line 100) | def read_title_and_abstract(self, txt): method merge_result (line 110) | def merge_result(self, arr, mode, msg, buggy_lines=[], buggy_line_surg... method split (line 150) | def split(self, txt, project_folder, opts): class LatexPaperFileGroup (line 171) | class LatexPaperFileGroup(): method __init__ (line 175) | def __init__(self): method run_file_split (line 187) | def run_file_split(self, max_token_limit=1900): method merge_result (line 204) | def merge_result(self): method write_result (line 209) | def write_result(self): function Latex精细分解与转化 (line 218) | def Latex精细分解与转化(file_manifest, project_folder, llm_kwargs, plugin_kwarg... function remove_buggy_lines (line 320) | def remove_buggy_lines(file_path, log_path, tex_name, tex_name_pure, n_f... function 编译Latex (line 347) | def 编译Latex(chatbot, history, main_file_original, main_file_modified, wo... function write_html (line 481) | def write_html(sp_file_contents, sp_file_result, chatbot, project_folder): function upload_to_gptac_cloud_if_user_allow (line 509) | def upload_to_gptac_cloud_if_user_allow(chatbot, arxiv_id): function check_gptac_cloud (line 547) | def check_gptac_cloud(arxiv_id, chatbot): FILE: crazy_functions/latex_fns/latex_pickle_io.py class SafeUnpickler (line 4) | class SafeUnpickler(pickle.Unpickler): method get_safe_classes (line 6) | def get_safe_classes(self): method find_class (line 22) | def find_class(self, module, name): function objdump (line 34) | def objdump(obj, file="objdump.tmp"): function objload (line 41) | def objload(file="objdump.tmp"): FILE: crazy_functions/latex_fns/latex_toolbox.py class LinkedListNode (line 13) | class LinkedListNode: method __init__ (line 18) | def __init__(self, string, preserve=True) -> None: function convert_to_linklist (line 27) | def convert_to_linklist(text, mask): function post_process (line 42) | def post_process(root): function set_forbidden_text (line 153) | def set_forbidden_text(text, mask, pattern, flags=0): function reverse_forbidden_text (line 168) | def reverse_forbidden_text(text, mask, pattern, flags=0, forbid_wrapper=... function set_forbidden_text_careful_brace (line 188) | def set_forbidden_text_careful_brace(text, mask, pattern, flags=0): function reverse_forbidden_text_careful_brace (line 212) | def reverse_forbidden_text_careful_brace( function set_forbidden_text_begin_end (line 241) | def set_forbidden_text_begin_end(text, mask, pattern, flags=0, limit_n_l... function find_main_tex_file (line 285) | def find_main_tex_file(file_manifest, mode): function rm_comments (line 334) | def rm_comments(main_file): function find_tex_file_ignore_case (line 348) | def find_tex_file_ignore_case(fp): function merge_tex_files_ (line 375) | def merge_tex_files_(project_foler, main_file, mode): function find_title_and_abs (line 397) | def find_title_and_abs(main_file): function merge_tex_files (line 430) | def merge_tex_files(project_foler, main_file, mode): function insert_abstract (line 484) | def insert_abstract(tex_content): function mod_inbraket (line 524) | def mod_inbraket(match): function fix_content (line 538) | def fix_content(final_tex, node_string): function compile_latex_with_timeout (line 595) | def compile_latex_with_timeout(command, cwd, timeout=60): function run_in_subprocess_wrapper_func (line 611) | def run_in_subprocess_wrapper_func(func, args, kwargs, return_dict, exce... function run_in_subprocess (line 622) | def run_in_subprocess(func): function _merge_pdfs (line 646) | def _merge_pdfs(pdf1_path, pdf2_path, output_path): function _merge_pdfs_ng (line 655) | def _merge_pdfs_ng(pdf1_path, pdf2_path, output_path): function _merge_pdfs_legacy (line 856) | def _merge_pdfs_legacy(pdf1_path, pdf2_path, output_path): FILE: crazy_functions/live_audio/aliyunASR.py function write_numpy_to_wave (line 6) | def write_numpy_to_wave(filename, rate, data, add_header=False): function is_speaker_speaking (line 87) | def is_speaker_speaking(vad, data, sample_rate): class AliyunASR (line 107) | class AliyunASR(): method test_on_sentence_begin (line 109) | def test_on_sentence_begin(self, message, *args): method test_on_sentence_end (line 112) | def test_on_sentence_end(self, message, *args): method test_on_start (line 117) | def test_on_start(self, message, *args): method test_on_error (line 120) | def test_on_error(self, message, *args): method test_on_close (line 124) | def test_on_close(self, *args): method test_on_result_chg (line 128) | def test_on_result_chg(self, message, *args): method test_on_completed (line 133) | def test_on_completed(self, message, *args): method audio_convertion_thread (line 136) | def audio_convertion_thread(self, uuid): method get_token (line 223) | def get_token(self): FILE: crazy_functions/live_audio/audio_io.py function Singleton (line 4) | def Singleton(cls): class RealtimeAudioDistribution (line 16) | class RealtimeAudioDistribution(): method __init__ (line 17) | def __init__(self) -> None: method clean_up (line 22) | def clean_up(self): method feed (line 25) | def feed(self, uuid, audio): method read (line 35) | def read(self, uuid): function change_sample_rate (line 43) | def change_sample_rate(audio, old_sr, new_sr): FILE: crazy_functions/media_fns/get_media.py function download_video (line 6) | def download_video(video_id, only_audio, user_name, chatbot, history): function search_videos (line 33) | def search_videos(keywords): FILE: crazy_functions/multi_stage/multi_stage_utils.py function have_any_recent_upload_files (line 10) | def have_any_recent_upload_files(chatbot): class GptAcademicState (line 18) | class GptAcademicState(): method __init__ (line 19) | def __init__(self): method reset (line 22) | def reset(self): method dump_state (line 25) | def dump_state(self, chatbot): method set_state (line 28) | def set_state(self, chatbot, key, value): method get_state (line 32) | def get_state(chatbot, cls=None): class GptAcademicGameBaseState (line 41) | class GptAcademicGameBaseState(): method init_game (line 45) | def init_game(self, chatbot, lock_plugin): method lock_plugin (line 51) | def lock_plugin(self, chatbot): method get_plugin_name (line 57) | def get_plugin_name(self): method dump_state (line 62) | def dump_state(self, chatbot): method set_state (line 65) | def set_state(self, chatbot, key, value): method sync_state (line 70) | def sync_state(chatbot, llm_kwargs, cls, plugin_name, callback_fn, loc... method continue_game (line 83) | def continue_game(self, prompt, chatbot, history): FILE: crazy_functions/paper_fns/auto_git/handlers/base_handler.py class BaseHandler (line 9) | class BaseHandler(ABC): method __init__ (line 12) | def __init__(self, github: GitHubSource, llm_kwargs: Dict = None): method _get_search_params (line 17) | def _get_search_params(self, plugin_kwargs: Dict) -> Dict: method handle (line 27) | async def handle( method _search_repositories (line 39) | async def _search_repositories(self, query: str, language: str = None,... method _search_bilingual_repositories (line 64) | async def _search_bilingual_repositories(self, english_query: str, chi... method _search_code (line 112) | async def _search_code(self, query: str, language: str = None, per_pag... method _search_bilingual_code (line 132) | async def _search_bilingual_code(self, english_query: str, chinese_que... method _search_users (line 177) | async def _search_users(self, query: str, per_page: int = 30) -> List[... method _search_bilingual_users (line 192) | async def _search_bilingual_users(self, english_query: str, chinese_qu... method _search_topics (line 233) | async def _search_topics(self, query: str, per_page: int = 30) -> List... method _search_bilingual_topics (line 248) | async def _search_bilingual_topics(self, english_query: str, chinese_q... method _get_repo_details (line 290) | async def _get_repo_details(self, repos: List[Dict]) -> List[Dict]: method _format_repos (line 328) | def _format_repos(self, repos: List[Dict]) -> str: method _generate_apology_prompt (line 368) | def _generate_apology_prompt(self, criteria: SearchCriteria) -> str: method _get_current_time (line 383) | def _get_current_time(self) -> str: FILE: crazy_functions/paper_fns/auto_git/handlers/code_handler.py class CodeSearchHandler (line 6) | class CodeSearchHandler(BaseHandler): method __init__ (line 9) | def __init__(self, github, llm_kwargs=None): method handle (line 12) | async def handle( method _get_code_details (line 89) | async def _get_code_details(self, code_results: List[Dict]) -> List[Di... method _format_code_results (line 119) | def _format_code_results(self, code_results: List[Dict]) -> str: FILE: crazy_functions/paper_fns/auto_git/handlers/repo_handler.py class RepositoryHandler (line 6) | class RepositoryHandler(BaseHandler): method __init__ (line 9) | def __init__(self, github, llm_kwargs=None): method handle (line 12) | async def handle( method _build_repo_detail_prompt (line 113) | def _build_repo_detail_prompt(self, main_repo: Dict, similar_repos: Li... FILE: crazy_functions/paper_fns/auto_git/handlers/topic_handler.py class TopicHandler (line 6) | class TopicHandler(BaseHandler): method __init__ (line 9) | def __init__(self, github, llm_kwargs=None): method handle (line 12) | async def handle( method _format_topic_repos (line 172) | def _format_topic_repos(self, repos: List[Dict]) -> str: FILE: crazy_functions/paper_fns/auto_git/handlers/user_handler.py class UserSearchHandler (line 6) | class UserSearchHandler(BaseHandler): method __init__ (line 9) | def __init__(self, github, llm_kwargs=None): method handle (line 12) | async def handle( method _get_user_details (line 91) | async def _get_user_details(self, users: List[Dict]) -> List[Dict]: method _format_users (line 121) | def _format_users(self, users: List[Dict]) -> str: FILE: crazy_functions/paper_fns/auto_git/query_analyzer.py class SearchCriteria (line 6) | class SearchCriteria: class QueryAnalyzer (line 17) | class QueryAnalyzer: method __init__ (line 24) | def __init__(self): method analyze_query (line 32) | def analyze_query(self, query: str, chatbot: List, llm_kwargs: Dict): method _normalize_query_type (line 306) | def _normalize_query_type(self, query_type: str, query: str) -> str: method _extract_tag (line 325) | def _extract_tag(self, text: str, tag: str) -> str: FILE: crazy_functions/paper_fns/auto_git/sources/github_source.py class GitHubSource (line 9) | class GitHubSource: method __init__ (line 21) | def __init__(self, api_key: Optional[Union[str, List[str]]] = None): method _initialize (line 36) | def _initialize(self) -> None: method _request (line 53) | async def _request(self, method: str, endpoint: str, params: Dict = No... method get_user (line 98) | async def get_user(self, username: Optional[str] = None) -> Dict: method get_user_repos (line 110) | async def get_user_repos(self, username: Optional[str] = None, sort: s... method get_user_starred (line 133) | async def get_user_starred(self, username: Optional[str] = None, method get_repo (line 154) | async def get_repo(self, owner: str, repo: str) -> Dict: method get_repo_branches (line 167) | async def get_repo_branches(self, owner: str, repo: str, per_page: int... method get_repo_commits (line 186) | async def get_repo_commits(self, owner: str, repo: str, sha: Optional[... method get_commit_details (line 213) | async def get_commit_details(self, owner: str, repo: str, commit_sha: ... method get_file_content (line 229) | async def get_file_content(self, owner: str, repo: str, path: str, ref... method get_directory_content (line 257) | async def get_directory_content(self, owner: str, repo: str, path: str... method get_issues (line 279) | async def get_issues(self, owner: str, repo: str, state: str = "open", method get_issue (line 306) | async def get_issue(self, owner: str, repo: str, issue_number: int) ->... method get_issue_comments (line 320) | async def get_issue_comments(self, owner: str, repo: str, issue_number... method get_pull_requests (line 336) | async def get_pull_requests(self, owner: str, repo: str, state: str = ... method get_pull_request (line 363) | async def get_pull_request(self, owner: str, repo: str, pr_number: int... method get_pull_request_files (line 377) | async def get_pull_request_files(self, owner: str, repo: str, pr_numbe... method search_repositories (line 393) | async def search_repositories(self, query: str, sort: str = "stars", method search_code (line 417) | async def search_code(self, query: str, sort: str = "indexed", method search_issues (line 441) | async def search_issues(self, query: str, sort: str = "created", method search_users (line 465) | async def search_users(self, query: str, sort: str = "followers", method get_organization (line 491) | async def get_organization(self, org: str) -> Dict: method get_organization_repos (line 503) | async def get_organization_repos(self, org: str, type: str = "all", method get_organization_members (line 529) | async def get_organization_members(self, org: str, per_page: int = 30,... method get_repository_languages (line 549) | async def get_repository_languages(self, owner: str, repo: str) -> Dict: method get_repository_stats_contributors (line 562) | async def get_repository_stats_contributors(self, owner: str, repo: st... method get_repository_stats_commit_activity (line 575) | async def get_repository_stats_commit_activity(self, owner: str, repo:... function example_usage (line 588) | async def example_usage(): FILE: crazy_functions/paper_fns/document_structure_extractor.py class DocumentSection (line 17) | class DocumentSection: class StructuredDocument (line 28) | class StructuredDocument: class GenericDocumentStructureExtractor (line 37) | class GenericDocumentStructureExtractor: method __init__ (line 73) | def __init__(self): method _setup_logging (line 78) | def _setup_logging(self): method extract_document_structure (line 86) | def extract_document_structure(self, file_path: str, strategy: str = "... method _convert_paper_to_document (line 134) | def _convert_paper_to_document(self, paper: StructuredPaper) -> Struct... method _convert_paper_sections (line 163) | def _convert_paper_sections(self, paper_sections: List[PaperSection], ... method _extract_generic_structure (line 194) | def _extract_generic_structure(self, elements) -> StructuredDocument: method _build_section_hierarchy (line 306) | def _build_section_hierarchy(self, sections: List[DocumentSection]) ->... method _is_likely_heading (line 350) | def _is_likely_heading(self, text: str, element, index: int, elements)... method _estimate_heading_level (line 406) | def _estimate_heading_level(self, text: str, element) -> int: method _identify_section_type (line 460) | def _identify_section_type(self, title_text: str) -> str: method _has_sufficient_following_content (line 486) | def _has_sufficient_following_content(self, index: int, elements, min_... method _extract_content_between (line 509) | def _extract_content_between(self, elements, start_index: int, end_ind... method generate_markdown (line 528) | def generate_markdown(self, doc: StructuredDocument) -> str: method _format_sections_markdown (line 564) | def _format_sections_markdown(self, sections: List[DocumentSection], b... FILE: crazy_functions/paper_fns/file2file_doc/html_doc.py class HtmlFormatter (line 1) | class HtmlFormatter: method __init__ (line 4) | def __init__(self, processing_type="文本处理"): method _escape_html (line 162) | def _escape_html(self, text): method _markdown_to_html (line 167) | def _markdown_to_html(self, text): method create_document (line 262) | def create_document(self, content: str) -> str: FILE: crazy_functions/paper_fns/file2file_doc/markdown_doc.py class MarkdownFormatter (line 1) | class MarkdownFormatter: method __init__ (line 4) | def __init__(self): method _add_content (line 7) | def _add_content(self, text: str): method create_document (line 12) | def create_document(self, content: str, processing_type: str = "文本处理")... FILE: crazy_functions/paper_fns/file2file_doc/txt_doc.py function convert_markdown_to_txt (line 3) | def convert_markdown_to_txt(markdown_text): class TxtFormatter (line 35) | class TxtFormatter: method __init__ (line 38) | def __init__(self): method _setup_document (line 42) | def _setup_document(self): method _format_header (line 48) | def _format_header(self): method create_document (line 57) | def create_document(self, content): FILE: crazy_functions/paper_fns/file2file_doc/word2pdf.py class WordToPdfConverter (line 8) | class WordToPdfConverter: method convert_to_pdf (line 12) | def convert_to_pdf(word_path: Union[str, Path], pdf_path: Union[str, P... method batch_convert (line 59) | def batch_convert(word_dir: Union[str, Path], pdf_dir: Union[str, Path... method convert_doc_to_pdf (line 93) | def convert_doc_to_pdf(doc, output_dir: Union[str, Path] = None) -> str: FILE: crazy_functions/paper_fns/file2file_doc/word_doc.py function convert_markdown_to_word (line 9) | def convert_markdown_to_word(markdown_text): class WordFormatter (line 46) | class WordFormatter: method __init__ (line 49) | def __init__(self): method _setup_document (line 54) | def _setup_document(self): method _create_styles (line 79) | def _create_styles(self): method create_document (line 146) | def create_document(self, content: str, processing_type: str = "文本处理"): FILE: crazy_functions/paper_fns/github_search.py function GitHub项目智能检索 (line 30) | def GitHub项目智能检索(txt: str, llm_kwargs: Dict, plugin_kwargs: Dict, chatbo... FILE: crazy_functions/paper_fns/journal_paper_recom.py class RecommendationQuestion (line 19) | class RecommendationQuestion: class JournalConferenceRecommender (line 27) | class JournalConferenceRecommender: method __init__ (line 30) | def __init__(self, llm_kwargs: Dict, plugin_kwargs: Dict, chatbot: Lis... method _load_paper (line 71) | def _load_paper(self, paper_path: str) -> Generator: method _analyze_question (line 90) | def _analyze_question(self, question: RecommendationQuestion) -> Gener... method _generate_journal_recommendations (line 116) | def _generate_journal_recommendations(self) -> Generator: method _generate_conference_recommendations (line 186) | def _generate_conference_recommendations(self) -> Generator: method _generate_priority_summary (line 273) | def _generate_priority_summary(self, journal_recommendations: str, con... method save_recommendations (line 366) | def save_recommendations(self, journal_recommendations: str, conferenc... method recommend_venues (line 412) | def recommend_venues(self, paper_path: str) -> Generator: method _add_to_history (line 439) | def _add_to_history(self, journal_recommendations: str, conference_rec... function _find_paper_file (line 475) | def _find_paper_file(path: str) -> str: function download_paper_by_id (line 505) | def download_paper_by_id(paper_info, chatbot, history) -> str: function 论文期刊会议推荐 (line 575) | def 论文期刊会议推荐(txt: str, llm_kwargs: Dict, plugin_kwargs: Dict, chatbot: L... FILE: crazy_functions/paper_fns/paper_download.py function extract_paper_id (line 9) | def extract_paper_id(txt): function extract_paper_ids (line 45) | def extract_paper_ids(txt): function format_arxiv_id (line 74) | def format_arxiv_id(paper_id): function get_arxiv_paper (line 81) | def get_arxiv_paper(paper_id): function create_zip_archive (line 116) | def create_zip_archive(files, save_path): function 论文下载 (line 131) | def 论文下载(txt: str, llm_kwargs, plugin_kwargs, chatbot, history, system_p... function test (line 270) | async def test(): FILE: crazy_functions/paper_fns/reduce_aigc.py class TextFragment (line 28) | class TextFragment: class DocumentProcessor (line 35) | class DocumentProcessor: method __init__ (line 38) | def __init__(self, llm_kwargs: Dict, plugin_kwargs: Dict, chatbot: Lis... method _get_token_limit (line 54) | def _get_token_limit(self) -> int: method _create_batch_inputs (line 60) | def _create_batch_inputs(self, fragments: List[TextFragment], current_... method _extract_decision (line 135) | def _extract_decision(self, text: str) -> str: method process_file (line 147) | def process_file(self, file_path: str) -> Generator: method _process_structured_paper (line 171) | def _process_structured_paper(self, file_path: str) -> Generator: method _process_regular_file (line 420) | def _process_regular_file(self, file_path: str) -> Generator: method save_results (line 510) | def save_results(self, content: str, original_file_path: str) -> List[... method _breakdown_section_content (line 540) | def _breakdown_section_content(self, content: str) -> List[str]: method _process_text_fragments (line 621) | def _process_text_fragments(self, text_fragments: List[TextFragment], ... function 学术降重 (line 787) | def 学术降重(txt: str, llm_kwargs: Dict, plugin_kwargs: Dict, chatbot: List, FILE: crazy_functions/paper_fns/wiki/wikipedia_api.py class WikipediaAPI (line 8) | class WikipediaAPI: method __init__ (line 11) | def __init__(self, language: str = "zh", user_agent: str = None, method _make_request (line 34) | async def _make_request(self, url, params=None): method search (line 80) | async def search(self, query: str, limit: int = 10, namespace: int = 0... method get_page_content (line 109) | async def get_page_content(self, title: str, section: Optional[int] = ... method get_summary (line 144) | async def get_summary(self, title: str, sentences: int = 3) -> str: method get_random_articles (line 178) | async def get_random_articles(self, count: int = 1, namespace: int = 0... method login (line 206) | async def login(self, username: str, password: str) -> bool: method setup_oauth (line 257) | async def setup_oauth(self, consumer_token: str, consumer_secret: str, function example_usage (line 316) | async def example_usage(): FILE: crazy_functions/pdf_fns/breakdown_pdf_txt.py function force_breakdown (line 6) | def force_breakdown(txt, limit, get_token_fn): function maintain_storage (line 15) | def maintain_storage(remain_txt_to_cut, remain_txt_to_cut_storage): function cut (line 31) | def cut(limit, get_token_fn, txt_tocut, must_break_at_empty_line, break_... function breakdown_text_to_satisfy_token_limit_ (line 88) | def breakdown_text_to_satisfy_token_limit_(txt, limit, llm_model="gpt-3.... function cut_new (line 117) | def cut_new(limit, get_token_fn, txt_tocut, must_break_at_empty_line, mu... function breakdown_text_to_satisfy_token_limit_new_ (line 187) | def breakdown_text_to_satisfy_token_limit_new_(txt, limit, llm_model="gp... function cut_from_end_to_satisfy_token_limit_ (line 219) | def cut_from_end_to_satisfy_token_limit_(txt, limit, reserve_token=500, ... FILE: crazy_functions/pdf_fns/breakdown_txt.py function force_breakdown (line 4) | def force_breakdown(txt, limit, get_token_fn): function maintain_storage (line 13) | def maintain_storage(remain_txt_to_cut, remain_txt_to_cut_storage): function cut (line 29) | def cut(limit, get_token_fn, txt_tocut, must_break_at_empty_line, break_... function breakdown_text_to_satisfy_token_limit_ (line 86) | def breakdown_text_to_satisfy_token_limit_(txt, limit, llm_model="gpt-3.... FILE: crazy_functions/pdf_fns/parse_pdf.py class GROBID_OFFLINE_EXCEPTION (line 14) | class GROBID_OFFLINE_EXCEPTION(Exception): pass function get_avail_grobid_url (line 16) | def get_avail_grobid_url(): function parse_pdf (line 30) | def parse_pdf(pdf_path, grobid_url): function produce_report_markdown (line 43) | def produce_report_markdown(gpt_response_collection, meta, paper_meta_in... function translate_pdf (line 75) | def translate_pdf(article_dict, llm_kwargs, chatbot, fp, generated_concl... FILE: crazy_functions/pdf_fns/parse_pdf_grobid.py function 解析PDF_基于GROBID (line 7) | def 解析PDF_基于GROBID(file_manifest, project_folder, llm_kwargs, plugin_kwa... FILE: crazy_functions/pdf_fns/parse_pdf_legacy.py function 解析PDF_简单拆解 (line 11) | def 解析PDF_简单拆解(file_manifest, project_folder, llm_kwargs, plugin_kwargs,... FILE: crazy_functions/pdf_fns/parse_pdf_via_doc2x.py function retry_request (line 13) | def retry_request(max_retries=3, delay=3): function make_request (line 42) | def make_request(method, url, **kwargs): function doc2x_api_response_status (line 49) | def doc2x_api_response_status(response, uid=""): function 解析PDF_DOC2X_转Latex (line 75) | def 解析PDF_DOC2X_转Latex(pdf_file_path): function 解析PDF_DOC2X (line 80) | def 解析PDF_DOC2X(pdf_file_path, format="tex"): function 解析PDF_DOC2X_单文件 (line 209) | def 解析PDF_DOC2X_单文件( function 解析PDF_基于DOC2X (line 332) | def 解析PDF_基于DOC2X(file_manifest, *args): FILE: crazy_functions/pdf_fns/parse_word.py function extract_text_from_files (line 4) | def extract_text_from_files(txt, chatbot, history): FILE: crazy_functions/pdf_fns/report_gen_html.py class construct_html (line 7) | class construct_html(): method __init__ (line 8) | def __init__(self) -> None: method add_row (line 11) | def add_row(self, a, b): method save_file (line 51) | def save_file(self, file_name): FILE: crazy_functions/plugin_template/plugin_class_template.py class ArgProperty (line 6) | class ArgProperty(BaseModel): # PLUGIN_ARG_MENU class GptAcademicPluginTemplate (line 13) | class GptAcademicPluginTemplate(): method __init__ (line 14) | def __init__(self): method define_arg_selection_menu (line 21) | def define_arg_selection_menu(self): method get_js_code_for_generating_menu (line 40) | def get_js_code_for_generating_menu(self, btnName): method execute (line 51) | def execute(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_p... FILE: crazy_functions/rag_fns/llama_index_worker.py class SaveLoad (line 31) | class SaveLoad(): method does_checkpoint_exist (line 33) | def does_checkpoint_exist(self, checkpoint_dir=None): method save_to_checkpoint (line 40) | def save_to_checkpoint(self, checkpoint_dir=None): method load_from_checkpoint (line 45) | def load_from_checkpoint(self, checkpoint_dir=None): method create_new_vs (line 56) | def create_new_vs(self): method purge (line 59) | def purge(self): class LlamaIndexRagWorker (line 65) | class LlamaIndexRagWorker(SaveLoad): method __init__ (line 66) | def __init__(self, user_name, llm_kwargs, auto_load_checkpoint=True, c... method assign_embedding_model (line 77) | def assign_embedding_model(self): method inspect_vector_store (line 80) | def inspect_vector_store(self): method add_documents_to_vector_store (line 90) | def add_documents_to_vector_store(self, document_list: List[Document]): method add_text_to_vector_store (line 104) | def add_text_to_vector_store(self, text: str): method remember_qa (line 115) | def remember_qa(self, question, answer): method retrieve_from_store_with_query (line 119) | def retrieve_from_store_with_query(self, query): method build_prompt (line 125) | def build_prompt(self, query, nodes): method generate_node_array_preview (line 129) | def generate_node_array_preview(self, nodes): method purge_vector_store (line 134) | def purge_vector_store(self): FILE: crazy_functions/rag_fns/milvus_worker.py class MilvusSaveLoad (line 38) | class MilvusSaveLoad(): method does_checkpoint_exist (line 40) | def does_checkpoint_exist(self, checkpoint_dir=None): method save_to_checkpoint (line 47) | def save_to_checkpoint(self, checkpoint_dir=None): method load_from_checkpoint (line 52) | def load_from_checkpoint(self, checkpoint_dir=None): method create_new_vs (line 66) | def create_new_vs(self, checkpoint_dir, overwrite=False): method purge (line 76) | def purge(self): class MilvusRagWorker (line 79) | class MilvusRagWorker(MilvusSaveLoad, LlamaIndexRagWorker): method __init__ (line 81) | def __init__(self, user_name, llm_kwargs, auto_load_checkpoint=True, c... method inspect_vector_store (line 92) | def inspect_vector_store(self): FILE: crazy_functions/rag_fns/rag_file_support.py function convert_to_markdown (line 6) | def convert_to_markdown(file_path: str) -> str: function extract_text (line 32) | def extract_text(file_path): FILE: crazy_functions/rag_fns/vector_store_index.py class GptacVectorStoreIndex (line 15) | class GptacVectorStoreIndex(VectorStoreIndex): method default_vector_store (line 18) | def default_vector_store( FILE: crazy_functions/review_fns/conversation_doc/endnote_doc.py class EndNoteFormatter (line 4) | class EndNoteFormatter: method __init__ (line 7) | def __init__(self): method create_document (line 10) | def create_document(self, papers: List[PaperMetadata]) -> str: FILE: crazy_functions/review_fns/conversation_doc/excel_doc.py class ExcelTableFormatter (line 7) | class ExcelTableFormatter: method __init__ (line 10) | def __init__(self): method _normalize_table_row (line 17) | def _normalize_table_row(self, row): method _is_separator_row (line 26) | def _is_separator_row(self, row): method _extract_tables_from_text (line 31) | def _extract_tables_from_text(self, text): method _parse_table (line 66) | def _parse_table(self, table_lines): method _create_sheet (line 95) | def _create_sheet(self, question_num, table_num): method create_document (line 106) | def create_document(self, history): function save_chat_tables (line 147) | def save_chat_tables(history, save_dir, base_name): FILE: crazy_functions/review_fns/conversation_doc/html_doc.py class HtmlFormatter (line 1) | class HtmlFormatter: method __init__ (line 4) | def __init__(self): method create_document (line 134) | def create_document(self, question: str, answer: str, ranked_papers: l... FILE: crazy_functions/review_fns/conversation_doc/markdown_doc.py class MarkdownFormatter (line 1) | class MarkdownFormatter: method __init__ (line 4) | def __init__(self): method _add_content (line 7) | def _add_content(self, text: str): method create_document (line 12) | def create_document(self, question: str, answer: str, ranked_papers: l... FILE: crazy_functions/review_fns/conversation_doc/reference_formatter.py class ReferenceFormatter (line 5) | class ReferenceFormatter: method __init__ (line 8) | def __init__(self): method _sanitize_bibtex (line 11) | def _sanitize_bibtex(self, text: str) -> str: method _generate_cite_key (line 41) | def _generate_cite_key(self, paper: PaperMetadata) -> str: method _get_entry_type (line 73) | def _get_entry_type(self, paper: PaperMetadata) -> str: method create_document (line 90) | def create_document(self, papers: List[PaperMetadata]) -> str: FILE: crazy_functions/review_fns/conversation_doc/word2pdf.py class WordToPdfConverter (line 8) | class WordToPdfConverter: method _replace_docx_in_filename (line 12) | def _replace_docx_in_filename(filename: Union[str, Path]) -> Path: method convert_to_pdf (line 22) | def convert_to_pdf(word_path: Union[str, Path], pdf_path: Union[str, P... method batch_convert (line 68) | def batch_convert(word_dir: Union[str, Path], pdf_dir: Union[str, Path... method convert_doc_to_pdf (line 106) | def convert_doc_to_pdf(doc, output_dir: Union[str, Path] = None) -> str: FILE: crazy_functions/review_fns/conversation_doc/word_doc.py class WordFormatter (line 13) | class WordFormatter: method __init__ (line 16) | def __init__(self): method _setup_document (line 21) | def _setup_document(self): method _create_styles (line 46) | def _create_styles(self): method create_document (line 109) | def create_document(self, question: str, answer: str, ranked_papers: l... method _create_hyperlink_style (line 208) | def _create_hyperlink_style(self): method _add_hyperlink (line 218) | def _add_hyperlink(self, paragraph, text, url): FILE: crazy_functions/review_fns/data_sources/adsabs_source.py class AdsabsSource (line 10) | class AdsabsSource(DataSource): method __init__ (line 20) | def __init__(self, api_key: str = None): method _initialize (line 29) | def _initialize(self) -> None: method _make_request (line 37) | async def _make_request(self, url: str, method: str = "GET", data: dic... method _parse_paper (line 63) | def _parse_paper(self, doc: dict) -> PaperMetadata: method search (line 96) | async def search( method _build_query_string (line 153) | def _build_query_string(self, params: dict) -> str: method get_paper_details (line 157) | async def get_paper_details(self, bibcode: str) -> Optional[PaperMetad... method get_related_papers (line 170) | async def get_related_papers(self, bibcode: str, limit: int = 100) -> ... method search_by_author (line 190) | async def search_by_author( method search_by_journal (line 200) | async def search_by_journal( method get_latest_papers (line 210) | async def get_latest_papers( method get_citations (line 219) | async def get_citations(self, bibcode: str) -> List[PaperMetadata]: method get_references (line 238) | async def get_references(self, bibcode: str) -> List[PaperMetadata]: function example_usage (line 257) | async def example_usage(): FILE: crazy_functions/review_fns/data_sources/arxiv_source.py class ArxivSource (line 10) | class ArxivSource(DataSource): method __init__ (line 164) | def __init__(self): method _initialize (line 182) | def _initialize(self) -> None: method search (line 186) | async def search( method search_by_id (line 221) | async def search_by_id(self, paper_id: Union[str, List[str]]) -> List[... method search_by_category (line 237) | async def search_by_category( method search_by_authors (line 259) | async def search_by_authors( method search_by_date_range (line 279) | async def search_by_date_range( method download_pdf (line 296) | async def download_pdf(self, paper_id: str, dirpath: str = "./", filen... method download_source (line 321) | async def download_source(self, paper_id: str, dirpath: str = "./", fi... method get_citations (line 346) | async def get_citations(self, paper_id: str) -> List[PaperMetadata]: method get_references (line 350) | async def get_references(self, paper_id: str) -> List[PaperMetadata]: method get_paper_details (line 354) | async def get_paper_details(self, paper_id: str) -> Optional[PaperMeta... method _parse_paper_data (line 377) | def _parse_paper_data(self, result: arxiv.Result) -> PaperMetadata: method get_latest_papers (line 407) | async def get_latest_papers( function example_usage (line 507) | async def example_usage(): FILE: crazy_functions/review_fns/data_sources/base_source.py class PaperMetadata (line 5) | class PaperMetadata: method __init__ (line 7) | def __init__( method if_factor (line 43) | def if_factor(self) -> Optional[float]: method if_factor (line 48) | def if_factor(self, value: float): method cas_division (line 53) | def cas_division(self) -> Optional[str]: method cas_division (line 58) | def cas_division(self, value: str): method jcr_division (line 63) | def jcr_division(self) -> Optional[str]: method jcr_division (line 68) | def jcr_division(self, value: str): class DataSource (line 72) | class DataSource(ABC): method __init__ (line 75) | def __init__(self, api_key: Optional[str] = None): method _initialize (line 80) | def _initialize(self) -> None: method search (line 85) | async def search(self, query: str, limit: int = 100) -> List[PaperMeta... method get_paper_details (line 90) | async def get_paper_details(self, paper_id: str) -> PaperMetadata: method get_citations (line 95) | async def get_citations(self, paper_id: str) -> List[PaperMetadata]: method get_references (line 100) | async def get_references(self, paper_id: str) -> List[PaperMetadata]: FILE: crazy_functions/review_fns/data_sources/crossref_source.py class CrossrefSource (line 7) | class CrossrefSource(DataSource): method _initialize (line 16) | def _initialize(self) -> None: method search (line 28) | async def search( method get_paper_details (line 99) | async def get_paper_details(self, doi: str) -> PaperMetadata: method get_references (line 124) | async def get_references(self, doi: str) -> List[PaperMetadata]: method get_citations (line 165) | async def get_citations(self, doi: str) -> List[PaperMetadata]: method _parse_work (line 193) | def _parse_work(self, work: Dict) -> PaperMetadata: method search_by_authors (line 244) | async def search_by_authors( method search_by_date_range (line 260) | async def search_by_date_range( function example_usage (line 277) | async def example_usage(): FILE: crazy_functions/review_fns/data_sources/elsevier_source.py class ElsevierSource (line 10) | class ElsevierSource(DataSource): method __init__ (line 19) | def __init__(self, api_key: str = None): method _initialize (line 28) | def _initialize(self) -> None: method _make_request (line 39) | async def _make_request(self, url: str, params: Dict = None) -> Option... method search (line 73) | async def search( method _parse_entry (line 124) | def _parse_entry(self, entry: Dict) -> Optional[PaperMetadata]: method get_citations (line 166) | async def get_citations(self, doi: str, limit: int = 100) -> List[Pape... method get_references (line 190) | async def get_references(self, doi: str) -> List[PaperMetadata]: method _parse_reference (line 209) | def _parse_reference(self, ref: Dict) -> Optional[PaperMetadata]: method search_by_author (line 247) | async def search_by_author( method search_by_affiliation (line 257) | async def search_by_affiliation( method search_by_venue (line 267) | async def search_by_venue( method test_api_access (line 277) | async def test_api_access(self): method get_paper_details (line 308) | async def get_paper_details(self, paper_id: str) -> Optional[PaperMeta... method fetch_abstract (line 321) | async def fetch_abstract(self, doi: str) -> Optional[str]: function example_usage (line 352) | async def example_usage(): FILE: crazy_functions/review_fns/data_sources/github_source.py class GitHubSource (line 9) | class GitHubSource: method __init__ (line 18) | def __init__(self, api_key: Optional[Union[str, List[str]]] = None): method _initialize (line 33) | def _initialize(self) -> None: method _request (line 50) | async def _request(self, method: str, endpoint: str, params: Dict = No... method get_user (line 95) | async def get_user(self, username: Optional[str] = None) -> Dict: method get_user_repos (line 107) | async def get_user_repos(self, username: Optional[str] = None, sort: s... method get_user_starred (line 130) | async def get_user_starred(self, username: Optional[str] = None, method get_repo (line 151) | async def get_repo(self, owner: str, repo: str) -> Dict: method get_repo_branches (line 164) | async def get_repo_branches(self, owner: str, repo: str, per_page: int... method get_repo_commits (line 183) | async def get_repo_commits(self, owner: str, repo: str, sha: Optional[... method get_commit_details (line 210) | async def get_commit_details(self, owner: str, repo: str, commit_sha: ... method get_file_content (line 226) | async def get_file_content(self, owner: str, repo: str, path: str, ref... method get_directory_content (line 254) | async def get_directory_content(self, owner: str, repo: str, path: str... method get_issues (line 276) | async def get_issues(self, owner: str, repo: str, state: str = "open", method get_issue (line 303) | async def get_issue(self, owner: str, repo: str, issue_number: int) ->... method get_issue_comments (line 317) | async def get_issue_comments(self, owner: str, repo: str, issue_number... method get_pull_requests (line 333) | async def get_pull_requests(self, owner: str, repo: str, state: str = ... method get_pull_request (line 360) | async def get_pull_request(self, owner: str, repo: str, pr_number: int... method get_pull_request_files (line 374) | async def get_pull_request_files(self, owner: str, repo: str, pr_numbe... method search_repositories (line 390) | async def search_repositories(self, query: str, sort: str = "stars", method search_code (line 414) | async def search_code(self, query: str, sort: str = "indexed", method search_issues (line 438) | async def search_issues(self, query: str, sort: str = "created", method search_users (line 462) | async def search_users(self, query: str, sort: str = "followers", method get_organization (line 488) | async def get_organization(self, org: str) -> Dict: method get_organization_repos (line 500) | async def get_organization_repos(self, org: str, type: str = "all", method get_organization_members (line 526) | async def get_organization_members(self, org: str, per_page: int = 30,... method get_repository_languages (line 546) | async def get_repository_languages(self, owner: str, repo: str) -> Dict: method get_repository_stats_contributors (line 559) | async def get_repository_stats_contributors(self, owner: str, repo: st... method get_repository_stats_commit_activity (line 572) | async def get_repository_stats_commit_activity(self, owner: str, repo:... function example_usage (line 585) | async def example_usage(): FILE: crazy_functions/review_fns/data_sources/journal_metrics.py class JournalMetrics (line 5) | class JournalMetrics: method __init__ (line 8) | def __init__(self): method _normalize_journal_name (line 14) | def _normalize_journal_name(self, name: str) -> str: method _convert_if_value (line 49) | def _convert_if_value(self, if_str: str) -> Optional[float]: method _load_journal_data (line 59) | def _load_journal_data(self): method get_journal_metrics (line 99) | def get_journal_metrics(self, venue_name: str, venue_info: dict) -> dict: FILE: crazy_functions/review_fns/data_sources/openalex_source.py class OpenAlexSource (line 8) | class OpenAlexSource(DataSource): method _initialize (line 11) | def _initialize(self) -> None: method search (line 15) | async def search(self, query: str, limit: int = 100) -> List[PaperMeta... method _parse_work (line 36) | def _parse_work(self, work: Dict) -> PaperMetadata: method _reformat_name (line 78) | def _reformat_name(self, name: str) -> str: method get_paper_details (line 85) | async def get_paper_details(self, doi: str) -> PaperMetadata: method get_references (line 96) | async def get_references(self, doi: str) -> List[PaperMetadata]: method get_citations (line 107) | async def get_citations(self, doi: str) -> List[PaperMetadata]: function example_usage (line 123) | async def example_usage(): FILE: crazy_functions/review_fns/data_sources/pubmed_source.py class PubMedSource (line 12) | class PubMedSource(DataSource): method __init__ (line 22) | def __init__(self, api_key: str = None): method _initialize (line 31) | def _initialize(self) -> None: method _make_request (line 39) | async def _make_request(self, url: str) -> Optional[str]: method search (line 60) | async def search( method _fetch_papers_batch (line 120) | async def _fetch_papers_batch(self, pmids: List[str]) -> List[PaperMet... method _parse_article (line 151) | def _parse_article(self, article: ET.Element) -> PaperMetadata: method get_paper_details (line 237) | async def get_paper_details(self, pmid: str) -> Optional[PaperMetadata]: method get_related_papers (line 242) | async def get_related_papers(self, pmid: str, limit: int = 100) -> Lis... method search_by_author (line 280) | async def search_by_author( method search_by_journal (line 292) | async def search_by_journal( method get_latest_papers (line 304) | async def get_latest_papers( method get_citations (line 321) | async def get_citations(self, paper_id: str) -> List[PaperMetadata]: method get_references (line 335) | async def get_references(self, paper_id: str) -> List[PaperMetadata]: function example_usage (line 374) | async def example_usage(): FILE: crazy_functions/review_fns/data_sources/scihub_source.py class SciHub (line 10) | class SciHub: method __init__ (line 35) | def __init__(self, doi: str, path: Path, url=None, timeout=60, use_pro... method _test_proxy_connection (line 53) | def _test_proxy_connection(self): method _check_pdf_validity (line 73) | def _check_pdf_validity(self, content): method _send_request (line 85) | def _send_request(self): method _extract_url (line 144) | def _extract_url(self, response): method _download_pdf (line 181) | def _download_pdf(self, pdf_url): method fetch (line 259) | def fetch(self): FILE: crazy_functions/review_fns/data_sources/scopus_source.py class ScopusSource (line 8) | class ScopusSource(DataSource): method __init__ (line 17) | def __init__(self, api_key: str = None): method _initialize (line 26) | def _initialize(self) -> None: method _make_request (line 34) | async def _make_request(self, url: str, params: Dict = None) -> Option... method _parse_paper_data (line 56) | def _parse_paper_data(self, data: Dict) -> PaperMetadata: method search (line 150) | async def search( method get_paper_details (line 212) | async def get_paper_details(self, paper_id: str) -> Optional[PaperMeta... method get_citations (line 240) | async def get_citations(self, paper_id: str) -> List[PaperMetadata]: method get_references (line 270) | async def get_references(self, paper_id: str) -> List[PaperMetadata]: method search_by_author (line 300) | async def search_by_author( method search_by_journal (line 312) | async def search_by_journal( method get_latest_papers (line 324) | async def get_latest_papers( function example_usage (line 333) | async def example_usage(): FILE: crazy_functions/review_fns/data_sources/semantic_source.py class SemanticScholarSource (line 6) | class SemanticScholarSource(DataSource): method __init__ (line 9) | def __init__(self, api_key: str = None): method _initialize (line 18) | def _initialize(self) -> None: method _ensure_client (line 41) | async def _ensure_client(self): method search (line 47) | async def search( method get_paper_details (line 75) | async def get_paper_details(self, doi: str) -> Optional[PaperMetadata]: method get_citations (line 85) | async def get_citations( method get_references (line 111) | async def get_references( method get_recommended_papers (line 137) | async def get_recommended_papers(self, doi: str, limit: int = 100) -> ... method get_recommended_papers_from_lists (line 161) | async def get_recommended_papers_from_lists( method search_author (line 193) | async def search_author(self, query: str, limit: int = 100) -> List[di... method get_author_details (line 217) | async def get_author_details(self, author_id: str) -> Optional[dict]: method get_author_papers (line 238) | async def get_author_papers(self, author_id: str, limit: int = 100) ->... method get_paper_autocomplete (line 254) | async def get_paper_autocomplete(self, query: str) -> List[dict]: method _parse_paper_data (line 278) | def _parse_paper_data(self, paper) -> PaperMetadata: function example_usage (line 363) | async def example_usage(): FILE: crazy_functions/review_fns/data_sources/unpaywall_source.py class UnpaywallSource (line 6) | class UnpaywallSource(DataSource): method _initialize (line 9) | def _initialize(self) -> None: method search (line 13) | async def search(self, query: str, limit: int = 100) -> List[PaperMeta... method _parse_response (line 27) | def _parse_response(self, data: Dict) -> PaperMetadata: FILE: crazy_functions/review_fns/handlers/base_handler.py class BaseHandler (line 17) | class BaseHandler(ABC): method __init__ (line 20) | def __init__(self, arxiv: ArxivSource, semantic: SemanticScholarSource... method _get_search_params (line 30) | def _get_search_params(self, plugin_kwargs: Dict) -> Dict: method handle (line 39) | async def handle( method _search_arxiv (line 51) | async def _search_arxiv(self, params: Dict, limit_multiplier: int = 1,... method _search_semantic (line 88) | async def _search_semantic(self, params: Dict, limit_multiplier: int =... method _search_pubmed (line 110) | async def _search_pubmed(self, params: Dict, limit_multiplier: int = 1... method _search_crossref (line 147) | async def _search_crossref(self, params: Dict, limit_multiplier: int =... method _search_adsabs (line 177) | async def _search_adsabs(self, params: Dict, limit_multiplier: int = 1... method _search_all_sources (line 198) | async def _search_all_sources(self, criteria: SearchCriteria, search_p... method _format_paper_time (line 283) | def _format_paper_time(self, paper) -> str: method _format_papers (line 295) | def _format_papers(self, papers: List) -> str: method _get_current_time (line 387) | def _get_current_time(self) -> str: method _generate_apology_prompt (line 392) | def _generate_apology_prompt(self, criteria: SearchCriteria) -> str: method get_ranked_papers (line 406) | def get_ranked_papers(self) -> str: method _is_pubmed_paper (line 410) | def _is_pubmed_paper(self, paper) -> bool: FILE: crazy_functions/review_fns/handlers/latest_handler.py class Arxiv最新论文推荐功能 (line 6) | class Arxiv最新论文推荐功能(BaseHandler): method __init__ (line 9) | def __init__(self, arxiv, semantic, llm_kwargs=None): method handle (line 12) | async def handle( FILE: crazy_functions/review_fns/handlers/paper_handler.py class 单篇论文分析功能 (line 7) | class 单篇论文分析功能(BaseHandler): method __init__ (line 10) | def __init__(self, arxiv, semantic, llm_kwargs=None): method handle (line 13) | async def handle( method _get_paper_details (line 121) | async def _get_paper_details(self, criteria: SearchCriteria): method _get_citation_context (line 202) | async def _get_citation_context(self, paper: Dict, plugin_kwargs: Dict... method _generate_analysis (line 235) | async def _generate_analysis( method _get_technical_prompt (line 328) | def _get_technical_prompt(self, paper: Dict) -> str: FILE: crazy_functions/review_fns/handlers/qa_handler.py class 学术问答功能 (line 7) | class 学术问答功能(BaseHandler): method __init__ (line 10) | def __init__(self, arxiv, semantic, llm_kwargs=None): method handle (line 13) | async def handle( method _search_relevant_papers (line 83) | async def _search_relevant_papers(self, criteria: SearchCriteria, sear... method _generate_answer (line 100) | async def _generate_answer( FILE: crazy_functions/review_fns/handlers/recommend_handler.py class 论文推荐功能 (line 7) | class 论文推荐功能(BaseHandler): method __init__ (line 10) | def __init__(self, arxiv, semantic, llm_kwargs=None): method handle (line 13) | async def handle( method _search_seed_papers (line 114) | async def _search_seed_papers(self, criteria: SearchCriteria, search_p... method _get_recommendations (line 129) | async def _get_recommendations(self, seed_papers: List, multiplier: in... FILE: crazy_functions/review_fns/handlers/review_handler.py class 文献综述功能 (line 6) | class 文献综述功能(BaseHandler): method __init__ (line 9) | def __init__(self, arxiv, semantic, llm_kwargs=None): method handle (line 12) | async def handle( method _generate_medical_review_prompt (line 51) | def _generate_medical_review_prompt(self, criteria: SearchCriteria) ->... method _generate_general_review_prompt (line 123) | def _generate_general_review_prompt(self, criteria: SearchCriteria) ->... FILE: crazy_functions/review_fns/paper_processor/paper_llm_ranker.py class PaperLLMRanker (line 8) | class PaperLLMRanker: method __init__ (line 11) | def __init__(self, llm_kwargs: Dict = None): method _update_paper_metrics (line 15) | def _update_paper_metrics(self, papers: List[PaperMetadata]) -> None: method _get_year_as_int (line 35) | def _get_year_as_int(self, paper) -> int: method rank_papers (line 87) | def rank_papers( method _build_enhanced_query (line 251) | def _build_enhanced_query(self, query: str, criteria: SearchCriteria) ... method _build_enhanced_document (line 284) | def _build_enhanced_document(self, paper: PaperMetadata, criteria: Sea... method _select_papers_strategically (line 330) | def _select_papers_strategically( FILE: crazy_functions/review_fns/query_analyzer.py class SearchCriteria (line 9) | class SearchCriteria: class QueryAnalyzer (line 27) | class QueryAnalyzer: method __init__ (line 44) | def __init__(self): method analyze_query (line 53) | def analyze_query(self, query: str, chatbot: List, llm_kwargs: Dict): method _normalize_query_type (line 400) | def _normalize_query_type(self, query_type: str, query: str) -> str: method _extract_tag (line 419) | def _extract_tag(self, text: str, tag: str) -> str: FILE: crazy_functions/review_fns/query_processor.py class QueryProcessor (line 10) | class QueryProcessor: method __init__ (line 13) | def __init__(self): method process_query (line 26) | async def process_query( FILE: crazy_functions/vector_fns/general_file_loader.py class ChineseTextSplitter (line 9) | class ChineseTextSplitter(CharacterTextSplitter): method __init__ (line 10) | def __init__(self, pdf: bool = False, sentence_size: int = None, **kwa... method split_text1 (line 15) | def split_text1(self, text: str) -> List[str]: method split_text (line 29) | def split_text(self, text: str) -> List[str]: ##此处需要进一步优化逻辑 function load_file (line 64) | def load_file(filepath, sentence_size): FILE: crazy_functions/vector_fns/vector_database.py function similarity_search_with_score_by_vector (line 59) | def similarity_search_with_score_by_vector( class LocalDocQA (line 130) | class LocalDocQA: method init_cfg (line 138) | def init_cfg(self, method init_knowledge_vector_store (line 145) | def init_knowledge_vector_store(self, method get_loaded_file (line 205) | def get_loaded_file(self, vs_path): method get_knowledge_based_content_test (line 216) | def get_knowledge_based_content_test(self, query, vs_path, chunk_content, function construct_vector_store (line 244) | def construct_vector_store(vs_id, vs_path, files, sentence_size, history... class knowledge_archive_interface (line 270) | class knowledge_archive_interface(): method __init__ (line 271) | def __init__(self) -> None: method get_chinese_text2vec (line 278) | def get_chinese_text2vec(self): method feed_archive (line 290) | def feed_archive(self, file_manifest, vs_path, id="default"): method get_current_archive_id (line 306) | def get_current_archive_id(self): method get_loaded_file (line 309) | def get_loaded_file(self, vs_path): method answer_with_archive_by_id (line 312) | def answer_with_archive_by_id(self, txt, id, vs_path): FILE: crazy_functions/vt_fns/vt_call_plugin.py function read_avail_plugin_enum (line 9) | def read_avail_plugin_enum(): function wrap_code (line 22) | def wrap_code(txt): function have_any_recent_upload_files (line 26) | def have_any_recent_upload_files(chatbot): function get_recent_file_prompt_support (line 34) | def get_recent_file_prompt_support(chatbot): function get_inputs_show_user (line 43) | def get_inputs_show_user(inputs, plugin_arr_enum_prompt): function execute_plugin (line 52) | def execute_plugin(txt, llm_kwargs, plugin_kwargs, chatbot, history, sys... FILE: crazy_functions/vt_fns/vt_modify_config.py function modify_configuration_hot (line 9) | def modify_configuration_hot(txt, llm_kwargs, plugin_kwargs, chatbot, hi... function modify_configuration_reboot (line 68) | def modify_configuration_reboot(txt, llm_kwargs, plugin_kwargs, chatbot,... FILE: crazy_functions/vt_fns/vt_state.py class VoidTerminalState (line 3) | class VoidTerminalState(): method __init__ (line 4) | def __init__(self): method reset_state (line 7) | def reset_state(self): method lock_plugin (line 10) | def lock_plugin(self, chatbot): method unlock_plugin (line 14) | def unlock_plugin(self, chatbot): method set_state (line 19) | def set_state(self, chatbot, key, value): method get_state (line 23) | def get_state(chatbot): FILE: crazy_functions/word_dfa/dfa_algo.py class Term (line 2611) | class Term: method __str__ (line 2616) | def __str__(self): class DFA (line 2619) | class DFA: method __init__ (line 2620) | def __init__(self): method build_dfa (line 2624) | def build_dfa(self): method is_at_word_end (line 2654) | def is_at_word_end(self, text, j): method search (line 2669) | def search(self, text): function main (line 2689) | def main(): FILE: crazy_functions/高级功能函数模板.py function 高阶功能模板函数 (line 33) | def 高阶功能模板函数(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_pr... class Demo_Wrap (line 74) | class Demo_Wrap(GptAcademicPluginTemplate): method __init__ (line 75) | def __init__(self): method define_arg_selection_menu (line 81) | def define_arg_selection_menu(self): method execute (line 91) | def execute(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_p... function 测试图表渲染 (line 128) | def 测试图表渲染(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_prom... FILE: docs/javascripts/animations.js function initScrollAnimations (line 35) | function initScrollAnimations() { function initImageAnimations (line 67) | function initImageAnimations() { function addCodeLanguageBadges (line 96) | function addCodeLanguageBadges() { function initCopyButtonAnimations (line 123) | function initCopyButtonAnimations() { function initSmoothScroll (line 155) | function initSmoothScroll() { function handleReducedMotion (line 187) | function handleReducedMotion() { function enhanceTabSwitching (line 216) | function enhanceTabSwitching() { function enhanceDetails (line 244) | function enhanceDetails() { function enhanceNavigation (line 267) | function enhanceNavigation() { function debounce (line 296) | function debounce(func, wait) { function initScrollProgress (line 315) | function initScrollProgress() { function init (line 356) | function init() { FILE: docs/javascripts/code-copy.js function initCodeCopyButtons (line 9) | function initCodeCopyButtons() { function fallbackCopyTextToClipboard (line 124) | function fallbackCopyTextToClipboard(text, button) { function showCopiedState (line 146) | function showCopiedState(button) { FILE: docs/javascripts/nav-scroll-fix.js function getSidebar (line 25) | function getSidebar() { function setScrollTopInstant (line 38) | function setScrollTopInstant(sidebar, position) { function saveSidebarScroll (line 56) | function saveSidebarScroll() { function restoreSidebarScroll (line 74) | function restoreSidebarScroll() { function init (line 103) | function init() { FILE: docs/javascripts/responsive.js function initMobileNav (line 19) | function initMobileNav() { function toggleMobileNav (line 71) | function toggleMobileNav() { function closeMobileNav (line 90) | function closeMobileNav() { function initTableScroll (line 111) | function initTableScroll() { function updateTableScrollState (line 140) | function updateTableScrollState(wrapper) { function initTouchOptimization (line 160) | function initTouchOptimization() { function initViewportFix (line 187) | function initViewportFix() { function initScrollProgress (line 206) | function initScrollProgress() { function initScrollToTop (line 232) | function initScrollToTop() { function initResponsiveImages (line 268) | function initResponsiveImages() { function debounce (line 300) | function debounce(func, wait) { function throttle (line 312) | function throttle(func, limit) { function init (line 331) | function init() { FILE: docs/javascripts/tabbed-code.js function initTabbedSets (line 9) | function initTabbedSets() { function addCopyButtonToTabbedSet (line 76) | function addCopyButtonToTabbedSet(tabbedSet) { function fallbackCopyTextToClipboard (line 127) | function fallbackCopyTextToClipboard(text, button) { function showCopiedState (line 149) | function showCopiedState(button) { FILE: main.py function enable_log (line 17) | def enable_log(PATH_LOGGING): function encode_plugin_info (line 21) | def encode_plugin_info(k, plugin)->str: function main (line 35) | def main(): FILE: multi_language.py function lru_file_cache (line 59) | def lru_file_cache(maxsize=128, ttl=None, filename=None): function contains_chinese (line 127) | def contains_chinese(string): function split_list (line 134) | def split_list(lst, n_each_req): function map_to_json (line 146) | def map_to_json(map, language): function read_map_from_json (line 152) | def read_map_from_json(language): function advanced_split (line 160) | def advanced_split(splitted_string, spliter, include_spliter=False): function trans (line 182) | def trans(word_to_translate, language, special=False): function trans_json (line 245) | def trans_json(word_to_translate, language, special=False): function step_1_core_key_translate (line 295) | def step_1_core_key_translate(): function step_2_core_key_translate (line 390) | def step_2_core_key_translate(): FILE: request_llms/bridge_all.py class LazyloadTiktoken (line 51) | class LazyloadTiktoken(object): method __init__ (line 52) | def __init__(self, model): method get_encoder (line 57) | def get_encoder(model): method encode (line 63) | def encode(self, *args, **kwargs): method decode (line 67) | def decode(self, *args, **kwargs): function LLM_CATCH_EXCEPTION (line 1428) | def LLM_CATCH_EXCEPTION(f): function predict_no_ui_long_connection (line 1442) | def predict_no_ui_long_connection(inputs:str, llm_kwargs:dict, history:l... function execute_model_override (line 1524) | def execute_model_override(llm_kwargs, additional_fn, method): function predict (line 1539) | def predict(inputs:str, llm_kwargs:dict, plugin_kwargs:dict, chatbot, FILE: request_llms/bridge_chatglm.py class GetGLM2Handle (line 13) | class GetGLM2Handle(LocalLLMHandle): method load_model_info (line 15) | def load_model_info(self): method load_model_and_tokenizer (line 20) | def load_model_and_tokenizer(self): method llm_stream_generator (line 47) | def llm_stream_generator(self, **kwargs): method try_to_import_special_deps (line 68) | def try_to_import_special_deps(self, **kwargs): FILE: request_llms/bridge_chatglm3.py class GetGLM3Handle (line 12) | class GetGLM3Handle(LocalLLMHandle): method load_model_info (line 14) | def load_model_info(self): method load_model_and_tokenizer (line 19) | def load_model_and_tokenizer(self): method llm_stream_generator (line 62) | def llm_stream_generator(self, **kwargs): method try_to_import_special_deps (line 84) | def try_to_import_special_deps(self, **kwargs): FILE: request_llms/bridge_chatglm4.py class GetGLM4Handle (line 16) | class GetGLM4Handle(LocalLLMHandle): method load_model_info (line 18) | def load_model_info(self): method load_model_and_tokenizer (line 23) | def load_model_and_tokenizer(self): method llm_stream_generator (line 44) | def llm_stream_generator(self, **kwargs): method try_to_import_special_deps (line 68) | def try_to_import_special_deps(self, **kwargs): FILE: request_llms/bridge_chatglmft.py function string_to_options (line 14) | def string_to_options(arguments): class GetGLMFTHandle (line 30) | class GetGLMFTHandle(Process): method __init__ (line 31) | def __init__(self): method check_dependency (line 42) | def check_dependency(self): method ready (line 51) | def ready(self): method run (line 54) | def run(self): method stream_chat (line 126) | def stream_chat(self, **kwargs): function predict_no_ui_long_connection (line 141) | def predict_no_ui_long_connection(inputs:str, llm_kwargs:dict, history:l... function predict (line 173) | def predict(inputs, llm_kwargs, plugin_kwargs, chatbot, history=[], syst... FILE: request_llms/bridge_chatglmonnx.py class GetONNXGLMHandle (line 20) | class GetONNXGLMHandle(LocalLLMHandle): method load_model_info (line 22) | def load_model_info(self): method load_model_and_tokenizer (line 27) | def load_model_and_tokenizer(self): method llm_stream_generator (line 41) | def llm_stream_generator(self, **kwargs): method try_to_import_special_deps (line 63) | def try_to_import_special_deps(self, **kwargs): FILE: request_llms/bridge_chatgpt.py function get_full_error (line 37) | def get_full_error(chunk, stream_response): function make_multimodal_input (line 48) | def make_multimodal_input(inputs, image_paths): function reverse_base64_from_input (line 57) | def reverse_base64_from_input(inputs): function contain_base64 (line 66) | def contain_base64(inputs): function append_image_if_contain_base64 (line 70) | def append_image_if_contain_base64(inputs): function remove_image_if_contain_base64 (line 91) | def remove_image_if_contain_base64(inputs): function decode_chunk (line 99) | def decode_chunk(chunk): function verify_endpoint (line 120) | def verify_endpoint(endpoint): function predict_no_ui_long_connection (line 128) | def predict_no_ui_long_connection(inputs:str, llm_kwargs:dict, history:l... function predict (line 226) | def predict(inputs:str, llm_kwargs:dict, plugin_kwargs:dict, chatbot:Cha... function handle_o1_model_special (line 408) | def handle_o1_model_special(response, inputs, llm_kwargs, chatbot, histo... function handle_error (line 419) | def handle_error(inputs, llm_kwargs, chatbot, history, chunk_decoded, er... function generate_payload (line 449) | def generate_payload(inputs:str, llm_kwargs:dict, history:list, system_p... FILE: request_llms/bridge_chatgpt_vision.py function report_invalid_key (line 29) | def report_invalid_key(key): function get_full_error (line 33) | def get_full_error(chunk, stream_response): function decode_chunk (line 44) | def decode_chunk(chunk): function verify_endpoint (line 64) | def verify_endpoint(endpoint): function predict_no_ui_long_connection (line 70) | def predict_no_ui_long_connection(inputs, llm_kwargs, history=[], sys_pr... function predict (line 74) | def predict(inputs, llm_kwargs, plugin_kwargs, chatbot, history=[], syst... function handle_error (line 215) | def handle_error(inputs, llm_kwargs, chatbot, history, chunk_decoded, er... function generate_payload (line 246) | def generate_payload(inputs, llm_kwargs, history, system_prompt, image_p... FILE: request_llms/bridge_claude.py function get_full_error (line 32) | def get_full_error(chunk, stream_response): function decode_chunk (line 43) | def decode_chunk(chunk): function predict_no_ui_long_connection (line 72) | def predict_no_ui_long_connection(inputs, llm_kwargs, history=[], sys_pr... function make_media_input (line 142) | def make_media_input(history,inputs,image_paths): function predict (line 147) | def predict(inputs, llm_kwargs, plugin_kwargs, chatbot, history=[], syst... function multiple_picture_types (line 236) | def multiple_picture_types(image_paths): function generate_payload (line 251) | def generate_payload(inputs, llm_kwargs, history, system_prompt, image_p... FILE: request_llms/bridge_cohere.py function get_full_error (line 31) | def get_full_error(chunk, stream_response): function decode_chunk (line 42) | def decode_chunk(chunk): function verify_endpoint (line 63) | def verify_endpoint(endpoint): function predict_no_ui_long_connection (line 71) | def predict_no_ui_long_connection(inputs:str, llm_kwargs:dict, history:l... function predict (line 127) | def predict(inputs:str, llm_kwargs:dict, plugin_kwargs:dict, chatbot:Cha... function handle_error (line 241) | def handle_error(inputs, llm_kwargs, chatbot, history, chunk_decoded, er... function generate_payload (line 271) | def generate_payload(inputs, llm_kwargs, history, system_prompt, stream): FILE: request_llms/bridge_deepseekcoder.py function download_huggingface_model (line 11) | def download_huggingface_model(model_name, max_retry, local_dir): class GetCoderLMHandle (line 23) | class GetCoderLMHandle(LocalLLMHandle): method load_model_info (line 25) | def load_model_info(self): method load_model_and_tokenizer (line 30) | def load_model_and_tokenizer(self): method llm_stream_generator (line 83) | def llm_stream_generator(self, **kwargs): method try_to_import_special_deps (line 119) | def try_to_import_special_deps(self, **kwargs): pass FILE: request_llms/bridge_google_gemini.py function predict_no_ui_long_connection (line 18) | def predict_no_ui_long_connection(inputs:str, llm_kwargs:dict, history:l... function make_media_input (line 47) | def make_media_input(inputs, image_paths): function predict (line 56) | def predict(inputs:str, llm_kwargs:dict, plugin_kwargs:dict, chatbot:Cha... FILE: request_llms/bridge_internlm.py function try_to_import_special_deps (line 16) | def try_to_import_special_deps(): function combine_history (line 19) | def combine_history(prompt, hist): class GetInternlmHandle (line 37) | class GetInternlmHandle(LocalLLMHandle): method load_model_info (line 39) | def load_model_info(self): method try_to_import_special_deps (line 44) | def try_to_import_special_deps(self, **kwargs): method load_model_and_tokenizer (line 50) | def load_model_and_tokenizer(self): method llm_stream_generator (line 66) | def llm_stream_generator(self, **kwargs): FILE: request_llms/bridge_jittorllms_llama.py class GetGLMHandle (line 12) | class GetGLMHandle(Process): method __init__ (line 13) | def __init__(self): method check_dependency (line 24) | def check_dependency(self): method ready (line 36) | def ready(self): method run (line 39) | def run(self): method stream_chat (line 94) | def stream_chat(self, **kwargs): function predict_no_ui_long_connection (line 109) | def predict_no_ui_long_connection(inputs:str, llm_kwargs:dict, history:l... function predict (line 141) | def predict(inputs, llm_kwargs, plugin_kwargs, chatbot, history=[], syst... FILE: request_llms/bridge_jittorllms_pangualpha.py class GetGLMHandle (line 12) | class GetGLMHandle(Process): method __init__ (line 13) | def __init__(self): method check_dependency (line 24) | def check_dependency(self): method ready (line 36) | def ready(self): method run (line 39) | def run(self): method stream_chat (line 94) | def stream_chat(self, **kwargs): function predict_no_ui_long_connection (line 109) | def predict_no_ui_long_connection(inputs:str, llm_kwargs:dict, history:l... function predict (line 141) | def predict(inputs, llm_kwargs, plugin_kwargs, chatbot, history=[], syst... FILE: request_llms/bridge_jittorllms_rwkv.py class GetGLMHandle (line 12) | class GetGLMHandle(Process): method __init__ (line 13) | def __init__(self): method check_dependency (line 24) | def check_dependency(self): method ready (line 36) | def ready(self): method run (line 39) | def run(self): method stream_chat (line 94) | def stream_chat(self, **kwargs): function predict_no_ui_long_connection (line 109) | def predict_no_ui_long_connection(inputs:str, llm_kwargs:dict, history:l... function predict (line 141) | def predict(inputs, llm_kwargs, plugin_kwargs, chatbot, history=[], syst... FILE: request_llms/bridge_llama2.py class GetLlamaHandle (line 15) | class GetLlamaHandle(LocalLLMHandle): method load_model_info (line 17) | def load_model_info(self): method load_model_and_tokenizer (line 22) | def load_model_and_tokenizer(self): method llm_stream_generator (line 41) | def llm_stream_generator(self, **kwargs): method try_to_import_special_deps (line 80) | def try_to_import_special_deps(self, **kwargs): FILE: request_llms/bridge_moonshot.py class MoonShotInit (line 15) | class MoonShotInit: method __init__ (line 17) | def __init__(self): method __converter_file (line 22) | def __converter_file(self, user_input: str): method __converter_user (line 40) | def __converter_user(self, user_input: str): method __conversation_history (line 44) | def __conversation_history(self, history): method _analysis_content (line 65) | def _analysis_content(self, chuck): method generate_payload (line 76) | def generate_payload(self, inputs, llm_kwargs, history, system_prompt,... method generate_messages (line 101) | def generate_messages(self, inputs, llm_kwargs, history, system_prompt... function msg_handle_error (line 120) | def msg_handle_error(llm_kwargs, chunk_decoded): function predict (line 149) | def predict(inputs:str, llm_kwargs:dict, plugin_kwargs:dict, chatbot:Cha... function predict_no_ui_long_connection (line 171) | def predict_no_ui_long_connection(inputs, llm_kwargs, history=[], sys_pr... FILE: request_llms/bridge_moss.py class GetGLMHandle (line 10) | class GetGLMHandle(Process): method __init__ (line 11) | def __init__(self): # 主进程执行 method check_dependency (line 22) | def check_dependency(self): # 主进程执行 method ready (line 35) | def ready(self): method moss_init (line 39) | def moss_init(self): # 子进程执行 method run (line 105) | def run(self): # 子进程执行 method stream_chat (line 159) | def stream_chat(self, **kwargs): # 主进程执行 function predict_no_ui_long_connection (line 174) | def predict_no_ui_long_connection(inputs:str, llm_kwargs:dict, history:l... function predict (line 205) | def predict(inputs, llm_kwargs, plugin_kwargs, chatbot, history=[], syst... FILE: request_llms/bridge_newbingfree.py function preprocess_newbing_out (line 27) | def preprocess_newbing_out(s): function preprocess_newbing_out_simple (line 40) | def preprocess_newbing_out_simple(result): class NewBingHandle (line 50) | class NewBingHandle(Process): method __init__ (line 51) | def __init__(self): method check_dependency (line 62) | def check_dependency(self): method ready (line 73) | def ready(self): method async_run (line 76) | async def async_run(self): method run (line 125) | def run(self): method stream_chat (line 179) | def stream_chat(self, **kwargs): function predict_no_ui_long_connection (line 206) | def predict_no_ui_long_connection( function predict (line 253) | def predict( FILE: request_llms/bridge_ollama.py function get_full_error (line 32) | def get_full_error(chunk, stream_response): function decode_chunk (line 43) | def decode_chunk(chunk): function predict_no_ui_long_connection (line 55) | def predict_no_ui_long_connection(inputs, llm_kwargs, history=[], sys_pr... function predict (line 120) | def predict(inputs, llm_kwargs, plugin_kwargs, chatbot, history=[], syst... function handle_error (line 210) | def handle_error(inputs, llm_kwargs, chatbot, history, chunk_decoded, er... function generate_payload (line 228) | def generate_payload(inputs, llm_kwargs, history, system_prompt, stream): FILE: request_llms/bridge_openrouter.py function get_full_error (line 31) | def get_full_error(chunk, stream_response): function make_multimodal_input (line 42) | def make_multimodal_input(inputs, image_paths): function reverse_base64_from_input (line 51) | def reverse_base64_from_input(inputs): function contain_base64 (line 60) | def contain_base64(inputs): function append_image_if_contain_base64 (line 64) | def append_image_if_contain_base64(inputs): function remove_image_if_contain_base64 (line 85) | def remove_image_if_contain_base64(inputs): function decode_chunk (line 93) | def decode_chunk(chunk): function verify_endpoint (line 114) | def verify_endpoint(endpoint): function predict_no_ui_long_connection (line 122) | def predict_no_ui_long_connection(inputs:str, llm_kwargs:dict, history:l... function predict (line 208) | def predict(inputs:str, llm_kwargs:dict, plugin_kwargs:dict, chatbot:Cha... function handle_o1_model_special (line 366) | def handle_o1_model_special(response, inputs, llm_kwargs, chatbot, histo... function handle_error (line 377) | def handle_error(inputs, llm_kwargs, chatbot, history, chunk_decoded, er... function generate_payload (line 407) | def generate_payload(inputs:str, llm_kwargs:dict, history:list, system_p... FILE: request_llms/bridge_qianfan.py function cache_decorator (line 11) | def cache_decorator(timeout): function get_access_token (line 31) | def get_access_token(): function generate_message_payload (line 50) | def generate_message_payload(inputs, llm_kwargs, history, system_prompt): function generate_from_baidu_qianfan (line 77) | def generate_from_baidu_qianfan(inputs, llm_kwargs, history, system_prom... function predict_no_ui_long_connection (line 123) | def predict_no_ui_long_connection(inputs:str, llm_kwargs:dict, history:l... function predict (line 139) | def predict(inputs, llm_kwargs, plugin_kwargs, chatbot, history=[], syst... FILE: request_llms/bridge_qwen.py function predict_no_ui_long_connection (line 8) | def predict_no_ui_long_connection(inputs:str, llm_kwargs:dict, history:l... function predict (line 26) | def predict(inputs, llm_kwargs, plugin_kwargs, chatbot, history=[], syst... FILE: request_llms/bridge_qwen_local.py class GetQwenLMHandle (line 12) | class GetQwenLMHandle(LocalLLMHandle): method load_model_info (line 14) | def load_model_info(self): method load_model_and_tokenizer (line 19) | def load_model_and_tokenizer(self): method llm_stream_generator (line 34) | def llm_stream_generator(self, **kwargs): method try_to_import_special_deps (line 49) | def try_to_import_special_deps(self, **kwargs): FILE: request_llms/bridge_skylark2.py function validate_key (line 7) | def validate_key(): function predict_no_ui_long_connection (line 12) | def predict_no_ui_long_connection(inputs:str, llm_kwargs:dict, history:l... function predict (line 33) | def predict(inputs, llm_kwargs, plugin_kwargs, chatbot, history=[], syst... FILE: request_llms/bridge_spark.py function validate_key (line 10) | def validate_key(): function predict_no_ui_long_connection (line 16) | def predict_no_ui_long_connection(inputs:str, llm_kwargs:dict, history:l... function predict (line 37) | def predict(inputs, llm_kwargs, plugin_kwargs, chatbot, history=[], syst... FILE: request_llms/bridge_stackclaude.py class SlackClient (line 25) | class SlackClient(AsyncWebClient): method open_channel (line 41) | async def open_channel(self): method chat (line 47) | async def chat(self, text): method get_slack_messages (line 54) | async def get_slack_messages(self): method get_reply (line 69) | async def get_reply(self): class ClaudeHandle (line 93) | class ClaudeHandle(Process): method __init__ (line 94) | def __init__(self): method check_dependency (line 106) | def check_dependency(self): method ready (line 117) | def ready(self): method async_run (line 120) | async def async_run(self): method run (line 156) | def run(self): method stream_chat (line 195) | def stream_chat(self, **kwargs): function predict_no_ui_long_connection (line 222) | def predict_no_ui_long_connection( function predict (line 266) | def predict( FILE: request_llms/bridge_taichu.py function validate_key (line 10) | def validate_key(): function predict_no_ui_long_connection (line 15) | def predict_no_ui_long_connection(inputs:str, llm_kwargs:dict, history:l... function predict (line 42) | def predict(inputs:str, llm_kwargs:dict, plugin_kwargs:dict, chatbot:Cha... FILE: request_llms/bridge_tgui.py function random_hash (line 17) | def random_hash(): function run (line 21) | async def run(context, max_token, temperature, top_p, addr, port): function predict (line 87) | def predict(inputs, llm_kwargs, plugin_kwargs, chatbot, history=[], syst... function predict_no_ui_long_connection (line 145) | def predict_no_ui_long_connection(inputs, llm_kwargs, history, sys_promp... FILE: request_llms/bridge_zhipu.py function validate_key (line 10) | def validate_key(): function make_media_input (line 15) | def make_media_input(inputs, image_paths): function predict_no_ui_long_connection (line 20) | def predict_no_ui_long_connection(inputs:str, llm_kwargs:dict, history:l... function predict (line 47) | def predict(inputs:str, llm_kwargs:dict, plugin_kwargs:dict, chatbot:Cha... FILE: request_llms/chatglmoonx.py function chat_template (line 42) | def chat_template(history: list[tuple[str, str]], current: str): function process_response (line 52) | def process_response(response: str): class ChatGLMModel (line 68) | class ChatGLMModel(): method __init__ (line 70) | def __init__(self, onnx_model_path=onnx_model_path, tokenizer_path=tok... method prepare_input (line 78) | def prepare_input(self, prompt: str): method sample_next_token (line 87) | def sample_next_token(self, logits: np.ndarray, top_k=50, top_p=0.7, t... method generate_iterate (line 106) | def generate_iterate(self, prompt: str, max_generated_tokens=100, top_... function replace_spaces_with_blank (line 156) | def replace_spaces_with_blank(match: re.Match[str]): function replace_blank_with_spaces (line 160) | def replace_blank_with_spaces(match: re.Match[str]): class ChatGLMTokenizer (line 164) | class ChatGLMTokenizer: method __init__ (line 165) | def __init__(self, vocab_file): method __len__ (line 171) | def __len__(self): method __getitem__ (line 174) | def __getitem__(self, key: str): method preprocess (line 178) | def preprocess(self, text: str, linebreak=True, whitespaces=True): method encode (line 187) | def encode( method decode (line 222) | def decode(self, text_ids: list[int]) -> str: FILE: request_llms/com_google.py function files_filter_handler (line 28) | def files_filter_handler(file_list): function input_encode_handler (line 51) | def input_encode_handler(inputs, llm_kwargs): function file_manifest_filter_html (line 62) | def file_manifest_filter_html(file_list, filter_: list = None, md_type=F... function link_mtime_to_md (line 88) | def link_mtime_to_md(file): function html_local_file (line 95) | def html_local_file(file): function html_local_img (line 102) | def html_local_img(__file, layout="left", max_width=None, max_height=Non... function reverse_base64_from_input (line 115) | def reverse_base64_from_input(inputs): function contain_base64 (line 120) | def contain_base64(inputs): class GoogleChatInit (line 124) | class GoogleChatInit: method __init__ (line 125) | def __init__(self, llm_kwargs): method generate_chat (line 130) | def generate_chat(self, inputs, llm_kwargs, history, system_prompt, im... method __conversation_user (line 144) | def __conversation_user(self, user_input, llm_kwargs, enable_multimoda... method __conversation_history (line 167) | def __conversation_history(self, history, llm_kwargs, enable_multimoda... method generate_message_payload (line 181) | def generate_message_payload( FILE: request_llms/com_qwenapi.py class QwenRequestInstance (line 8) | class QwenRequestInstance(): method __init__ (line 9) | def __init__(self): method format_reasoning (line 24) | def format_reasoning(self, reasoning_content:str, main_content:str): method generate (line 32) | def generate(self, inputs, llm_kwargs, history, system_prompt): function generate_message_payload (line 89) | def generate_message_payload(inputs, llm_kwargs, history, system_prompt): FILE: request_llms/com_skylark2api.py class YUNQUERequestInstance (line 10) | class YUNQUERequestInstance(): method __init__ (line 11) | def __init__(self): method generate (line 18) | def generate(self, inputs, llm_kwargs, history, system_prompt): method generate_message_payload (line 69) | def generate_message_payload(inputs, llm_kwargs, history, system_prompt): FILE: request_llms/com_sparkapi.py class Ws_Param (line 19) | class Ws_Param(object): method __init__ (line 21) | def __init__(self, APPID, APIKey, APISecret, gpt_url): method create_url (line 30) | def create_url(self): class SparkRequestInstance (line 59) | class SparkRequestInstance(): method __init__ (line 60) | def __init__(self): method generate (line 78) | def generate(self, inputs, llm_kwargs, history, system_prompt, use_ima... method create_blocking_request (line 92) | def create_blocking_request(self, inputs, llm_kwargs, history, system_... function generate_message_payload (line 158) | def generate_message_payload(inputs, llm_kwargs, history, system_prompt,... function gen_params (line 192) | def gen_params(appid, inputs, llm_kwargs, history, system_prompt, file_m... FILE: request_llms/com_taichu.py class TaichuChatInit (line 9) | class TaichuChatInit: method __init__ (line 10) | def __init__(self): ... method __conversation_user (line 12) | def __conversation_user(self, user_input: str, llm_kwargs:dict): method __conversation_history (line 15) | def __conversation_history(self, history:list, llm_kwargs:dict): method generate_chat (line 29) | def generate_chat(self, inputs:str, llm_kwargs:dict, history:list, sys... FILE: request_llms/com_zhipuglm.py function input_encode_handler (line 12) | def input_encode_handler(inputs:str, llm_kwargs:dict): class ZhipuChatInit (line 23) | class ZhipuChatInit: method __init__ (line 25) | def __init__(self): method __conversation_user (line 32) | def __conversation_user(self, user_input: str, llm_kwargs:dict): method __conversation_history (line 50) | def __conversation_history(self, history:list, llm_kwargs:dict): method preprocess_param (line 65) | def preprocess_param(param, default=0.95, min_val=0.01, max_val=0.99): method __conversation_message_payload (line 79) | def __conversation_message_payload(self, inputs:str, llm_kwargs:dict, ... method generate_chat (line 124) | def generate_chat(self, inputs:str, llm_kwargs:dict, history:list, sys... FILE: request_llms/edge_gpt_free.py class NotAllowedToAccess (line 98) | class NotAllowedToAccess(Exception): class ConversationStyle (line 102) | class ConversationStyle(Enum): function _append_identifier (line 161) | def _append_identifier(msg: dict) -> str: function _get_ran_hex (line 169) | def _get_ran_hex(length: int = 32) -> str: class _ChatHubRequest (line 176) | class _ChatHubRequest: method __init__ (line 181) | def __init__( method update (line 195) | def update( class _Conversation (line 290) | class _Conversation: method __init__ (line 295) | def __init__( method create (line 352) | async def create( class _ChatHub (line 413) | class _ChatHub: method __init__ (line 418) | def __init__( method ask_stream (line 437) | async def ask_stream( method _initial_handshake (line 608) | async def _initial_handshake(self) -> None: method close (line 612) | async def close(self) -> None: class Chatbot (line 622) | class Chatbot: method __init__ (line 627) | def __init__( method create (line 640) | async def create( method ask (line 653) | async def ask( method ask_stream (line 678) | async def ask_stream( method close (line 702) | async def close(self) -> None: method reset (line 708) | async def reset(self) -> None: function _get_input_async (line 720) | async def _get_input_async( function _create_session (line 734) | def _create_session() -> PromptSession: function _create_completer (line 754) | def _create_completer(commands: list, pattern_str: str = "$"): function async_main (line 758) | async def async_main(args: argparse.Namespace) -> None: function main (line 844) | def main() -> None: class Cookie (line 894) | class Cookie: method fetch_default (line 908) | def fetch_default(cls, path=None): method files (line 930) | def files(cls): method import_data (line 936) | def import_data(cls): method import_next (line 958) | def import_next(cls): class Query (line 969) | class Query: method __init__ (line 975) | def __init__( method log_and_send_query (line 1023) | def log_and_send_query(self, echo, echo_prompt): method create_image (line 1031) | def create_image(self): method send_to_bing (line 1038) | async def send_to_bing(self, echo=True, echo_prompt=False): method output (line 1067) | def output(self): method sources (line 1072) | def sources(self): method sources_dict (line 1077) | def sources_dict(self): method code (line 1090) | def code(self): method languages (line 1097) | def languages(self): method suggestions (line 1103) | def suggestions(self): method __repr__ (line 1110) | def __repr__(self): method __str__ (line 1113) | def __str__(self): class ImageQuery (line 1117) | class ImageQuery(Query): method __init__ (line 1118) | def __init__(self, prompt, **kwargs): method __repr__ (line 1122) | def __repr__(self): FILE: request_llms/embed_models/bge_llm.py class BGELLMRanker (line 10) | class BGELLMRanker: method __init__ (line 12) | def __init__(self, llm_kwargs): method is_paper_relevant (line 15) | def is_paper_relevant(self, query: str, paper_text: str) -> bool: method batch_check_relevance (line 59) | def batch_check_relevance(self, query: str, paper_texts: List[str], sh... function main (line 95) | def main(): FILE: request_llms/embed_models/openai_embed.py function mean_agg (line 10) | def mean_agg(embeddings): class EmbeddingModel (line 14) | class EmbeddingModel(): method get_agg_embedding_from_queries (line 16) | def get_agg_embedding_from_queries( method get_text_embedding_batch (line 26) | def get_text_embedding_batch( class OpenAiEmbeddingModel (line 34) | class OpenAiEmbeddingModel(EmbeddingModel): method __init__ (line 36) | def __init__(self, llm_kwargs:dict=None): method get_query_embedding (line 39) | def get_query_embedding(self, query: str): method compute_embedding (line 42) | def compute_embedding(self, text="这是要计算嵌入的文本", llm_kwargs:dict=None, b... method embedding_dimension (line 74) | def embedding_dimension(self, llm_kwargs=None): FILE: request_llms/key_manager.py function Singleton (line 3) | def Singleton(cls): class OpenAI_ApiKeyManager (line 15) | class OpenAI_ApiKeyManager(): method __init__ (line 16) | def __init__(self, mode='blacklist') -> None: method add_key_to_blacklist (line 20) | def add_key_to_blacklist(self, key): method select_avail_key (line 23) | def select_avail_key(self, key_list): FILE: request_llms/local_llm_class.py class ThreadLock (line 10) | class ThreadLock(object): method __init__ (line 11) | def __init__(self): method acquire (line 14) | def acquire(self): method release (line 20) | def release(self): method __enter__ (line 25) | def __enter__(self): method __exit__ (line 28) | def __exit__(self, type, value, traceback): class GetSingletonHandle (line 32) | class GetSingletonHandle(): method __init__ (line 33) | def __init__(self): method get_llm_model_instance (line 36) | def get_llm_model_instance(self, cls, *args, **kargs): function reset_tqdm_output (line 46) | def reset_tqdm_output(): class LocalLLMHandle (line 67) | class LocalLLMHandle(Process): method __init__ (line 68) | def __init__(self): method get_state (line 88) | def get_state(self): method set_state (line 94) | def set_state(self, new_state): method load_model_info (line 101) | def load_model_info(self): method load_model_and_tokenizer (line 107) | def load_model_and_tokenizer(self): method llm_stream_generator (line 114) | def llm_stream_generator(self, **kwargs): method try_to_import_special_deps (line 118) | def try_to_import_special_deps(self, **kwargs): method check_dependency (line 125) | def check_dependency(self): method run (line 135) | def run(self): method clear_pending_messages (line 171) | def clear_pending_messages(self): method stream_chat (line 185) | def stream_chat(self, **kwargs): function get_local_llm_predict_fns (line 216) | def get_local_llm_predict_fns(LLMSingletonClass, model_name, history_for... FILE: request_llms/oai_std_model_template.py function get_full_error (line 19) | def get_full_error(chunk, stream_response): function decode_chunk (line 31) | def decode_chunk(chunk): function generate_message (line 79) | def generate_message(input, model, key, history, max_output_token, syste... function get_predict_function (line 122) | def get_predict_function( FILE: request_llms/queued_pipe.py class PipeSide (line 5) | class PipeSide(object): method __init__ (line 6) | def __init__(self, q_2remote, q_2local) -> None: method recv (line 10) | def recv(self): method send (line 13) | def send(self, buf): method poll (line 16) | def poll(self): function create_queue_pipe (line 19) | def create_queue_pipe(): FILE: shared_utils/advanced_markdown_format.py function tex2mathml_catch_exception (line 63) | def tex2mathml_catch_exception(content, *args, **kwargs): function replace_math_no_render (line 71) | def replace_math_no_render(match): function replace_math_render (line 80) | def replace_math_render(match): function markdown_bug_hunt (line 93) | def markdown_bug_hunt(content): function is_equation (line 105) | def is_equation(txt): function fix_markdown_indent (line 133) | def fix_markdown_indent(txt): function get_line_range (line 170) | def get_line_range(re_match_obj, txt): function fix_code_segment_indent (line 178) | def fix_code_segment_indent(txt): function fix_dollar_sticking_bug (line 217) | def fix_dollar_sticking_bug(txt): function markdown_convertion_for_file (line 272) | def markdown_convertion_for_file(txt): function compress_string (line 329) | def compress_string(s): function decompress_string (line 333) | def decompress_string(s): function markdown_convertion (line 338) | def markdown_convertion(txt): function code_block_title_replace_format (line 403) | def code_block_title_replace_format(match): function get_last_backticks_indent (line 409) | def get_last_backticks_indent(text): function close_up_code_segment_during_stream (line 421) | def close_up_code_segment_during_stream(gpt_reply): function special_render_issues_for_mermaid (line 456) | def special_render_issues_for_mermaid(text): function contain_html_tag (line 468) | def contain_html_tag(text): function contain_image (line 476) | def contain_image(text): function compat_non_markdown_input (line 481) | def compat_non_markdown_input(text): function simple_markdown_convertion (line 506) | def simple_markdown_convertion(text): function format_io (line 521) | def format_io(self, y): FILE: shared_utils/char_visual_effect.py function is_full_width_char (line 1) | def is_full_width_char(ch): function scrolling_visual_effect (line 11) | def scrolling_visual_effect(text, scroller_max_len): FILE: shared_utils/colorful.py function print红 (line 12) | def print红(*kw,**kargs): function print绿 (line 14) | def print绿(*kw,**kargs): function print黄 (line 16) | def print黄(*kw,**kargs): function print蓝 (line 18) | def print蓝(*kw,**kargs): function print紫 (line 20) | def print紫(*kw,**kargs): function print靛 (line 22) | def print靛(*kw,**kargs): function print亮红 (line 25) | def print亮红(*kw,**kargs): function print亮绿 (line 27) | def print亮绿(*kw,**kargs): function print亮黄 (line 29) | def print亮黄(*kw,**kargs): function print亮蓝 (line 31) | def print亮蓝(*kw,**kargs): function print亮紫 (line 33) | def print亮紫(*kw,**kargs): function print亮靛 (line 35) | def print亮靛(*kw,**kargs): function sprint红 (line 39) | def sprint红(*kw): function sprint绿 (line 41) | def sprint绿(*kw): function sprint黄 (line 43) | def sprint黄(*kw): function sprint蓝 (line 45) | def sprint蓝(*kw): function sprint紫 (line 47) | def sprint紫(*kw): function sprint靛 (line 49) | def sprint靛(*kw): function sprint亮红 (line 51) | def sprint亮红(*kw): function sprint亮绿 (line 53) | def sprint亮绿(*kw): function sprint亮黄 (line 55) | def sprint亮黄(*kw): function sprint亮蓝 (line 57) | def sprint亮蓝(*kw): function sprint亮紫 (line 59) | def sprint亮紫(*kw): function sprint亮靛 (line 61) | def sprint亮靛(*kw): function log红 (line 64) | def log红(*kw,**kargs): function log绿 (line 66) | def log绿(*kw,**kargs): function log黄 (line 68) | def log黄(*kw,**kargs): function log蓝 (line 70) | def log蓝(*kw,**kargs): function log紫 (line 72) | def log紫(*kw,**kargs): function log靛 (line 74) | def log靛(*kw,**kargs): function log亮红 (line 77) | def log亮红(*kw,**kargs): function log亮绿 (line 79) | def log亮绿(*kw,**kargs): function log亮黄 (line 81) | def log亮黄(*kw,**kargs): function log亮蓝 (line 83) | def log亮蓝(*kw,**kargs): function log亮紫 (line 85) | def log亮紫(*kw,**kargs): function log亮靛 (line 87) | def log亮靛(*kw,**kargs): FILE: shared_utils/config_loader.py function read_env_variable (line 10) | def read_env_variable(arg, default_value): function read_single_conf_with_lru_cache (line 65) | def read_single_conf_with_lru_cache(arg): function get_conf (line 103) | def get_conf(*args): function set_conf (line 120) | def set_conf(key, value): function set_multi_conf (line 129) | def set_multi_conf(dic): FILE: shared_utils/connect_void_terminal.py function get_plugin_handle (line 16) | def get_plugin_handle(plugin_name): function get_chat_handle (line 30) | def get_chat_handle(): function get_plugin_default_kwargs (line 39) | def get_plugin_default_kwargs(): function get_chat_default_kwargs (line 68) | def get_chat_default_kwargs(): FILE: shared_utils/context_clip_policy.py function get_token_num (line 4) | def get_token_num(txt, tokenizer): function get_model_info (line 7) | def get_model_info(): function clip_history (line 11) | def clip_history(inputs, history, tokenizer, max_token_limit): function auto_context_clip_each_message (line 72) | def auto_context_clip_each_message(current, history): function auto_context_clip_search_optimal (line 168) | def auto_context_clip_search_optimal(current, history, promote_latest_lo... FILE: shared_utils/cookie_manager.py function load_web_cookie_cache__fn_builder (line 5) | def load_web_cookie_cache__fn_builder(customize_btns, cookies, predefine... function assign_btn__fn_builder (line 28) | def assign_btn__fn_builder(customize_btns, predefined_btns, cookies, web... function make_cookie_cache (line 65) | def make_cookie_cache(): function make_history_cache (line 76) | def make_history_cache(): function create_button_with_javascript_callback (line 105) | def create_button_with_javascript_callback(btn_value, elem_id, variant, ... FILE: shared_utils/doc_loader_dynamic.py function start_with_url (line 5) | def start_with_url(inputs:str): function load_web_content (line 22) | def load_web_content(inputs:str, chatbot_with_cookie, history:list): function extract_file_path (line 45) | def extract_file_path(text): function contain_uploaded_files (line 53) | def contain_uploaded_files(inputs: str): function load_uploaded_files (line 60) | def load_uploaded_files(inputs, method, llm_kwargs, plugin_kwargs, chatb... FILE: shared_utils/docker_as_service_api.py class DockerServiceApiComModel (line 9) | class DockerServiceApiComModel(BaseModel): function process_received (line 17) | def process_received(received: DockerServiceApiComModel, save_file_dir="... function stream_daas (line 40) | def stream_daas(docker_service_api_com_model, server_url, save_file_dir): FILE: shared_utils/fastapi_server.py function validate_path_safety (line 50) | def validate_path_safety(path_or_url, user): function _authorize_user (line 72) | def _authorize_user(path_or_url, request, gradio_app): class Server (line 93) | class Server(uvicorn.Server): method install_signal_handlers (line 95) | def install_signal_handlers(self): method run_in_thread (line 98) | def run_in_thread(self): method close (line 104) | def close(self): function start_app (line 109) | def start_app(app_block, CONCURRENT_COUNT, AUTHENTICATION, PORT, SSL_KEY... FILE: shared_utils/fastapi_stream_server.py class UserInterfaceMsg (line 43) | class UserInterfaceMsg(BaseModel): function setup_initial_com (line 72) | def setup_initial_com(initial_msg: UserInterfaceMsg): class DummyRequest (line 120) | class DummyRequest(object): method __call__ (line 121) | def __call__(self, username): function task_executor (line 125) | def task_executor(initial_msg:UserInterfaceMsg, queue_blocking_from_clie... class FutureEvent (line 212) | class FutureEvent(threading.Event): method __init__ (line 219) | def __init__(self) -> None: method terminate (line 223) | def terminate(self, return_value): method wait_and_get_result (line 233) | def wait_and_get_result(self): class AtomicQueue (line 244) | class AtomicQueue: method __init__ (line 246) | def __init__(self): method put (line 249) | def put(self, item): method put_nowait (line 252) | def put_nowait(self, item): method get (line 255) | def get(self, timeout=600): class PythonMethod_AsyncConnectionMaintainer_AgentcraftInterface (line 264) | class PythonMethod_AsyncConnectionMaintainer_AgentcraftInterface(): method make_queue (line 272) | def make_queue(self): method maintain_connection_forever (line 290) | async def maintain_connection_forever(self, initial_msg: UserInterface... class MasterMindWebSocketServer (line 424) | class MasterMindWebSocketServer(PythonMethod_AsyncConnectionMaintainer_A... method __init__ (line 432) | def __init__(self, host, port) -> None: method create_event (line 447) | def create_event(self, event_name: str): method terminate_event (line 460) | def terminate_event(self, event_name: str, msg:UserInterfaceMsg): method long_task_01_wait_incoming_connection (line 471) | async def long_task_01_wait_incoming_connection(self): FILE: shared_utils/handle_upload.py function html_local_file (line 13) | def html_local_file(file): function html_local_img (line 20) | def html_local_img(__file, layout="left", max_width=None, max_height=Non... function file_manifest_filter_type (line 33) | def file_manifest_filter_type(file_list, filter_: list = None): function zip_extract_member_new (line 45) | def zip_extract_member_new(self, member, targetpath, pwd): function safe_extract_rar (line 92) | def safe_extract_rar(file_path, dest_dir): function extract_archive (line 117) | def extract_archive(file_path, dest_dir): FILE: shared_utils/key_pattern_manager.py function is_openai_api_key (line 20) | def is_openai_api_key(key): function is_azure_api_key (line 29) | def is_azure_api_key(key): function is_api2d_key (line 34) | def is_api2d_key(key): function is_openroute_api_key (line 38) | def is_openroute_api_key(key): function is_cohere_api_key (line 42) | def is_cohere_api_key(key): function is_any_api_key (line 47) | def is_any_api_key(key): function what_keys (line 64) | def what_keys(keys): function is_o_family_for_openai (line 82) | def is_o_family_for_openai(llm_model): function select_api_key (line 91) | def select_api_key(keys, llm_model): function select_api_key_for_embed_models (line 124) | def select_api_key_for_embed_models(keys, llm_model): FILE: shared_utils/logging.py function chat_log_filter (line 6) | def chat_log_filter(record): function not_chat_log_filter (line 9) | def not_chat_log_filter(record): function formatter_with_clip (line 12) | def formatter_with_clip(record): function setup_logging (line 22) | def setup_logging(PATH_LOGGING): FILE: shared_utils/map_names.py function map_model_to_friendly_names (line 13) | def map_model_to_friendly_names(m): function map_friendly_names_to_model (line 18) | def map_friendly_names_to_model(m): function read_one_api_model_name (line 23) | def read_one_api_model_name(model: str): FILE: shared_utils/nltk_downloader.py class Package (line 199) | class Package: method __init__ (line 208) | def __init__( method fromxml (line 278) | def fromxml(xml): method __lt__ (line 285) | def __lt__(self, other): method __repr__ (line 288) | def __repr__(self): class Collection (line 292) | class Collection: method __init__ (line 299) | def __init__(self, id, children, name=None, **kw): method fromxml (line 318) | def fromxml(xml): method __lt__ (line 326) | def __lt__(self, other): method __repr__ (line 329) | def __repr__(self): class DownloaderMessage (line 338) | class DownloaderMessage: class StartCollectionMessage (line 343) | class StartCollectionMessage(DownloaderMessage): method __init__ (line 346) | def __init__(self, collection): class FinishCollectionMessage (line 350) | class FinishCollectionMessage(DownloaderMessage): method __init__ (line 353) | def __init__(self, collection): class StartPackageMessage (line 357) | class StartPackageMessage(DownloaderMessage): method __init__ (line 360) | def __init__(self, package): class FinishPackageMessage (line 364) | class FinishPackageMessage(DownloaderMessage): method __init__ (line 367) | def __init__(self, package): class StartDownloadMessage (line 371) | class StartDownloadMessage(DownloaderMessage): method __init__ (line 374) | def __init__(self, package): class FinishDownloadMessage (line 378) | class FinishDownloadMessage(DownloaderMessage): method __init__ (line 381) | def __init__(self, package): class StartUnzipMessage (line 385) | class StartUnzipMessage(DownloaderMessage): method __init__ (line 388) | def __init__(self, package): class FinishUnzipMessage (line 392) | class FinishUnzipMessage(DownloaderMessage): method __init__ (line 395) | def __init__(self, package): class UpToDateMessage (line 399) | class UpToDateMessage(DownloaderMessage): method __init__ (line 402) | def __init__(self, package): class StaleMessage (line 406) | class StaleMessage(DownloaderMessage): method __init__ (line 409) | def __init__(self, package): class ErrorMessage (line 413) | class ErrorMessage(DownloaderMessage): method __init__ (line 416) | def __init__(self, package, message): class ProgressMessage (line 424) | class ProgressMessage(DownloaderMessage): method __init__ (line 427) | def __init__(self, progress): class SelectDownloadDirMessage (line 431) | class SelectDownloadDirMessage(DownloaderMessage): method __init__ (line 434) | def __init__(self, download_dir): class Downloader (line 443) | class Downloader: method __init__ (line 484) | def __init__(self, server_index_url=None, download_dir=None): method list (line 521) | def list( method packages (line 581) | def packages(self): method corpora (line 585) | def corpora(self): method models (line 589) | def models(self): method collections (line 593) | def collections(self): method _info_or_id (line 601) | def _info_or_id(self, info_or_id): method incr_download (line 616) | def incr_download(self, info_or_id, download_dir=None, force=False): method _num_packages (line 644) | def _num_packages(self, item): method _download_list (line 650) | def _download_list(self, items, download_dir, force): method _download_package (line 675) | def _download_package(self, info, download_dir, force): method download (line 744) | def download( method is_stale (line 841) | def is_stale(self, info_or_id, download_dir=None): method is_installed (line 844) | def is_installed(self, info_or_id, download_dir=None): method clear_status_cache (line 847) | def clear_status_cache(self, id=None): method status (line 853) | def status(self, info_or_id, download_dir=None): method _pkg_status (line 887) | def _pkg_status(self, info, filepath): method update (line 923) | def update(self, quiet=False, prefix="[nltk_data] "): method _update_index (line 936) | def _update_index(self, url=None): method index (line 999) | def index(self): method info (line 1008) | def info(self, id): method xmlinfo (line 1018) | def xmlinfo(self, id): method _get_url (line 1033) | def _get_url(self): method _set_url (line 1037) | def _set_url(self, url): method default_download_dir (line 1051) | def default_download_dir(self): method _get_download_dir (line 1090) | def _get_download_dir(self): method _set_download_dir (line 1099) | def _set_download_dir(self, download_dir): method _interactive_download (line 1110) | def _interactive_download(self): class DownloaderShell (line 1122) | class DownloaderShell: method __init__ (line 1123) | def __init__(self, dataserver): method _simple_interactive_menu (line 1126) | def _simple_interactive_menu(self, *options): method run (line 1132) | def run(self): method _simple_interactive_download (line 1173) | def _simple_interactive_download(self, args): method _simple_interactive_update (line 1203) | def _simple_interactive_update(self): method _simple_interactive_help (line 1235) | def _simple_interactive_help(self): method _show_config (line 1244) | def _show_config(self): method _simple_interactive_config (line 1254) | def _simple_interactive_config(self): class DownloaderGUI (line 1287) | class DownloaderGUI: method __init__ (line 1377) | def __init__(self, dataserver, use_threads=True): method _log (line 1426) | def _log(self, msg): method _init_widgets (line 1435) | def _init_widgets(self): method _init_menu (line 1546) | def _init_menu(self): method _select_columns (line 1615) | def _select_columns(self): method _refresh (line 1622) | def _refresh(self): method _info_edit (line 1632) | def _info_edit(self, info_key): method _info_save (line 1639) | def _info_save(self, e=None): method _table_reprfunc (line 1652) | def _table_reprfunc(self, row, col, val): method _set_url (line 1668) | def _set_url(self, url): method _set_download_dir (line 1678) | def _set_download_dir(self, download_dir): method _show_info (line 1693) | def _show_info(self): method _prev_tab (line 1703) | def _prev_tab(self, *e): method _next_tab (line 1714) | def _next_tab(self, *e): method _select_tab (line 1725) | def _select_tab(self, event): method _fill_table (line 1738) | def _fill_table(self): method _update_table_status (line 1779) | def _update_table_status(self): method _download (line 1785) | def _download(self, *e): method _download_cb (line 1806) | def _download_cb(self, download_iter, ids): method _select (line 1850) | def _select(self, id): method _color_table (line 1856) | def _color_table(self): method _clear_mark (line 1873) | def _clear_mark(self, id): method _mark_all (line 1878) | def _mark_all(self, *e): method _table_mark (line 1882) | def _table_mark(self, *e): method _show_log (line 1891) | def _show_log(self): method _package_to_columns (line 1895) | def _package_to_columns(self, pkg): method destroy (line 1917) | def destroy(self, *e): method _destroy (line 1923) | def _destroy(self, *e): method mainloop (line 1937) | def mainloop(self, *args, **kwargs): method help (line 1973) | def help(self, *e): method about (line 1986) | def about(self, *e): method _init_progressbar (line 2002) | def _init_progressbar(self): method _show_progress (line 2022) | def _show_progress(self, percent): method _progress_alive (line 2032) | def _progress_alive(self): method _download_threaded (line 2050) | def _download_threaded(self, *e): method _abort_download (line 2094) | def _abort_download(self): class _DownloadThread (line 2100) | class _DownloadThread(threading.Thread): method __init__ (line 2101) | def __init__(self, data_server, items, lock, message_queue, abort): method run (line 2109) | def run(self): method _monitor_message_queue (line 2125) | def _monitor_message_queue(self): function md5_hexdigest (line 2208) | def md5_hexdigest(file): function _md5_hexdigest (line 2219) | def _md5_hexdigest(fp): function unzip (line 2232) | def unzip(filename, root, verbose=True): function _unzip_iter (line 2242) | def _unzip_iter(filename, root, verbose=True): function build_index (line 2268) | def build_index(root, base_url): function _indent_xml (line 2338) | def _indent_xml(xml, prefix=""): function _check_package (line 2354) | def _check_package(pkg_xml, zipfilename, zf): function _svn_revision (line 2375) | def _svn_revision(filename): function _find_collections (line 2394) | def _find_collections(root): function _find_packages (line 2406) | def _find_packages(root): function download_shell (line 2485) | def download_shell(): function download_gui (line 2489) | def download_gui(): function update (line 2493) | def update(): FILE: shared_utils/text_mask.py function apply_gpt_academic_string_mask (line 24) | def apply_gpt_academic_string_mask(string, mode="show_all"): function build_gpt_academic_masked_string (line 46) | def build_gpt_academic_masked_string(text_show_llm="", text_show_render=... function apply_gpt_academic_string_mask_langbased (line 54) | def apply_gpt_academic_string_mask_langbased(string, lang_reference): function build_gpt_academic_masked_string_langbased (line 90) | def build_gpt_academic_masked_string_langbased(text_show_english="", tex... FILE: tests/init_test.py function validate_path (line 1) | def validate_path(): FILE: tests/test_embed.py function validate_path (line 1) | def validate_path(): FILE: tests/test_key_pattern_manager.py function validate_path (line 3) | def validate_path(): class TestKeyPatternManager (line 16) | class TestKeyPatternManager(unittest.TestCase): method test_is_openai_api_key_with_valid_key (line 17) | def test_is_openai_api_key_with_valid_key(self): method test_is_openai_api_key_with_invalid_key (line 53) | def test_is_openai_api_key_with_invalid_key(self): method test_is_openai_api_key_with_custom_pattern (line 57) | def test_is_openai_api_key_with_custom_pattern(self): FILE: tests/test_latex_auto_correct.py function validate_path (line 9) | def validate_path(): FILE: tests/test_llms.py function validate_path (line 4) | def validate_path(): FILE: tests/test_markdown.py function validate_path (line 205) | def validate_path(): FILE: tests/test_markdown_format.py function preprocess_newbing_out (line 11) | def preprocess_newbing_out(s): function close_up_code_segment_during_stream (line 34) | def close_up_code_segment_during_stream(gpt_reply): function markdown_convertion (line 64) | def markdown_convertion(txt): FILE: tests/test_python_auto_docstring.py class ContextWindowManager (line 116) | class ContextWindowManager(): method __init__ (line 118) | def __init__(self, llm_kwargs) -> None: method generate_tagged_code_from_full_context (line 126) | def generate_tagged_code_from_full_context(self): method read_file (line 134) | def read_file(self, path): method find_next_function_begin (line 140) | def find_next_function_begin(self, tagged_code:list, begin_and_end): method _get_next_window (line 168) | def _get_next_window(self): method dedent (line 194) | def dedent(self, text): method get_next_batch (line 236) | def get_next_batch(self): method tag_code (line 240) | def tag_code(self, fn): method sync_and_patch (line 269) | def sync_and_patch(self, original, revised): FILE: tests/test_safe_pickle.py function validate_path (line 1) | def validate_path(): FILE: tests/test_save_chat_to_html.py function validate_path (line 1) | def validate_path(): function write_chat_to_file (line 9) | def write_chat_to_file(chatbot, history=None, file_name=None): FILE: tests/test_searxng.py function validate_path (line 1) | def validate_path(): function searxng_request (line 12) | def searxng_request(query, proxies, categories='general', searxng_url=No... FILE: tests/test_tts.py function test_tts (line 7) | async def test_tts(): FILE: tests/test_utils.py function chat_to_markdown_str (line 13) | def chat_to_markdown_str(chat): function silence_stdout (line 22) | def silence_stdout(func): function silence_stdout_fn (line 39) | def silence_stdout_fn(func): class VoidTerminal (line 53) | class VoidTerminal: method __init__ (line 54) | def __init__(self) -> None: function plugin_test (line 88) | def plugin_test(main_input, plugin, advanced_arg=None, debug=True): FILE: tests/test_vector_plugins.py function validate_path (line 9) | def validate_path(): FILE: themes/common.js function push_data_to_gradio_component (line 8) | function push_data_to_gradio_component(DAT, ELEM_ID, TYPE) { function get_gradio_component (line 33) | async function get_gradio_component(ELEM_ID) { function get_data_from_gradio_component (line 50) | async function get_data_from_gradio_component(ELEM_ID) { function update_array (line 56) | function update_array(arr, item, mode) { function gradioApp (line 81) | function gradioApp() { function setCookie (line 94) | function setCookie(name, value, days) { function getCookie (line 107) | function getCookie(name) { function toast_push (line 124) | function toast_push(msg, duration) { function toast_up (line 146) | function toast_up(msg) { function toast_down (line 159) | function toast_down() { function begin_loading_status (line 167) | function begin_loading_status() { function cancel_loading_status (line 237) | function cancel_loading_status() { function decompressString (line 263) | function decompressString(compressedString) { function addCopyButton (line 283) | function addCopyButton(botElement, index, is_last_in_arr) { function do_something_but_not_too_frequently (line 379) | function do_something_but_not_too_frequently(min_interval, func) { function chatbotContentChanged (line 403) | function chatbotContentChanged(attempt = 1, force = false) { function addStopButton (line 427) | function addStopButton(botElement, index, is_last_in_arr) { function chatbotAutoHeight (line 505) | function chatbotAutoHeight() { function swap_input_area (line 538) | function swap_input_area() { function get_elements (line 557) | function get_elements(consider_state_panel = false) { function locate_upload_elems (line 619) | function locate_upload_elems() { function upload_files (line 629) | async function upload_files(files) { function register_func_paste (line 655) | function register_func_paste(input) { function register_func_drag (line 682) | function register_func_drag(elem) { function elem_upload_component_pop_message (line 719) | function elem_upload_component_pop_message(elem) { function register_upload_event (line 749) | function register_upload_event() { function monitoring_input_box (line 772) | function monitoring_input_box() { function audio_fn_init (line 805) | function audio_fn_init() { function minor_ui_adjustment (line 842) | function minor_ui_adjustment() { function ButtonWithDropdown_init (line 914) | function ButtonWithDropdown_init() { function limit_scroll_position (line 936) | function limit_scroll_position() { function loadLive2D (line 968) | function loadLive2D() { function get_checkbox_selected_items (line 1009) | function get_checkbox_selected_items(elem_id) { function gpt_academic_gradio_saveload (line 1024) | function gpt_academic_gradio_saveload( function generateUUID (line 1051) | function generateUUID() { function update_conversation_metadata (line 1067) | function update_conversation_metadata() { function generatePreview (line 1085) | function generatePreview(conversation, timestamp, maxLength = 100) { function save_conversation_history (line 1095) | async function save_conversation_history() { function restore_chat_from_local_storage (line 1169) | function restore_chat_from_local_storage(event) { function clear_conversation (line 1182) | async function clear_conversation(a, b, c) { function reset_conversation (line 1200) | function reset_conversation(a, b) { function on_plugin_exe_complete (line 1205) | async function on_plugin_exe_complete(fn_name) { function generate_menu (line 1233) | async function generate_menu(guiBase64String, btnName) { function execute_current_pop_up_plugin (line 1317) | async function execute_current_pop_up_plugin() { function hide_all_elem (line 1363) | function hide_all_elem() { function close_current_pop_up_plugin (line 1384) | function close_current_pop_up_plugin() { function register_plugin_init (line 1396) | function register_plugin_init(key, base64String) { function register_advanced_plugin_init_code (line 1412) | function register_advanced_plugin_init_code(key, code) { function run_advanced_plugin_launch_code (line 1420) | function run_advanced_plugin_launch_code(key) { function on_flex_button_click (line 1424) | function on_flex_button_click(key) { function run_dropdown_shift (line 1431) | async function run_dropdown_shift(dropdown) { function duplicate_in_new_window (line 1455) | async function duplicate_in_new_window() { function run_classic_plugin_via_id (line 1462) | async function run_classic_plugin_via_id(plugin_elem_id) { function call_plugin_via_name (line 1475) | async function call_plugin_via_name(current_btn_name) { function click_real_submit_btn (line 1500) | async function click_real_submit_btn() { function multiplex_function_begin (line 1503) | async function multiplex_function_begin(multiplex_sel) { function run_multiplex_shift (line 1512) | async function run_multiplex_shift(multiplex_sel) { function persistent_cookie_init (line 1526) | async function persistent_cookie_init(web_cookie_cache, cookie) { FILE: themes/common.py function inject_mutex_button_code (line 5) | def inject_mutex_button_code(js_content): function minimize_js (line 24) | def minimize_js(common_js_path): function get_common_html_javascript_code (line 49) | def get_common_html_javascript_code(): FILE: themes/contrast.py function adjust_theme (line 10) | def adjust_theme(): FILE: themes/default.py function adjust_theme (line 10) | def adjust_theme(): FILE: themes/gradios.py function dynamic_set_theme (line 10) | def dynamic_set_theme(THEME): function adjust_theme (line 25) | def adjust_theme(): FILE: themes/green.js function set_elements (line 8) | function set_elements() { function setSlider (line 21) | function setSlider() { FILE: themes/green.py function adjust_theme (line 10) | def adjust_theme(): FILE: themes/gui_advanced_plugin_class.py function define_gui_advanced_plugin_class (line 5) | def define_gui_advanced_plugin_class(plugins): FILE: themes/gui_floating_menu.py function define_gui_floating_menu (line 3) | def define_gui_floating_menu(customize_btns, functional, predefined_btns... FILE: themes/gui_toolbar.py function define_gui_toolbar (line 4) | def define_gui_toolbar(AVAIL_LLM_MODELS, LLM_MODEL, INIT_SYS_PROMPT, THE... FILE: themes/init.js function remove_legacy_cookie (line 1) | function remove_legacy_cookie() { function processFontFamily (line 8) | function processFontFamily(fontfamily) { function checkFontAvailability (line 28) | function checkFontAvailability(fontfamily) { function checkFontAvailabilityV2 (line 45) | async function checkFontAvailabilityV2(fontfamily) { function loadFont (line 64) | function loadFont(fontfamily, fontUrl) { function gpt_academic_change_chatbot_font (line 80) | function gpt_academic_change_chatbot_font(fontfamily, fontsize, fontcolo... function footer_show_hide (line 131) | function footer_show_hide(show) { function GptAcademicJavaScriptInit (line 139) | async function GptAcademicJavaScriptInit(dark, prompt, live2d, layout, t... function apply_checkbox_change_for_group2 (line 369) | function apply_checkbox_change_for_group2(display_panel_arr) { FILE: themes/theme.js function try_load_previous_theme (line 1) | async function try_load_previous_theme(){ function change_theme (line 11) | async function change_theme(theme_selection, css) { FILE: themes/theme.py function load_dynamic_theme (line 17) | def load_dynamic_theme(THEME): function assign_user_uuid (line 51) | def assign_user_uuid(cookies): function to_cookie_str (line 57) | def to_cookie_str(d): function from_cookie_str (line 64) | def from_cookie_str(c): FILE: themes/tts.js class AudioPlayer (line 5) | class AudioPlayer { method constructor (line 6) | constructor() { method base64ToArrayBuffer (line 14) | base64ToArrayBuffer(base64) { method checkQueue (line 25) | checkQueue() { method enqueueAudio (line 34) | enqueueAudio(audio_buf_wave) { method play_wave (line 42) | async play_wave(encodedAudio) { method stop (line 68) | stop() { class FIFOLock (line 82) | class FIFOLock { method constructor (line 83) | constructor() { method lock (line 88) | lock() { method _dequeueNext (line 103) | _dequeueNext() { method unlock (line 113) | unlock() { function delay (line 126) | function delay(ms) { function trigger (line 131) | function trigger(T, fire) { function on_live_stream_terminate (line 157) | function on_live_stream_terminate(latest_text) { function is_continue_from_prev (line 166) | function is_continue_from_prev(text, prev_text) { function isEmptyOrWhitespaceOnly (line 177) | function isEmptyOrWhitespaceOnly(remaining_text) { function process_increased_text (line 183) | function process_increased_text(remaining_text) { function process_latest_text_output (line 204) | function process_latest_text_output(text, chatbot_index) { function push_text_to_audio (line 246) | async function push_text_to_audio(text) { function UpdatePlayQueue (line 278) | async function UpdatePlayQueue(cnt, audio_buf_wave) { function post_text (line 308) | function post_text(url, payload, cnt) { function postData (line 323) | async function postData(url = '', data = {}) { FILE: themes/waifu_plugin/live2d.js function i (line 3) | function i(r) { function r (line 34) | function r() { function o (line 37) | function o() { function n (line 40) | function n() { function s (line 43) | function s() { function _ (line 46) | function _() { function a (line 49) | function a(t, i) { function h (line 52) | function h() { function l (line 55) | function l() { function $ (line 58) | function $() { function u (line 61) | function u(t) { function p (line 64) | function p() { function f (line 67) | function f() { function c (line 70) | function c() {} function r (line 536) | function r(t) { function o (line 539) | function o() { function r (line 549) | function r() {} function r (line 575) | function r(t) { function o (line 581) | function o(t) { function n (line 584) | function n(t) { function s (line 604) | function s() { function _ (line 616) | function _() { function a (line 631) | function a(t) { function h (line 634) | function h(t, i) { function l (line 637) | function l(t, i) { function $ (line 644) | function $(t, i, e) { function u (line 700) | function u(t) { function p (line 717) | function p(t) { function f (line 734) | function f(t) { function c (line 750) | function c() { function d (line 753) | function d() { function g (line 757) | function g(t) { function y (line 772) | function y(t) { function m (line 776) | function m(t) { function T (line 780) | function T(t) { function P (line 784) | function P(t) { function S (line 787) | function S(t) { function v (line 790) | function v() { function L (line 799) | function L(t, i, e) { function i (line 830) | function i() { function e (line 833) | function e(t) { function r (line 841) | function r(t, i, e) { function o (line 846) | function o(t, i) { function n (line 849) | function n() { function s (line 852) | function s() { function _ (line 855) | function _() {} function a (line 856) | function a() { function h (line 859) | function h() { function l (line 862) | function l(t) { function $ (line 865) | function $() {} function u (line 866) | function u(t) { function p (line 869) | function p() { function f (line 872) | function f() { function c (line 875) | function c() { function d (line 878) | function d(t, i, e) { function g (line 881) | function g(t, i, e, r) { function y (line 884) | function y(t, i, e) { function T (line 887) | function T(t, i, e, r) { function P (line 890) | function P() { function S (line 893) | function S() { function v (line 896) | function v() {} function L (line 897) | function L() { function M (line 900) | function M() { function E (line 903) | function E() { function A (line 906) | function A() { function I (line 909) | function I() { function w (line 912) | function w() {} function x (line 913) | function x() { function O (line 916) | function O() {} function D (line 917) | function D() { function R (line 920) | function R() { function b (line 923) | function b(t) { function F (line 926) | function F() { function C (line 929) | function C() { function N (line 932) | function N() { function B (line 935) | function B() { function U (line 938) | function U() {} function G (line 939) | function G() {} function Y (line 940) | function Y(t) { function k (line 943) | function k() {} function V (line 944) | function V() { function X (line 947) | function X() { function z (line 950) | function z() { function H (line 953) | function H(t) { function W (line 956) | function W() { function j (line 959) | function j() { function q (line 962) | function q() { function J (line 965) | function J() { function Q (line 968) | function Q(t, i) { function N (line 971) | function N() { function B (line 974) | function B() { function Z (line 977) | function Z() { function K (line 980) | function K(t) { function tt (line 983) | function tt() { function it (line 986) | function it(t) { function et (line 989) | function et(t) { function rt (line 992) | function rt() {} function ot (line 993) | function ot() { function nt (line 996) | function nt(t, i) { function st (line 999) | function st() { function _t (line 1002) | function _t(t) { function at (line 1005) | function at() {} function ht (line 1006) | function ht() {} function lt (line 1007) | function lt(t) { function $t (line 1010) | function $t() { function ut (line 1013) | function ut(t) { function pt (line 1016) | function pt() { function ft (line 1019) | function ft(t) { function ct (line 1022) | function ct() { function dt (line 1025) | function dt() { function gt (line 1028) | function gt() { function yt (line 1031) | function yt(t) { function mt (line 1034) | function mt(t) { function Tt (line 1037) | function Tt(t, i, e) { function Pt (line 1040) | function Pt(t, i, e) { function St (line 1043) | function St(t) { function vt (line 1046) | function vt() {} function Lt (line 1047) | function Lt() {} function Mt (line 1048) | function Mt(t) { function Et (line 1051) | function Et() {} function t (line 3873) | function t(t, i) { function r (line 3906) | function r(t) { function o (line 3912) | function o() { function r (line 3978) | function r() {} function r (line 4029) | function r(t) { function o (line 4035) | function o() { function r (line 4174) | function r() { FILE: themes/waifu_plugin/waifu-tips.js function empty (line 97) | function empty(obj) {return typeof obj=="undefined"||obj==null||obj==""?... function getRandText (line 98) | function getRandText(text) {return Array.isArray(text) ? text[Math.floor... function showMessage (line 100) | function showMessage(text, timeout, flag) { function hideMessage (line 114) | function hideMessage(timeout) { function initModel (line 121) | function initModel(waifuPath, type) { function loadModel (line 201) | function loadModel(modelId, modelTexturesId=0) { function loadTipsMessage (line 211) | function loadTipsMessage(result) { FILE: themes/welcome.js class WelcomeMessage (line 1) | class WelcomeMessage { method constructor (line 2) | constructor() { method begin_render (line 108) | begin_render() { method startAutoUpdate (line 112) | async startAutoUpdate() { method startRefleshCards (line 118) | async startRefleshCards() { method reflesh_cards (line 131) | async reflesh_cards() { method shuffle (line 192) | shuffle(array) { method can_display (line 210) | async can_display() { method update (line 232) | async update() { method showCard (line 244) | showCard(message) { method showWelcome (line 281) | async showWelcome() { method removeWelcome (line 325) | async removeWelcome() { method isChatbotEmpty (line 346) | async isChatbotEmpty() { class PageFocusHandler (line 356) | class PageFocusHandler { method constructor (line 357) | constructor() { method handleFocus (line 366) | handleFocus() { method addFocusCallback (line 374) | addFocusCallback(callback) { FILE: toolbox.py class ChatBotWithCookies (line 61) | class ChatBotWithCookies(list): method __init__ (line 62) | def __init__(self, cookie): method write_list (line 78) | def write_list(self, list): method get_list (line 82) | def get_list(self): method get_cookies (line 85) | def get_cookies(self): method get_user (line 88) | def get_user(self): function ArgsGeneralWrapper (line 93) | def ArgsGeneralWrapper(f): function update_ui (line 161) | def update_ui(chatbot:ChatBotWithCookies, history:list, msg:str="正常", **... function update_ui_latest_msg (line 194) | def update_ui_latest_msg(lastmsg:str, chatbot:ChatBotWithCookies, histor... function trimmed_format_exc (line 206) | def trimmed_format_exc(): function trimmed_format_exc_markdown (line 215) | def trimmed_format_exc_markdown(): class FriendlyException (line 219) | class FriendlyException(Exception): method generate_error_html (line 220) | def generate_error_html(self): function CatchException (line 228) | def CatchException(f): function HotReload (line 256) | def HotReload(f): function get_reduce_token_percent (line 298) | def get_reduce_token_percent(text:str): function write_history_to_file (line 316) | def write_history_to_file( function regular_txt_to_markdown (line 351) | def regular_txt_to_markdown(text:str): function report_exception (line 361) | def report_exception(chatbot:ChatBotWithCookies, history:list, a:str, b:... function find_free_port (line 369) | def find_free_port()->int: function find_recent_files (line 382) | def find_recent_files(directory:str)->List[str]: function file_already_in_downloadzone (line 407) | def file_already_in_downloadzone(file:str, user_path:str): function promote_file_to_downloadzone (line 419) | def promote_file_to_downloadzone(file:str, rename_file:str=None, chatbot... function disable_auto_promotion (line 454) | def disable_auto_promotion(chatbot:ChatBotWithCookies): function del_outdated_uploads (line 459) | def del_outdated_uploads(outdate_time_seconds:float, target_path_base:st... function to_markdown_tabs (line 479) | def to_markdown_tabs(head: list, tabs: list, alignment=":---:", column=F... function on_file_uploaded (line 511) | def on_file_uploaded( function generate_file_link (line 577) | def generate_file_link(report_files:List[str]): function on_report_generated (line 586) | def on_report_generated(cookies:dict, files:List[str], chatbot:ChatBotWi... function load_chat_cookies (line 603) | def load_chat_cookies(): function clear_line_break (line 650) | def clear_line_break(txt): class DummyWith (line 657) | class DummyWith: method __enter__ (line 668) | def __enter__(self): method __exit__ (line 671) | def __exit__(self, exc_type, exc_value, traceback): function run_gradio_in_subpath (line 675) | def run_gradio_in_subpath(demo, auth, port, custom_path): function auto_context_clip (line 723) | def auto_context_clip(current, history, policy='search_optimal'): function zip_folder (line 745) | def zip_folder(source_folder, dest_folder, zip_name): function zip_result (line 778) | def zip_result(folder): function gen_time_str (line 784) | def gen_time_str(): function get_log_folder (line 790) | def get_log_folder(user=default_user_name, plugin_name="shared"): function get_upload_folder (line 803) | def get_upload_folder(user=default_user_name, tag=None): function is_the_upload_folder (line 814) | def is_the_upload_folder(string): function get_user (line 824) | def get_user(chatbotwithcookies:ChatBotWithCookies): class ProxyNetworkActivate (line 828) | class ProxyNetworkActivate: method __init__ (line 833) | def __init__(self, task=None) -> None: method __enter__ (line 845) | def __enter__(self): method __exit__ (line 860) | def __exit__(self, exc_type, exc_value, traceback): function Singleton (line 869) | def Singleton(cls): function get_pictures_list (line 883) | def get_pictures_list(path): function have_any_recent_upload_image_files (line 890) | def have_any_recent_upload_image_files(chatbot:ChatBotWithCookies, pop:b... function every_image_file_in_path (line 911) | def every_image_file_in_path(chatbot:ChatBotWithCookies): function encode_image (line 924) | def encode_image(image_path): function get_max_token (line 929) | def get_max_token(llm_kwargs): function check_packages (line 935) | def check_packages(packages=[]): function map_file_to_sha256 (line 944) | def map_file_to_sha256(file_path): function check_repeat_upload (line 956) | def check_repeat_upload(new_pdf_path, pdf_hash): function log_chat (line 993) | def log_chat(llm_model: str, input_str: str, output_str: str):