fix(danding_api): 将Config改为BaseSettings以支持环境变量读取
BaseModel 的 Field(env=...) 不会自动读取环境变量, 需要继承 pydantic_settings.BaseSettings 才能生效。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
import os
|
||||
from pydantic import BaseModel, Field
|
||||
from pydantic import Field
|
||||
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||
|
||||
|
||||
class Config(BaseModel):
|
||||
class Config(BaseSettings):
|
||||
"""Plugin Config Here"""
|
||||
model_config = SettingsConfigDict(extra="ignore")
|
||||
|
||||
HelpStr:str = """
|
||||
这是一个蛋定助手的RoBot控制插件,功能菜单:
|
||||
|
||||
Reference in New Issue
Block a user