@@ -96,7 +96,7 @@ use PhpLlm\LlmChain\Model\Message\MessageBag;
9696
9797// Platform & LLM instantiation
9898
99- $chain = new Chain($platform, $llm );
99+ $chain = new Chain($platform, $model );
100100$messages = new MessageBag(
101101 Message::forSystem('You are a helpful chatbot answering questions about LLM Chain.'),
102102 Message::ofUser('Hello, how are you?'),
@@ -156,7 +156,7 @@ $yourTool = new YourTool();
156156$toolbox = Toolbox::create($yourTool);
157157$toolProcessor = new ChainProcessor($toolbox);
158158
159- $chain = new Chain($platform, $llm , inputProcessor: [$toolProcessor], outputProcessor: [$toolProcessor]);
159+ $chain = new Chain($platform, $model , inputProcessor: [$toolProcessor], outputProcessor: [$toolProcessor]);
160160```
161161
162162Custom tools can basically be any class, but must configure by the ` #[AsTool] ` attribute.
@@ -314,7 +314,7 @@ use PhpLlm\LlmChain\Chain\Toolbox\FaultTolerantToolbox;
314314$toolbox = new FaultTolerantToolbox($innerToolbox);
315315$toolProcessor = new ChainProcessor($toolbox);
316316
317- $chain = new Chain($platform, $llm , inputProcessor: [$toolProcessor], outputProcessor: [$toolProcessor]);
317+ $chain = new Chain($platform, $model , inputProcessor: [$toolProcessor], outputProcessor: [$toolProcessor]);
318318```
319319
320320#### Tool Filtering
@@ -411,7 +411,7 @@ use PhpLlm\LlmChain\Chain\Toolbox\Toolbox;
411411$similaritySearch = new SimilaritySearch($embeddings, $store);
412412$toolbox = Toolbox::create($similaritySearch);
413413$processor = new ChainProcessor($toolbox);
414- $chain = new Chain($platform, $llm , [$processor], [$processor]);
414+ $chain = new Chain($platform, $model , [$processor], [$processor]);
415415
416416$messages = new MessageBag(
417417 Message::forSystem(<<<PROMPT
@@ -450,6 +450,7 @@ LLM Chain supports that use-case by abstracting the hustle of defining and provi
450450the response back to PHP objects.
451451
452452To achieve this, a specific chain processor needs to be registered:
453+
453454```php
454455use PhpLlm\LlmChain\Chain;
455456use PhpLlm\LlmChain\Model\Message\Message;
@@ -465,7 +466,7 @@ use Symfony\Component\Serializer\Serializer;
465466
466467$serializer = new Serializer([new ObjectNormalizer()], [new JsonEncoder()]);
467468$processor = new ChainProcessor(new ResponseFormatFactory(), $serializer);
468- $chain = new Chain($platform, $llm , [$processor], [$processor]);
469+ $chain = new Chain($platform, $model , [$processor], [$processor]);
469470
470471$messages = new MessageBag(
471472 Message::forSystem(' You are a helpful math tutor. Guide the user through the solution step by step. ' ),
@@ -524,7 +525,7 @@ use PhpLlm\LlmChain\Message\MessageBag;
524525
525526// Initialize Platform and LLM
526527
527- $chain = new Chain($llm );
528+ $chain = new Chain($model );
528529$messages = new MessageBag(
529530 Message::forSystem(' You are a thoughtful philosopher. ' ),
530531 Message::ofUser(' What is the purpose of an ant? ' ),
@@ -659,7 +660,7 @@ use PhpLlm\LlmChain\Chain;
659660
660661// Initialize Platform, LLM and processors
661662
662- $chain = new Chain($platform, $llm , $inputProcessors, $outputProcessors);
663+ $chain = new Chain($platform, $model , $inputProcessors, $outputProcessors);
663664```
664665
665666#### InputProcessor
0 commit comments