fix: ignore extra envs in env file

Signed-off-by: Frost Ming <me@frostming.com>
This commit is contained in:
Frost Ming
2025-07-09 08:21:28 +08:00
parent 0b60ae2fbe
commit 89d70effe1
2 changed files with 8 additions and 8 deletions

View File

@ -5,7 +5,7 @@ from pydantic_settings import BaseSettings, SettingsConfigDict
class Settings(BaseSettings): class Settings(BaseSettings):
model_config = SettingsConfigDict(env_file=".env") model_config = SettingsConfigDict(env_file=".env", extra="ignore")
telegram_bot_token: str telegram_bot_token: str
timezone: str = "Asia/Shanghai" timezone: str = "Asia/Shanghai"

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
python_bin_path="$(which python3)" python_bin_path="$(which python3)"
venv_dir="venv" venv_dir=".venv"
project_path="$(pwd)" project_path="$(pwd)"
service_name="tgbotyh" service_name="tgbotyh"
@ -88,12 +88,12 @@ function installPythonVirtualEnv(){
echo echo
echo "Project path: $project_path" echo "Project path: $project_path"
echo "Python bin path: $python_bin_path" echo "Python bin path: $python_bin_path"
echo "Google_Gemini_API_Key: $Google_Gemini_API_Key" echo "Google_Gemini_API_Key: $google_gemini_api_key"
echo "Telegram Bot Token: $Telegram_Bot_Token" echo "Telegram Bot Token: $telegram_bot_token"
echo "Anthropic API Key: $Anthropic_API_Key" echo "Anthropic API Key: $anthropic_api_key"
echo "Openai API Key: $Openai_API_Key" echo "Openai API Key: $openai_api_key"
echo "Yi API Key: $Yi_API_Key" echo "Yi API Key: $yi_api_key"
echo "Yi Base Url: $Yi_Base_Url" echo "Yi Base Url: $yi_base_url"
echo "==============================" echo "=============================="
echo echo