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.
23 lines
859 B
23 lines
859 B
#!/bin/bash |
|
cd /var/www/html |
|
php artisan tinker --execute " |
|
// Simulasi request langsung ke AiChatController |
|
\$service = app(App\Services\AiChatService::class); |
|
echo 'AiChatService available: ' . (\$service->isAvailable() ? 'YES' : 'NO') . PHP_EOL; |
|
echo 'OLLAMA_BASE_URL: ' . config('ollama.base_url') . PHP_EOL; |
|
echo 'OLLAMA_CHAT_MODEL: ' . config('ollama.chat_model') . PHP_EOL; |
|
echo 'PGVECTOR_HOST: ' . config('pgvector.host') . PHP_EOL; |
|
echo PHP_EOL; |
|
|
|
// Test chat |
|
echo 'Testing chat...' . PHP_EOL; |
|
\$result = \$service->chat( |
|
query: 'di mana route untuk feedback di geonet-console?', |
|
username: 'rbsetiawan', |
|
displayName: 'Rifqi', |
|
jobTitle: 'IT Admin', |
|
history: [] |
|
); |
|
echo 'Context chunks: ' . \$result['meta']['context_count'] . PHP_EOL; |
|
echo 'Answer: ' . PHP_EOL . \$result['answer'] . PHP_EOL; |
|
" 2>&1 | grep -v "Deprecated\|trim()"
|
|
|