新增基于 LLM 的图标规格优化与生成接口

新增 refine_game_play 与 refine_art_style 提示词优化接口
实现图标规范游戏类型解析与提示词构建契约
集成 API 路由并补充校验与 LLM 行为测试
This commit is contained in:
2026-08-04 19:06:24 +08:00
parent e6b3199490
commit cc86d29b83
9 changed files with 1187 additions and 46 deletions
@@ -26,6 +26,8 @@ use crate::{
toggle_editor_showcase_asset_like, update_editor_asset, update_editor_asset_folder,
update_editor_project_resource_showcase,
},
editor_project_icon_specs::generate_icon_spec,
llm::icon_specs::{refine_art_style, refine_game_play},
state::AppState,
};
@@ -191,6 +193,27 @@ pub fn router(state: AppState) -> Router<AppState> {
require_bearer_auth,
)),
)
.route(
"/api/editor/llm/icon-specs/refine-game-play",
post(refine_game_play).route_layer(middleware::from_fn_with_state(
state.clone(),
require_bearer_auth,
)),
)
.route(
"/api/editor/llm/icon-specs/refine-art-style",
post(refine_art_style).route_layer(middleware::from_fn_with_state(
state.clone(),
require_bearer_auth,
)),
)
.route(
"/api/editor/icon-specs/generations",
post(generate_icon_spec).route_layer(middleware::from_fn_with_state(
state.clone(),
require_bearer_auth,
)),
)
.route(
"/api/editor/images/edits",
post(edit_editor_image).route_layer(middleware::from_fn_with_state(