mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-11 16:26:02 +00:00
refactor: 适配配置管理器读取方式
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
from . import context
|
||||
|
||||
|
||||
def wrapper_proxies() -> dict:
|
||||
"""获取代理"""
|
||||
import config
|
||||
config = context.get_config_manager().data
|
||||
|
||||
return {
|
||||
"http": config.openai_config['proxy'],
|
||||
"https": config.openai_config['proxy']
|
||||
} if 'proxy' in config.openai_config and (config.openai_config['proxy'] is not None) else None
|
||||
"http": config['openai_config']['proxy'],
|
||||
"https": config['openai_config']['proxy']
|
||||
} if 'proxy' in config['openai_config'] and (config['openai_config']['proxy'] is not None) else None
|
||||
|
||||
Reference in New Issue
Block a user