Skip to content

Commit 0930e73

Browse files
authored
docs: add section about $options argument (#183)
1 parent bec9272 commit 0930e73

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,24 @@ echo $response->getContent(); // "I'm fine, thank you. How can I help you today?
9797

9898
The `MessageInterface` and `Content` interface help to customize this process if needed, e.g. additional state handling.
9999

100+
#### Options
101+
102+
The second parameter of the `call` method is an array of options, which can be used to configure the behavior of the
103+
chain, like `stream`, `output_structure`, or `response_format`. This behavior is a combination of features provided by
104+
the underlying model and platform, or additional features provided by processors registered to the chain.
105+
106+
Options design for additional features provided by LLM Chain can be found in this documentation. For model and platform
107+
specific options, please refer to the respective documentation.
108+
109+
```php
110+
// Chain and MessageBag instantiation
111+
112+
$response = $chain->call($messages, [
113+
'temperature' => 0.5, // example option controlling the randomness of the response, e.g. GPT and Claude
114+
'n' => 3, // example option controlling the number of responses generated, e.g. GPT
115+
]);
116+
```
117+
100118
#### Code Examples
101119

102120
1. **Anthropic's Claude**: [chat-claude-anthropic.php](examples/chat-claude-anthropic.php)

0 commit comments

Comments
 (0)