Skip to content
This repository was archived by the owner on Jul 16, 2025. It is now read-only.

Conversation

Nyholm
Copy link
Contributor

@Nyholm Nyholm commented May 25, 2025

We would like this package to be the low-level package. Ie, we cannot have a dependency to the high-level php-llm/llm-chain.

I have moved models and interfaces to this package. These will of course be part of the contract. I'll continue this work with adding support other capabilities like for Resources and Prompts

@Nyholm Nyholm changed the title remove dependency on llm-chain feat: remove dependency on llm-chain May 25, 2025
@chr-hertel
Copy link
Member

i wonder if the toolbox thingy should be decoupled from llm-chain anyways in a separat package that than could have a bridge to this one.
on top the mcp-bundle could integrate all of that again for easy #[AsTool] usage again


namespace PhpLlm\McpSdk\Exception;

use PhpLlm\LlmChain\Exception\ExceptionInterface as BaseExceptionInterface;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it still intended to have the dependency here? looks wrong to me

use PhpLlm\McpSdk\Message\Error;
use PhpLlm\McpSdk\Message\Request;
use PhpLlm\McpSdk\Message\Response;

final class ToolCallHandler extends BaseRequestHandler
{
public function __construct(
private readonly ToolboxInterface $toolbox,
private readonly ToolExecutorInterface $toolbox,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
private readonly ToolExecutorInterface $toolbox,
private readonly ToolExecutorInterface $toolExecutor,

use PhpLlm\McpSdk\Message\Request;
use PhpLlm\McpSdk\Message\Response;

final class ToolListHandler extends BaseRequestHandler
{
public function __construct(
private readonly ToolboxInterface $toolbox,
private readonly ToolCollectionInterface $toolbox,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
private readonly ToolCollectionInterface $toolbox,
private readonly ToolCollectionInterface $toolCollection,

@chr-hertel chr-hertel merged commit 158beba into php-llm:main May 25, 2025
6 of 7 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants