Enable Discovery debug logging for production troubleshooting
- Add DISCOVERY_LOG_LEVEL=debug - Add DISCOVERY_SHOW_PROGRESS=true - Temporary changes for debugging InitializerProcessor fixes on production
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Domain\AI;
|
||||
@@ -45,7 +46,6 @@ enum AiModel: string
|
||||
case OLLAMA_LLAMA3_2_3B = 'llama3.2:3b';
|
||||
case OLLAMA_DEEPSEEK_CODER = 'deepseek-coder:6.7b';
|
||||
|
||||
|
||||
public function getProvider(): AiProvider
|
||||
{
|
||||
return match($this) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Domain\AI;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Domain\AI;
|
||||
@@ -11,5 +12,6 @@ final class AiQuery
|
||||
public array $messages = [],
|
||||
public float $temperature = 0.7,
|
||||
public ?int $maxTokens = null
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Domain\AI;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Domain\AI;
|
||||
@@ -10,5 +11,6 @@ final class AiResponse
|
||||
public string $provider,
|
||||
public string $model,
|
||||
public ?int $tokensUsed = null
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Domain\AI\Exception;
|
||||
|
||||
use App\Framework\Exception\FrameworkException;
|
||||
use App\Domain\AI\AiProvider;
|
||||
use App\Framework\Exception\ExceptionContext;
|
||||
use App\Framework\Exception\FrameworkException;
|
||||
|
||||
class AiProviderUnavailableException extends FrameworkException
|
||||
{
|
||||
@@ -14,6 +16,15 @@ class AiProviderUnavailableException extends FrameworkException
|
||||
if ($reason) {
|
||||
$message .= ": $reason";
|
||||
}
|
||||
parent::__construct($message);
|
||||
|
||||
parent::__construct(
|
||||
message: $message,
|
||||
context: ExceptionContext::forOperation('ai_provider_connection', 'AI')
|
||||
->withData([
|
||||
'provider' => $provider->value,
|
||||
'reason' => $reason,
|
||||
'unavailable' => true,
|
||||
])
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Domain\AI;
|
||||
|
||||
enum Role:string
|
||||
enum Role: string
|
||||
{
|
||||
case SYSTEM = 'system';
|
||||
case USER = 'user';
|
||||
|
||||
Reference in New Issue
Block a user