Skip to content

Commit

Permalink
feat: no longer support .set agent_prelude <value> (#1086)
Browse files Browse the repository at this point in the history
  • Loading branch information
sigoden authored Jan 15, 2025
1 parent 3783101 commit 50c60e8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 21 deletions.
4 changes: 0 additions & 4 deletions src/config/agent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,6 @@ impl Agent {
self.config.agent_prelude.as_deref()
}

pub fn set_agent_prelude(&mut self, value: Option<String>) {
self.config.agent_prelude = value;
}

pub fn variables(&self) -> &AgentVariables {
match &self.session_variables {
Some(variables) => variables,
Expand Down
17 changes: 0 additions & 17 deletions src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -534,10 +534,6 @@ impl Config {
Some(rag) => rag.get_config(),
None => (self.rag_reranker_model.clone(), self.rag_top_k),
};
let agent_prelude = match &self.agent {
Some(agent) => agent.agent_prelude(),
None => self.agent_prelude.as_deref(),
};
let role = self.extract_role();
let mut items = vec![
("model", role.model().id()),
Expand All @@ -558,7 +554,6 @@ impl Config {
("wrap_code", self.wrap_code.to_string()),
("function_calling", self.function_calling.to_string()),
("use_tools", format_option_value(&role.use_tools())),
("agent_prelude", format_option_value(&agent_prelude)),
("save_session", format_option_value(&self.save_session)),
("compress_threshold", self.compress_threshold.to_string()),
(
Expand Down Expand Up @@ -630,10 +625,6 @@ impl Config {
let value = parse_value(value)?;
config.write().set_use_tools(value);
}
"agent_prelude" => {
let value = parse_value(value)?;
config.write().set_agent_prelude(value);
}
"save_session" => {
let value = parse_value(value)?;
config.write().set_save_session(value);
Expand Down Expand Up @@ -748,13 +739,6 @@ impl Config {
}
}

pub fn set_agent_prelude(&mut self, value: Option<String>) {
match self.agent.as_mut() {
Some(agent) => agent.set_agent_prelude(value),
None => self.agent_prelude = value,
}
}

pub fn set_save_session(&mut self, value: Option<bool>) {
if let Some(session) = self.session.as_mut() {
session.set_save_session(value);
Expand Down Expand Up @@ -1710,7 +1694,6 @@ impl Config {
"save",
"function_calling",
"use_tools",
"agent_prelude",
"save_session",
"compress_threshold",
"rag_reranker_model",
Expand Down

0 comments on commit 50c60e8

Please sign in to comment.