MCPcopy Create free account
hub / github.com/Tron521/codex-console-temp / update_settings

Function update_settings

src/config/settings.py:935–951  ·  view source on GitHub ↗

更新配置并保存到数据库

(**kwargs)

Source from the content-addressed store, hash-verified

933
934
935def update_settings(**kwargs) -> Settings:
936 """
937 更新配置并保存到数据库
938 """
939 global _settings
940 if _settings is None:
941 _settings = get_settings()
942
943 # 创建新的配置实例
944 updated_data = _settings.model_dump()
945 updated_data.update(kwargs)
946 _settings = Settings(**updated_data)
947
948 # 保存到数据库
949 _save_settings_to_db(**kwargs)
950
951 return _settings
952
953
954def get_database_url() -> str:

Calls 3

get_settingsFunction · 0.85
SettingsClass · 0.85
_save_settings_to_dbFunction · 0.85