PHP code example of wiserwebsolutions / laravel-lobbyist-ai

1. Go to this page and download the library: Download wiserwebsolutions/laravel-lobbyist-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/ */

    

wiserwebsolutions / laravel-lobbyist-ai example snippets


use WiserWebSolutions\Lobbyist\Ai\Facades\LobbyistAi;
use WiserWebSolutions\Lobbyist\Facades\Lobbyist;

// Summaries (structured: headline / summary / key_points), cached.
$bill = Lobbyist::state('CA')->bill('AB1');
$summary = LobbyistAi::summarizeBill($bill);

// Classification (controlled subjects + tags + impact).
$tags = LobbyistAi::classifyBill($bill);

// Natural-language Q&A — the agent calls the driver tools to get the facts.
$answer = LobbyistAi::ask('What education bills are moving in PA this session?', 'PA');

// Semantic search (after indexing).
$matches = LobbyistAi::search('cursive handwriting in schools', 'PA');
bash
composer vendor:publish --tag=lobbyist-ai-config
php artisan vendor:publish --tag=lobbyist-ai-migrations
php artisan migrate
bash
php artisan lobbyist-ai:index PA