Closed
Conversation
GowayLee
reviewed
Feb 25, 2025
Collaborator
GowayLee
left a comment
There was a problem hiding this comment.
此PR改动过大, 建议merge到dev分支
| import uvicorn | ||
| from pathlib import Path | ||
| except ImportError as e: | ||
| raise ImportError(f"Web 配置界面依赖缺失: {e}. 请运行 'pip install jinja2 pyyaml uvicorn python-dotenv python-multipart'") |
| # 加载选项 | ||
| self.config_data["options"]["allow_origins"] = os.getenv("ALLOW_ORIGINS", "*") | ||
| self.config_data["options"]["is_origin_reasoning"] = os.getenv("IS_ORIGIN_REASONING", "true").lower() == "true" | ||
| self.config_data["options"]["log_level"] = os.getenv("LOG_LEVEL", "INFO") |
Collaborator
There was a problem hiding this comment.
这部分我们打算改为更加灵活的配置方式 #52
希望可以将web_config系统与新的配置系统进行融合
| "parent": None | ||
| }) | ||
|
|
||
| return {"object": "list", "data": models_data} |
Collaborator
There was a problem hiding this comment.
可以将构建返回体的逻辑拆分至模块, 保持main.py的可读性
added 2 commits
February 27, 2025 16:41
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
添加在线配置修改以及模型映射功能