Skip to content

Commit

Permalink
docs: incorrect method (#904)
Browse files Browse the repository at this point in the history
  • Loading branch information
ts0yu authored Feb 16, 2024
1 parent d768fd7 commit 2913315
Showing 1 changed file with 2 additions and 2 deletions.
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.
```
```

0 comments on commit 2913315

Please sign in to comment.