From b94637e092d14d01abdec58b6d3d7e2f59835df9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 3 Feb 2026 15:41:20 +0000 Subject: [PATCH 1/3] Initial plan From 7bd6226615fc799e382dabf3cefbbde7442ed0ce Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 3 Feb 2026 15:47:52 +0000 Subject: [PATCH 2/3] Fix Pydantic V2 deprecation warnings and update requirements.txt Co-authored-by: wasalstor-web <230709381+wasalstor-web@users.noreply.github.com> --- dlplus/config/settings.py | 49 +++++++++++++++++---------------- requirements.txt | 58 +++++++++++++++++++-------------------- 2 files changed, 54 insertions(+), 53 deletions(-) diff --git a/dlplus/config/settings.py b/dlplus/config/settings.py index 77b4dcf..d42ee8e 100644 --- a/dlplus/config/settings.py +++ b/dlplus/config/settings.py @@ -10,39 +10,45 @@ from pydantic_settings import BaseSettings except ImportError: from pydantic import BaseSettings -from pydantic import Field +from pydantic import Field, ConfigDict class Settings(BaseSettings): """Main system settings / الإعدادات الرئيسية للنظام""" + model_config = ConfigDict( + env_file=".env", + env_file_encoding="utf-8", + case_sensitive=False + ) + # API Keys - openrouter_api_key: str = Field(default="", env="OPENROUTER_API_KEY") - openai_api_key: str = Field(default="", env="OPENAI_API_KEY") - anthropic_api_key: str = Field(default="", env="ANTHROPIC_API_KEY") + openrouter_api_key: str = Field(default="") + openai_api_key: str = Field(default="") + anthropic_api_key: str = Field(default="") # Server Configuration - api_host: str = Field(default="0.0.0.0", env="API_HOST") - api_port: int = Field(default=8000, env="API_PORT") - debug_mode: bool = Field(default=False, env="DEBUG_MODE") + api_host: str = Field(default="0.0.0.0") + api_port: int = Field(default=8000) + debug_mode: bool = Field(default=False) # VPS/Hostinger Configuration - vps_host: Optional[str] = Field(default=None, env="VPS_HOST") - vps_user: Optional[str] = Field(default=None, env="VPS_USER") - vps_key: Optional[str] = Field(default=None, env="VPS_KEY") - vps_port: int = Field(default=22, env="VPS_PORT") + vps_host: Optional[str] = Field(default=None) + vps_user: Optional[str] = Field(default=None) + vps_key: Optional[str] = Field(default=None) + vps_port: int = Field(default=22) # Model Configuration - default_model: str = Field(default="gpt-3.5-turbo", env="DEFAULT_MODEL") - default_arabic_model: str = Field(default="qwen-2.5-arabic", env="DEFAULT_ARABIC_MODEL") - max_tokens: int = Field(default=2000, env="MAX_TOKENS") - temperature: float = Field(default=0.7, env="TEMPERATURE") + default_model: str = Field(default="gpt-3.5-turbo") + default_arabic_model: str = Field(default="qwen-2.5-arabic") + max_tokens: int = Field(default=2000) + temperature: float = Field(default=0.7) # Agent Configuration - max_reasoning_steps: int = Field(default=5, env="MAX_REASONING_STEPS") - enable_web_search: bool = Field(default=True, env="ENABLE_WEB_SEARCH") - enable_code_generation: bool = Field(default=True, env="ENABLE_CODE_GENERATION") - enable_shell_execution: bool = Field(default=False, env="ENABLE_SHELL_EXECUTION") + max_reasoning_steps: int = Field(default=5) + enable_web_search: bool = Field(default=True) + enable_code_generation: bool = Field(default=True) + enable_shell_execution: bool = Field(default=False) # Paths base_dir: Path = Path(__file__).parent.parent.parent @@ -62,11 +68,6 @@ class Settings(BaseSettings): supported_languages: List[str] = ["ar", "en"] default_language: str = "ar" - class Config: - env_file = ".env" - env_file_encoding = "utf-8" - case_sensitive = False - def __init__(self, **kwargs): super().__init__(**kwargs) # Create necessary directories diff --git a/requirements.txt b/requirements.txt index 1553b13..9c591ea 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,41 +1,41 @@ # Core Dependencies -fastapi==0.104.1 -uvicorn[standard]==0.24.0 -pydantic==2.5.0 -pydantic-settings==2.1.0 -python-dotenv==1.0.0 -httpx==0.25.1 -aiohttp==3.9.0 +fastapi>=0.104.1 +uvicorn[standard]>=0.24.0 +pydantic>=2.5.0 +pydantic-settings>=2.1.0 +python-dotenv>=1.0.0 +httpx>=0.25.1 +aiohttp>=3.9.0 -# AI and NLP -openai==1.3.5 -anthropic==0.7.1 -transformers==4.35.2 -torch==2.1.1 -sentence-transformers==2.2.2 +# AI and NLP (using compatible versions for Python 3.12) +openai>=1.3.5 +anthropic>=0.7.1 +transformers>=4.35.2 +torch>=2.2.0 +sentence-transformers>=2.2.2 # Arabic Language Processing -camel-tools==1.5.2 -pyarabic==0.6.15 -nltk==3.8.1 +camel-tools>=1.5.2 +pyarabic>=0.6.15 +nltk>=3.8.1 # Data Processing -pandas==2.1.3 -numpy==1.26.2 -beautifulsoup4==4.12.2 -lxml==4.9.3 +pandas>=2.1.3 +numpy>=1.26.2 +beautifulsoup4>=4.12.2 +lxml>=4.9.3 # Utilities -requests==2.31.0 -python-multipart==0.0.6 -jinja2==3.1.2 -markdown==3.5.1 +requests>=2.31.0 +python-multipart>=0.0.6 +jinja2>=3.1.2 +markdown>=3.5.1 # Testing -pytest==7.4.3 -pytest-asyncio==0.21.1 -pytest-cov==4.1.0 +pytest>=7.4.3 +pytest-asyncio>=0.21.1 +pytest-cov>=4.1.0 # Security -cryptography==41.0.7 -pyjwt==2.8.0 +cryptography>=41.0.7 +pyjwt>=2.8.0 From dd6449b13ea7cedee917a2cac6e0f37fe9716e7a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 3 Feb 2026 15:48:46 +0000 Subject: [PATCH 3/3] Use compatible release version constraints in requirements.txt Co-authored-by: wasalstor-web <230709381+wasalstor-web@users.noreply.github.com> --- requirements.txt | 56 ++++++++++++++++++++++++------------------------ 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/requirements.txt b/requirements.txt index 9c591ea..0f3f219 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,41 +1,41 @@ # Core Dependencies -fastapi>=0.104.1 -uvicorn[standard]>=0.24.0 -pydantic>=2.5.0 -pydantic-settings>=2.1.0 -python-dotenv>=1.0.0 -httpx>=0.25.1 -aiohttp>=3.9.0 +fastapi~=0.104.1 +uvicorn[standard]~=0.24.0 +pydantic~=2.5 +pydantic-settings~=2.1 +python-dotenv~=1.0 +httpx~=0.25 +aiohttp~=3.9 # AI and NLP (using compatible versions for Python 3.12) -openai>=1.3.5 -anthropic>=0.7.1 -transformers>=4.35.2 -torch>=2.2.0 -sentence-transformers>=2.2.2 +openai~=1.3 +anthropic~=0.7 +transformers~=4.35 +torch>=2.2.0,<3.0.0 +sentence-transformers~=2.2 # Arabic Language Processing -camel-tools>=1.5.2 -pyarabic>=0.6.15 -nltk>=3.8.1 +camel-tools~=1.5 +pyarabic~=0.6 +nltk~=3.8 # Data Processing -pandas>=2.1.3 -numpy>=1.26.2 -beautifulsoup4>=4.12.2 -lxml>=4.9.3 +pandas~=2.1 +numpy~=1.26 +beautifulsoup4~=4.12 +lxml~=4.9 # Utilities -requests>=2.31.0 -python-multipart>=0.0.6 -jinja2>=3.1.2 -markdown>=3.5.1 +requests~=2.31 +python-multipart~=0.0.6 +jinja2~=3.1 +markdown~=3.5 # Testing -pytest>=7.4.3 -pytest-asyncio>=0.21.1 -pytest-cov>=4.1.0 +pytest~=7.4 +pytest-asyncio~=0.21 +pytest-cov~=4.1 # Security -cryptography>=41.0.7 -pyjwt>=2.8.0 +cryptography~=41.0 +pyjwt~=2.8