You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
603 B
14 lines
603 B
<?php |
|
require __DIR__.'/vendor/autoload.php'; |
|
$app = require __DIR__.'/bootstrap/app.php'; |
|
$app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap(); |
|
$service = $app->make(App\Services\ProjectSearchService::class); |
|
echo $service->isAvailable() ? "INDEX_OK\n" : "INDEX_NO\n"; |
|
$status = $service->indexStatus(); |
|
echo 'runs='.count($status)."\n"; |
|
if ($status !== []) { |
|
echo json_encode($status[0], JSON_UNESCAPED_UNICODE)."\n"; |
|
} |
|
$result = $service->ask('carikan projek Pertamina', ['project'], 5); |
|
echo 'results='.count($result['results'])."\n"; |
|
echo substr($result['answer'], 0, 200)."\n";
|
|
|