Skip to content

Commit 4bbfd7e

Browse files
authored
feat: extend logging and support event feature (#61)
1 parent bf0a893 commit 4bbfd7e

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/DependencyInjection/LlmChainExtension.php

+1
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ private function processChainConfig(string $name, array $config, ContainerBuilde
219219

220220
// CHAIN
221221
$chainDefinition = (new Definition(Chain::class))
222+
->setAutowired(true)
222223
->setArgument('$platform', new Reference($config['platform']))
223224
->setArgument('$llm', new Reference('llm_chain.chain.'.$name.'.llm'));
224225

src/Resources/config/services.php

+2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
// tools
4141
->set('llm_chain.toolbox.abstract')
4242
->class(ToolBox::class)
43+
->autowire()
4344
->abstract()
4445
->args([
4546
'$tools' => abstract_arg('Collection of tools'),
@@ -64,6 +65,7 @@
6465
->tag('llm_chain.chain.output_processor')
6566
->args([
6667
'$toolBox' => service(ToolBoxInterface::class),
68+
'$eventDispatcher' => service('event_dispatcher')->nullOnInvalid(),
6769
])
6870

6971
// profiler

0 commit comments

Comments
 (0)