Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: incorrect method #904

Merged
merged 1 commit into from
Feb 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/src/usage/arbiter_engine/agents_and_engines.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ use crate::Replier;
fn setup() {
let ping_replier = Replier::new("ping", "pong", 5, None);
let pong_replier = Replier::new("pong", "ping", 5, Some("ping"));
let agent = Agent::new("my_agent")
let agent = Agent::builder("my_agent")
.with_behavior(ping_replier)
.with_behavior(pong_replier);
}
Expand All @@ -55,4 +55,4 @@ In this example, we have created an `Agent` with two `Replier` behaviors.
The `ping_replier` will reply to a message with "pong" and the `pong_replier` will reply to a message with "ping".
Given that the `pong_replier` has a `startup_message` of "ping", it will send a message to everyone (including the "my_agent" itself who holds the `ping_replier` behavior) when it starts up.
This will start a chain of messages that will continue in a "ping" "pong" fashion until the `max_count` is reached.
```
```
Loading