1. Go to this page and download the library: Download gawrys/counterparty-ai library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
gawrys / counterparty-ai example snippets
use Gawrys\Counterparty\Ai\AiRiskStrategy;
use Gawrys\Counterparty\Ai\Prompt\RiskPromptBuilder;
use Gawrys\Counterparty\Ai\Research\AnthropicResearchProvider; // or OpenAiResearchProvider
use Gawrys\Counterparty\Ai\Tool\{RegistryTool, ReportLookupTool};
$strategy = new AiRiskStrategy(
provider: new AnthropicResearchProvider($http, $apiKey),
promptBuilder: new RiskPromptBuilder(),
tools: [new RegistryTool($registries), new ReportLookupTool()],
cache: $psr16Cache,
reviewThreshold: 0.6,
);
$verifier = new Verifier($checks, $strategy, $clock);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.