All tools in this package are designed to work with Echolabs Prism`. Here’s a basic example:
Copy
use EchoLabs\Prism\Prism;use EchoLabs\Prism\Enums\Provider;use EchoLabs\Prism\Enums\ToolChoice;use JordanPrice\Toolbox\Tools\Weather\WeatherTool;$weatherTool = new WeatherTool();$prism = Prism::text() ->using(Provider::Anthropic, 'claude-3-5-sonnet-latest') ->withPrompt('What is the weather in London?') ->withTools([$weatherTool]) // Pass the tool instance ->toolChoice(ToolChoice::Any);$response = $prism->generate();
For more detailed examples, see the individual tool documentation.