Skip to content

Commit a89e3ff

Browse files
authored
fix: patch LLM Chain class names after BC break (#5)
1 parent e6b5a74 commit a89e3ff

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/Server/RequestHandler/ToolCallHandler.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace PhpLlm\McpSdk\Server\RequestHandler;
66

7-
use PhpLlm\LlmChain\Chain\ToolBox\ToolBoxInterface;
7+
use PhpLlm\LlmChain\Chain\Toolbox\ToolboxInterface;
88
use PhpLlm\LlmChain\Exception\ExceptionInterface;
99
use PhpLlm\LlmChain\Model\Response\ToolCall;
1010
use PhpLlm\McpSdk\Message\Error;
@@ -15,7 +15,7 @@
1515
final class ToolCallHandler extends BaseRequestHandler
1616
{
1717
public function __construct(
18-
private readonly ToolBoxInterface $toolBox,
18+
private readonly ToolboxInterface $toolbox,
1919
) {
2020
}
2121

@@ -25,7 +25,7 @@ public function createResponse(Request|Notification $message): Response|Error
2525
$arguments = $message->params['arguments'] ?? [];
2626

2727
try {
28-
$result = $this->toolBox->execute(new ToolCall(uniqid(), $name, $arguments));
28+
$result = $this->toolbox->execute(new ToolCall(uniqid(), $name, $arguments));
2929
} catch (ExceptionInterface) {
3030
return Error::internalError($message->id, 'Error while executing tool');
3131
}

src/Server/RequestHandler/ToolListHandler.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44

55
namespace PhpLlm\McpSdk\Server\RequestHandler;
66

7-
use PhpLlm\LlmChain\Chain\ToolBox\Metadata;
8-
use PhpLlm\LlmChain\Chain\ToolBox\ToolBoxInterface;
7+
use PhpLlm\LlmChain\Chain\Toolbox\Metadata;
8+
use PhpLlm\LlmChain\Chain\Toolbox\ToolboxInterface;
99
use PhpLlm\McpSdk\Message\Notification;
1010
use PhpLlm\McpSdk\Message\Request;
1111
use PhpLlm\McpSdk\Message\Response;
1212

1313
final class ToolListHandler extends BaseRequestHandler
1414
{
1515
public function __construct(
16-
private readonly ToolBoxInterface $toolBox,
16+
private readonly ToolboxInterface $toolbox,
1717
) {
1818
}
1919

@@ -29,7 +29,7 @@ public function createResponse(Request|Notification $message): Response
2929
'$schema' => 'http://json-schema.org/draft-07/schema#',
3030
],
3131
];
32-
}, $this->toolBox->getMap()),
32+
}, $this->toolbox->getMap()),
3333
]);
3434
}
3535

0 commit comments

Comments
 (0)