mirror of
https://github.com/cdryzun/tg_bot_collections.git
synced 2025-08-05 21:56:44 +08:00
Merge pull request #55 from yihong0618/fix/allow-extras
fix: ignore extra envs in env file
This commit is contained in:
@ -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"
|
||||||
|
14
setup.sh
14
setup.sh
@ -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
|
||||||
|
Reference in New Issue
Block a user