移除插件依赖
This commit is contained in:
		
							parent
							
								
									aa51d6fde6
								
							
						
					
					
						commit
						6d0bceaebd
					
				@ -144,11 +144,11 @@ def 下载arxiv论文并翻译摘要(txt, llm_kwargs, plugin_kwargs, chatbot, hi
 | 
			
		||||
 | 
			
		||||
    # 尝试导入依赖,如果缺少依赖,则给出安装建议
 | 
			
		||||
    try:
 | 
			
		||||
        import pdfminer, bs4
 | 
			
		||||
        import bs4
 | 
			
		||||
    except:
 | 
			
		||||
        report_execption(chatbot, history, 
 | 
			
		||||
            a = f"解析项目: {txt}", 
 | 
			
		||||
            b = f"导入软件依赖失败。使用该模块需要额外依赖,安装方法```pip install --upgrade pdfminer beautifulsoup4```。")
 | 
			
		||||
            b = f"导入软件依赖失败。使用该模块需要额外依赖,安装方法```pip install --upgrade beautifulsoup4```。")
 | 
			
		||||
        yield from update_ui(chatbot=chatbot, history=history) # 刷新界面
 | 
			
		||||
        return
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user