Fix
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
// nazarick-core/src/llm/traits.rs
|
||||
|
||||
use std::str::FromStr;
|
||||
use crate::types::Result;
|
||||
use crate::llm::types::{LlmRequest, LlmResponse};
|
||||
|
||||
@@ -13,13 +14,14 @@ pub enum SkillFormat {
|
||||
None,
|
||||
}
|
||||
|
||||
impl SkillFormat {
|
||||
/// Parsed aus config.toml String
|
||||
pub fn from_str(s: &str) -> Self {
|
||||
impl FromStr for SkillFormat {
|
||||
type Err = ();
|
||||
|
||||
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
|
||||
match s {
|
||||
"tool_use" => Self::ToolUse,
|
||||
"none" => Self::None,
|
||||
_ => Self::Xml, // default
|
||||
"tool_use" => Ok(Self::ToolUse),
|
||||
"none" => Ok(Self::None),
|
||||
_ => Ok(Self::Xml),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user