移除API密钥验证相关的代码和样式,删除无用的图片文件,优化进度指示器的样式和动画效果,调整设置面板的布局,简化API密钥管理功能,提升用户体验。

This commit is contained in:
Zylan
2025-04-02 23:00:14 +08:00
parent fd53f18ec9
commit e6445c61fd
8 changed files with 73 additions and 300 deletions

View File

@@ -45,7 +45,3 @@ class BaseModel(ABC):
def get_model_identifier(self) -> str:
"""Return the model identifier used in API calls"""
pass
def validate_api_key(self) -> bool:
"""Validate if the API key is in the correct format"""
return bool(self.api_key and self.api_key.strip())

View File

@@ -211,16 +211,6 @@ class MathpixModel(BaseModel):
"""
return "mathpix"
def validate_api_key(self) -> bool:
"""
Validate if the API key is in the correct format (app_id:app_key).
"""
try:
app_id, app_key = self.api_key.split(':')
return bool(app_id.strip() and app_key.strip())
except ValueError:
return False
def _format_response(self, result: Dict[str, Any]) -> str:
"""
Format the Mathpix API response into a readable string.