Integrate dbn-legal-agent-v2: upgrade all v1 refs + add Korrespond legal-check
- Replace dbn-legal-agent with dbn-legal-agent-v2 in bootstrap.php (dbnToolsRunLegalCheck), DeepResearchAgent.php (interpretSeed, expandQueries, synthesis fallback, deploy label), BvjAnalyzerAgent.php (check_model label) — 8 locations total - Add dbn-legal-agent-v2 legal threshold check to KorrespondAgent: called after selfCheck() in both generate() and refine(); result surfaced as legal_check[] in the API response - Render legal_check card in korrespond.js using existing bvj-red-flag styles; shows only when non-empty - Add .korr-legal-check CSS block in tools.css Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -494,7 +494,7 @@ PROMPT;
|
||||
$userMsg = ['role' => 'user', 'content' => $prompt];
|
||||
if ($language === 'no' || $advocateRole !== '') {
|
||||
$resp = dbnToolsCallGpuLlm([$sysMsg, $userMsg], [
|
||||
'model' => 'dbn-legal-agent', 'json' => true,
|
||||
'model' => 'dbn-legal-agent-v2', 'json' => true,
|
||||
'temperature' => 0.1, 'max_tokens' => 500, 'timeout' => 40,
|
||||
]);
|
||||
$raw = (string)($resp['choices'][0]['message']['content'] ?? '');
|
||||
@@ -593,7 +593,7 @@ PROMPT;
|
||||
$userMsg = ['role' => 'user', 'content' => $prompt];
|
||||
if ($language === 'no') {
|
||||
$resp = dbnToolsCallGpuLlm([$sysMsg, $userMsg], [
|
||||
'model' => 'dbn-legal-agent', 'json' => true,
|
||||
'model' => 'dbn-legal-agent-v2', 'json' => true,
|
||||
'temperature' => 0.2, 'max_tokens' => 700, 'timeout' => 50,
|
||||
]);
|
||||
$raw = (string)($resp['choices'][0]['message']['content'] ?? '');
|
||||
@@ -981,7 +981,7 @@ PROMPT;
|
||||
],
|
||||
'deploy_label' => match($engine) {
|
||||
'gpu' => 'GPU (cuttlefish)',
|
||||
'dbn_legal' => 'dbn-legal-agent',
|
||||
'dbn_legal' => 'dbn-legal-agent-v2',
|
||||
'azure_full'=> 'gpt-4o',
|
||||
default => $this->azure->chatDeployment(),
|
||||
},
|
||||
@@ -1122,8 +1122,8 @@ PROMPT;
|
||||
|
||||
try {
|
||||
if ($engine === 'dbn_legal') {
|
||||
$response = dbnToolsCallGpuLlm($messages, array_merge($opts, ['model' => 'dbn-legal-agent', 'timeout' => 180]));
|
||||
$deployLabel = 'dbn-legal-agent';
|
||||
$response = dbnToolsCallGpuLlm($messages, array_merge($opts, ['model' => 'dbn-legal-agent-v2', 'timeout' => 180]));
|
||||
$deployLabel = 'dbn-legal-agent-v2';
|
||||
$raw = (string)($response['choices'][0]['message']['content'] ?? '');
|
||||
} elseif ($engine === 'gpu') {
|
||||
$response = dbnToolsCallGpuLlm($messages, $opts);
|
||||
|
||||
Reference in New Issue
Block a user