This commit is contained in:
2026-04-27 14:23:19 +08:00
parent 09d3fe59b3
commit fa2dbb310b
75 changed files with 7363 additions and 1487 deletions

View File

@@ -28,6 +28,7 @@ pub(crate) struct CustomWorldAgentTurnRequest<'a> {
pub session: &'a CustomWorldAgentSessionRecord,
pub quick_fill_requested: bool,
pub focus_card_id: Option<String>,
pub enable_web_search: bool,
}
#[derive(Clone, Debug)]
@@ -214,6 +215,7 @@ where
request.session.progress_percent,
request.quick_fill_requested,
&current_anchor_content,
request.enable_web_search,
on_reply_update,
)
.await?;
@@ -476,6 +478,7 @@ async fn stream_single_turn<F>(
progress_percent: u32,
quick_fill_requested: bool,
current_anchor_content: &EightAnchorContent,
enable_web_search: bool,
on_reply_update: F,
) -> Result<SingleTurnModelOutput, CustomWorldTurnError>
where
@@ -505,6 +508,7 @@ where
Some(llm_client),
prompt,
"请按约定输出这一轮的 JSON。",
enable_web_search,
CreationAgentLlmTurnErrorMessages {
model_unavailable: "当前模型不可用,请稍后重试。",
generation_failed: "这一轮设定生成失败,请稍后重试。",