fix: 更新main.py逻辑
This commit is contained in:
+7
-2
@@ -71,12 +71,17 @@ class MilvusCfg(BaseSettings):
|
||||
token: Optional[str] = None # 可缺省(无需鉴权时留空)
|
||||
user: Optional[str] = None
|
||||
password: Optional[str] = None
|
||||
db_name: Optional[str] = None
|
||||
db: Optional[str] = None
|
||||
connect_timeout: int # 建连/通道就绪超时(构造是急切连接,必须短)
|
||||
timeout: int # 数据操作超时,调用处可覆盖
|
||||
|
||||
model_config = SettingsConfigDict(env_prefix="MILVUS_", env_file=_ENV_FILE, extra="ignore")
|
||||
|
||||
@property
|
||||
def db_name(self) -> Optional[str]:
|
||||
"""Compatibility name used by the Milvus client wrapper."""
|
||||
return self.db
|
||||
|
||||
|
||||
class LLMCfg(BaseSettings):
|
||||
"""大模型配置:本地 Ollama / OpenAI 兼容 API 双模式见 tool/llm.py。"""
|
||||
@@ -134,4 +139,4 @@ class Settings(BaseSettings):
|
||||
model_config = SettingsConfigDict(env_file=_ENV_FILE, extra="ignore")
|
||||
|
||||
|
||||
settings = Settings()
|
||||
settings = Settings()
|
||||
|
||||
Reference in New Issue
Block a user