diff --git a/rig-core/examples/reasoning_loop.rs b/rig-core/examples/reasoning_loop.rs index 8ad7397..179e343 100644 --- a/rig-core/examples/reasoning_loop.rs +++ b/rig-core/examples/reasoning_loop.rs @@ -90,11 +90,13 @@ async fn main() -> anyhow::Result<()> { .tool(Subtract) .tool(Multiply) .tool(Divide) - .build(), + .build(), }; // Prompt the agent and print the response - let result = agent.prompt("Calculate x for the equation: `20x + 23 = 400x / (1 - x)`").await?; + let result = agent + .prompt("Calculate x for the equation: `20x + 23 = 400x / (1 - x)`") + .await?; println!("\n\nReasoning Agent: {}", result); diff --git a/rig-core/src/agent/agent.rs b/rig-core/src/agent/completion.rs similarity index 100% rename from rig-core/src/agent/agent.rs rename to rig-core/src/agent/completion.rs diff --git a/rig-core/src/agent/mod.rs b/rig-core/src/agent/mod.rs index 6dbb6f9..4d2350d 100644 --- a/rig-core/src/agent/mod.rs +++ b/rig-core/src/agent/mod.rs @@ -107,10 +107,10 @@ //! .expect("Failed to prompt the agent"); //! ``` -mod agent; mod builder; +mod completion; mod prompt_request; -pub use agent::Agent; pub use builder::AgentBuilder; +pub use completion::Agent; pub use prompt_request::PromptRequest; diff --git a/rig-core/src/pipeline/agent_ops.rs b/rig-core/src/pipeline/agent_ops.rs index 33298cf..e79a223 100644 --- a/rig-core/src/pipeline/agent_ops.rs +++ b/rig-core/src/pipeline/agent_ops.rs @@ -1,7 +1,10 @@ use std::future::IntoFuture; use crate::{ - completion::{self, CompletionModel}, extractor::{ExtractionError, Extractor}, message::Message, vector_store + completion::{self, CompletionModel}, + extractor::{ExtractionError, Extractor}, + message::Message, + vector_store, }; use super::Op;