feat: 接入 LLM AI 引擎到 GUI,GameConfig 支持 useLlm 切换 AI 类型

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-31 13:46:45 +08:00
parent 75c980e2b6
commit dddfd035c6
3 changed files with 36 additions and 14 deletions
+12
View File
@@ -121,6 +121,14 @@ pub struct GameConfig {
pub is_server: bool,
#[serde(default)]
pub remote_address: String,
#[serde(default)]
pub use_llm: bool,
#[serde(default)]
pub llm_endpoint: String,
#[serde(default)]
pub llm_api_key: String,
#[serde(default)]
pub llm_model: String,
}
impl Default for GameConfig {
@@ -134,6 +142,10 @@ impl Default for GameConfig {
player_color: Color::Black,
is_server: false,
remote_address: String::new(),
use_llm: false,
llm_endpoint: String::new(),
llm_api_key: String::new(),
llm_model: String::new(),
}
}
}