Skip to content

Commit

Permalink
fix: allow ConversationalAgentBuilder to be built using a dynamic LLM…
Browse files Browse the repository at this point in the history
… instance
  • Loading branch information
samuelint committed Sep 17, 2024
1 parent 340715b commit b419b7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/agent/chat/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ impl ConversationalAgentBuilder {
self
}

pub fn build<L: LLM + 'static>(self, llm: L) -> Result<ConversationalAgent, AgentError> {
pub fn build<L: Into<Box<dyn LLM>>>(self, llm: L) -> Result<ConversationalAgent, AgentError> {
let tools = self.tools.unwrap_or_default();
let prefix = self.prefix.unwrap_or_else(|| PREFIX.to_string());
let suffix = self.suffix.unwrap_or_else(|| SUFFIX.to_string());
Expand Down

0 comments on commit b419b7b

Please sign in to comment.