mirror of
https://github.com/Zippland/Snap-Solver.git
synced 2026-01-19 09:41:15 +08:00
移除API密钥验证相关的代码和样式,删除无用的图片文件,优化进度指示器的样式和动画效果,调整设置面板的布局,简化API密钥管理功能,提升用户体验。
This commit is contained in:
@@ -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())
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user