HEX
Server: nginx/1.18.0
System: Linux test-ipsremont 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
User: ips (1000)
PHP: 8.0.30
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/ai-notam/README.md
# AI NOTAM


Laravel code using files src/common/json-data/summary.json and src/common/json-data/fine-tuning.jsonl to get Preset data for form prototype.

Prompt copied from src/modules/chat-gpt/chat-gpt.service.ts

ChatGPT gpt-4o-mini model used. Calls foes from PHP and request/response/tokens number saved to database.

AlpineJS and JsonEditor (https://jsoneditoronline.org/) libs used on frontend

## Laravel Installation

1. Create empty mysql database

2. Create file .env in root folder and change database params in file + CHAT_GPT_KEY

```
APP_NAME=Laravel
APP_ENV=local
APP_KEY=base64:ZKDYObOKmodXjqvYmhhJJHApCX5y9DrcDcRHT97DeJA=
APP_DEBUG=true
APP_TIMEZONE=UTC
APP_URL=http://notam.loc

APP_LOCALE=en
APP_FALLBACK_LOCALE=en
APP_FAKER_LOCALE=en_US

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=notam
DB_USERNAME=root
DB_PASSWORD=root

VITE_APP_NAME="${APP_NAME}"
CHATGPT_API_KEY=CHAT_GPT_KEY
```

3. Execute commands

```
composer install
php artisan migrate
```
4. Point domain/subdomain to /laravel/public folder

5. Open https://YOURSITE.COM/register and create account

6. Login on main site page or https://YOURSITE.COM/login

## Local LLM installation

### In ollama container 

build a container:

docker compose -f n8n-docker-compose.yml up -d --build ollama

ollama create notam-model -f /files/Modelfile
ollama run notam-model:latest --hidethinking

### Fine-tuning local model

https://cookbook.openai.com/articles/gpt-oss/fine-tune-transfomers