feat: a2ui interface to enablee the LLM to give structured information
This commit is contained in:
@@ -14,6 +14,7 @@ use crate::settings::{GenerationPreferences, RuntimePreferences};
|
||||
pub struct Config {
|
||||
pub model: ModelChoice,
|
||||
pub idle_timeout_minutes: i32,
|
||||
pub a2ui_enabled: bool,
|
||||
pub endpoint: EndpointConfig,
|
||||
pub generation: GenerationPreferences,
|
||||
pub runtime: RuntimePreferences,
|
||||
@@ -25,6 +26,7 @@ impl Default for Config {
|
||||
Self {
|
||||
model: ModelChoice::default(),
|
||||
idle_timeout_minutes: 10,
|
||||
a2ui_enabled: true,
|
||||
endpoint: EndpointConfig::default(),
|
||||
generation: GenerationPreferences::default(),
|
||||
runtime: RuntimePreferences::default(),
|
||||
@@ -153,6 +155,7 @@ mod tests {
|
||||
let path = directory.join("config.yaml");
|
||||
let config = Config {
|
||||
model: ModelChoice::Glm52,
|
||||
a2ui_enabled: false,
|
||||
generation: GenerationPreferences {
|
||||
context_tokens: 65_536,
|
||||
reasoning_mode: ReasoningMode::Direct,
|
||||
@@ -173,7 +176,7 @@ mod tests {
|
||||
let text = fs::read_to_string(&path).unwrap();
|
||||
assert_eq!(
|
||||
text,
|
||||
"model: glm-5.2\n\
|
||||
"model: glm-5.2\na2ui_enabled: false\n\
|
||||
generation:\n context_tokens: 65536\n reasoning_mode: none\n\
|
||||
runtime:\n ssd:\n enabled: true\n cache: 64GB\n"
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user