-
Notifications
You must be signed in to change notification settings - Fork 7.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix #11026 model config return #11126
fix #11026 model config return #11126
Conversation
Signed-off-by: kenwoodjw <[email protected]>
Signed-off-by: kenwoodjw <[email protected]>
Please run |
api/models/model.py
Outdated
else: | ||
app_model_config = ( | ||
db.session.query(AppModelConfig).filter(AppModelConfig.id == self.app_model_config_id).first() | ||
) | ||
if app_model_config: | ||
model_config = app_model_config.to_dict() | ||
model_config["model_dict"] = app_model_config.model_dict |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The property is already present in the 'model' object when we call the 'to_dict()' method. It appears that this issue cannot be resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand the issue now, as model_config
corresponds to model_config_fields
, not simple_model_config_fields
. Perhaps this approach would work:
simple_model_config_fields = {
"model": fields.Raw(attribute="model"),
"pre_prompt": fields.String,
}
What do you think?
@laipz8200 So the mode_config should return like that "model_config": {
"model": {
"provider": "deepseek",
"name": "deepseek-chat",
"mode": "chat",
"completion_params": {
"stop": [],
"top_p": [],
"temperature": []
}
},
"pre_prompt": ""
} or simple ? |
Yes, here is the correct structure of |
Signed-off-by: kenwoodjw <[email protected]>
We found that is better to fix it at the frond-end, would you mind checking #11298? |
Ok, I will close the PR |
Summary
fix #11026 model config return
Tip
Close issue syntax:
Fixes #<issue number>
orResolves #<issue number>
, see documentation for more details.Screenshots
Checklist
Important
Please review the checklist below before submitting your pull request.
dev/reformat
(backend) andcd web && npx lint-staged
(frontend) to appease the lint gods