优化系统配置文件
This commit is contained in:
parent
79c6ac0df4
commit
7132875265
@ -93,27 +93,6 @@ async def update_environment_config(request: Request, config_data: Dict[str, Any
|
|||||||
'jingrow_cloud_api_key',
|
'jingrow_cloud_api_key',
|
||||||
'jingrow_cloud_api_secret',
|
'jingrow_cloud_api_secret',
|
||||||
],
|
],
|
||||||
'数据库配置': [
|
|
||||||
'jingrow_db_host',
|
|
||||||
'jingrow_db_port',
|
|
||||||
'jingrow_db_name',
|
|
||||||
'jingrow_db_user',
|
|
||||||
'jingrow_db_password',
|
|
||||||
'jingrow_db_type',
|
|
||||||
],
|
|
||||||
'Qdrant 向量数据库配置': [
|
|
||||||
'qdrant_host',
|
|
||||||
'qdrant_port',
|
|
||||||
],
|
|
||||||
'运行模式': [
|
|
||||||
'run_mode',
|
|
||||||
],
|
|
||||||
'环境:development/production(控制启动模式、热重载等)': [
|
|
||||||
'environment',
|
|
||||||
],
|
|
||||||
'日志级别:DEBUG/INFO/WARNING/ERROR/CRITICAL(全局默认级别)': [
|
|
||||||
'log_level',
|
|
||||||
],
|
|
||||||
'本地后端主机配置': [
|
'本地后端主机配置': [
|
||||||
'backend_host',
|
'backend_host',
|
||||||
'backend_port',
|
'backend_port',
|
||||||
@ -124,6 +103,27 @@ async def update_environment_config(request: Request, config_data: Dict[str, Any
|
|||||||
'worker_threads',
|
'worker_threads',
|
||||||
'watch',
|
'watch',
|
||||||
],
|
],
|
||||||
|
'Qdrant 向量数据库配置': [
|
||||||
|
'qdrant_host',
|
||||||
|
'qdrant_port',
|
||||||
|
],
|
||||||
|
'数据库配置': [
|
||||||
|
'jingrow_db_host',
|
||||||
|
'jingrow_db_port',
|
||||||
|
'jingrow_db_name',
|
||||||
|
'jingrow_db_user',
|
||||||
|
'jingrow_db_password',
|
||||||
|
'jingrow_db_type',
|
||||||
|
],
|
||||||
|
'运行模式': [
|
||||||
|
'run_mode',
|
||||||
|
],
|
||||||
|
'环境:development/production(控制启动模式、热重载等)': [
|
||||||
|
'environment',
|
||||||
|
],
|
||||||
|
'日志级别:DEBUG/INFO/WARNING/ERROR/CRITICAL(全局默认级别)': [
|
||||||
|
'log_level',
|
||||||
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
# 生成所有允许的字段列表
|
# 生成所有允许的字段列表
|
||||||
|
|||||||
@ -17,25 +17,6 @@ class Settings(BaseSettings):
|
|||||||
jingrow_cloud_api_key: str = ''
|
jingrow_cloud_api_key: str = ''
|
||||||
jingrow_cloud_api_secret: str = ''
|
jingrow_cloud_api_secret: str = ''
|
||||||
|
|
||||||
# 数据库配置
|
|
||||||
jingrow_db_host: str = 'localhost'
|
|
||||||
jingrow_db_port: str = '3306'
|
|
||||||
jingrow_db_name: str = 'jingrow_local'
|
|
||||||
jingrow_db_user: str = 'root'
|
|
||||||
jingrow_db_password: str = ''
|
|
||||||
jingrow_db_type: str = 'mariadb'
|
|
||||||
|
|
||||||
# Qdrant 向量数据库配置
|
|
||||||
qdrant_host: str = ''
|
|
||||||
qdrant_port: int = 6333
|
|
||||||
|
|
||||||
# 运行模式
|
|
||||||
run_mode: str = 'api'
|
|
||||||
# 环境:development/production(控制启动模式、热重载等)
|
|
||||||
environment: str = 'development'
|
|
||||||
# 日志级别:DEBUG/INFO/WARNING/ERROR/CRITICAL(全局默认级别)
|
|
||||||
log_level: str = 'INFO'
|
|
||||||
|
|
||||||
# 本地后端主机配置
|
# 本地后端主机配置
|
||||||
backend_host: str = '0.0.0.0'
|
backend_host: str = '0.0.0.0'
|
||||||
backend_port: int = 9001
|
backend_port: int = 9001
|
||||||
@ -46,6 +27,27 @@ class Settings(BaseSettings):
|
|||||||
worker_threads: int = 1
|
worker_threads: int = 1
|
||||||
watch: bool = True
|
watch: bool = True
|
||||||
|
|
||||||
|
# Qdrant 向量数据库配置
|
||||||
|
qdrant_host: str = ''
|
||||||
|
qdrant_port: int = 6333
|
||||||
|
|
||||||
|
# 数据库配置
|
||||||
|
jingrow_db_host: str = 'localhost'
|
||||||
|
jingrow_db_port: str = '3306'
|
||||||
|
jingrow_db_name: str = 'jingrow_local'
|
||||||
|
jingrow_db_user: str = 'root'
|
||||||
|
jingrow_db_password: str = ''
|
||||||
|
jingrow_db_type: str = 'mariadb'
|
||||||
|
|
||||||
|
|
||||||
|
# 运行模式
|
||||||
|
run_mode: str = 'api'
|
||||||
|
# 环境:development/production(控制启动模式、热重载等)
|
||||||
|
environment: str = 'development'
|
||||||
|
# 日志级别:DEBUG/INFO/WARNING/ERROR/CRITICAL(全局默认级别)
|
||||||
|
log_level: str = 'INFO'
|
||||||
|
|
||||||
|
|
||||||
class Config:
|
class Config:
|
||||||
env_file = str(get_root_path() / '.env')
|
env_file = str(get_root_path() / '.env')
|
||||||
env_file_encoding = 'utf-8'
|
env_file_encoding = 'utf-8'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user