fix:修复接口调用问题

This commit is contained in:
ZhangYonghao
2026-03-21 21:27:20 +08:00
parent eaefc318a6
commit 3b660203dd
5 changed files with 37 additions and 10 deletions

View File

@@ -33,6 +33,13 @@ class HTMLGenerateRequest(BaseModel):
@root_validator(pre=True)
def normalize_aliases(cls, values: dict) -> dict:
if isinstance(values.get("body"), dict):
merged_values = dict(values["body"])
for key, value in values.items():
if key != "body" and key not in merged_values:
merged_values[key] = value
values = merged_values
alias_map = {
"html": "html_content",
"content": "html_content",