This commit is contained in:
2026-07-21 23:07:35 +02:00
parent 80ee4cc892
commit 1d9e3bc7d4
21 changed files with 5029 additions and 3 deletions
+4 -3
View File
@@ -7,11 +7,11 @@ ini_set('error_log', __DIR__ . '/../errors.log');
ini_set('display_errors', '0');
error_reporting(E_ALL);
define('AI_SITE_LLM_API_BASE_URI', 'http://localhost:8080/v1');
define('AI_SITE_LLM_API_BASE_URI', 'http://ai2:11434/v1');
$pexelsKey = 'Clyqp9i9pewaxiiAdqVya0yZuuedjHtUtJdjRipNltp7wf0dY8K10h4h';
$apiKey = 'sk-Y1FrlvtAV4PWwK40TSVq-Q';
$model = 'llama';
$model = 'unsloth/gemma-4-12B-it-qat-GGUF:Q4_K_XL';
$maxTokens = 32768;
$reasoningEffort = 'medium';
$httpTimeoutSeconds = (float) (getenv('LLAMA_HTTP_TIMEOUT') ?: '600');
@@ -389,7 +389,8 @@ try {
$pexelsPhoto = fetchPexelsPhoto($pexelsKey, $imageQuery);
$html = injectHeroImagePlaceholders($html, $pexelsPhoto);
$timingBlock = '<div style="position:fixed;right:12px;bottom:12px;z-index:2147483647;background:rgba(17,24,39,.92);color:#fff;padding:8px 10px;border-radius:10px;font:12px/1.3 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;box-shadow:0 8px 20px rgba(0,0,0,.28)">Generated in ' . $elapsedSeconds . 's</div>';
$modelLabel = htmlspecialchars($model, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8');
$timingBlock = '<div style="position:fixed;right:12px;bottom:12px;z-index:2147483647;background:rgba(17,24,39,.92);color:#fff;padding:8px 10px;border-radius:10px;font:12px/1.3 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;box-shadow:0 8px 20px rgba(0,0,0,.28)">Generated in ' . $elapsedSeconds . 's<br>Model: ' . $modelLabel . '</div>';
if (stripos($html, '</body>') !== false) {
$html = preg_replace('/<\/body>/i', $timingBlock . '</body>', $html, 1) ?? ($html . $timingBlock);
} else {
Binary file not shown.

After

Width:  |  Height:  |  Size: 171 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 261 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 245 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB