Skip to content

Commit fb446e4

Browse files
committed
Use a different prompt structure for chat history to show flexibility
1 parent 985cd42 commit fb446e4

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

docs/ARCHITECTURE.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -181,13 +181,12 @@ _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-
189-
$text = AiClient::prompt('Can you repeat that please?')
190-
->withHistory(...$history)
184+
$text = AiClient::prompt()
185+
->withHistory(
186+
new UserMessage('Do you spell it WordPress or Wordpress?'),
187+
new AgentMessage('The correct spelling is WordPress.'),
188+
)
189+
->withText('Can you repeat that please?')
191190
->generateText();
192191
```
193192

0 commit comments

Comments
 (0)