You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
			
				
					26 lines
				
				574 B
			
		
		
			
		
	
	
					26 lines
				
				574 B
			| 
											10 months ago
										 | import logging | ||
|  | import os | ||
|  | import langchain | ||
|  | 
 | ||
|  | 
 | ||
|  | # 是否显示详细日志 | ||
|  | log_verbose = False | ||
|  | langchain.verbose = False | ||
|  | 
 | ||
|  | # 是否保存聊天记录 | ||
|  | SAVE_CHAT_HISTORY = False | ||
|  | 
 | ||
|  | # 通常情况下不需要更改以下内容 | ||
|  | 
 | ||
|  | # 日志格式 | ||
|  | LOG_FORMAT = "%(asctime)s - %(pathname)s[line:%(lineno)d] - %(levelname)s: %(message)s" | ||
|  | logger = logging.getLogger() | ||
|  | logger.setLevel(logging.INFO) | ||
|  | logging.basicConfig(format=LOG_FORMAT) | ||
|  | 
 | ||
|  | 
 | ||
|  | # 日志存储路径 | ||
|  | LOG_PATH = os.path.join(os.path.dirname(os.path.dirname(__file__)), "logs") | ||
|  | if not os.path.exists(LOG_PATH): | ||
|  |     os.mkdir(LOG_PATH) |