Skip to content

Commit b86d6d8

Browse files
committed
Make the chat history example read better top-to-bottom
1 parent 1d0c10f commit b86d6d8

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

docs/ARCHITECTURE.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,11 +181,13 @@ _Note: Similarly to the previous example, even without specifying the model here
181181

182182
##### Fluent API
183183
```php
184+
$history = [
185+
new UserMessage('Do you spell it WordPress or Wordpress?'),
186+
new AgentMessage('The correct spelling is WordPress.'),
187+
];
188+
184189
$text = AiClient::prompt('Can you repeat that please?')
185-
->withHistory(
186-
new UserMessage('Do you spell it WordPress or Wordpress?'),
187-
new AgentMessage('The correct spelling is WordPress.')
188-
)
190+
->withHistory(...$history)
189191
->generateText();
190192
```
191193

0 commit comments

Comments
 (0)