maela 2 дней назад
Родитель
Сommit
b468cb4bad
2 измененных файлов: 147 добавлений и 104 удалений
  1. +116
    -97
      WebUI/ReAct_PME.WebUI/Pages/ChatRoom/ChatRoom_base.razor
  2. +31
    -7
      WebUI/ReAct_PME.WebUI/Pages/ChatRoom/ChatRoom_base.razor.cs

+ 116
- 97
WebUI/ReAct_PME.WebUI/Pages/ChatRoom/ChatRoom_base.razor Просмотреть файл

@@ -81,6 +81,7 @@
</label>

<div class="input-right-actions">
@* Sélecteur de domaine pour RAG *@
@if (!hiddenDomain && SelectedAgentType == 2 && RagDomains.Any())
{
<select class="domain-select" @bind="SelectedDomain">
@@ -90,6 +91,17 @@
}
</select>
}

@* Input ID Client pour AUDIT *@
@if (SelectedAgentType == 3)
{
<input type="text"
class="client-id-input"
@bind="ClientId"
placeholder="ID Client"
aria-label="ID Client" />
}

<button class="voice-button" @onclick="RecordVoice" aria-label="Message vocal">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M8.5 2a.5.5 0 0 1 .5.5v11a.5.5 0 0 1-1 0v-11a.5.5 0 0 1 .5-.5m-2 2a.5.5 0 0 1 .5.5v7a.5.5 0 0 1-1 0v-7a.5.5 0 0 1 .5-.5m4 0a.5.5 0 0 1 .5.5v7a.5.5 0 0 1-1 0v-7a.5.5 0 0 1 .5-.5m-6 1.5A.5.5 0 0 1 5 6v4a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m8 0a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m-10 1A.5.5 0 0 1 3 7v2a.5.5 0 0 1-1 0V7a.5.5 0 0 1 .5-.5m12 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0V7a.5.5 0 0 1 .5-.5" />
@@ -98,7 +110,7 @@

<button class="send-button"
@onclick="SendMessageFromHome"
disabled="@((string.IsNullOrWhiteSpace(CurrentInput) && !UploadedDocuments.Any()) || isDisabled)"
disabled="@((string.IsNullOrWhiteSpace(CurrentInput) && !UploadedDocuments.Any()) || isDisabled || (SelectedAgentType == 3 && string.IsNullOrWhiteSpace(ClientId)))"
aria-label="Envoyer le message">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M8 15a.5.5 0 0 0 .5-.5V2.707l3.146 3.147a.5.5 0 0 0 .708-.708l-4-4a.5.5 0 0 0-.708 0l-4 4a.5.5 0 1 0 .708.708L7.5 2.707V14.5a.5.5 0 0 0 .5.5" />
@@ -109,112 +121,112 @@
</div>

<!-- Cartes des agents -->
<div class="agents-grid">
<label class="agent-card @(SelectedAgentType == 1 ? "selected" : "")" for="agent1">
<input type="radio"
id="agent1"
name="agentType"
value="1"
checked="@(SelectedAgentType == 1)"
@onchange="() => SelectAgent(1)" />
<div class="agent-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="26" height="26" fill="currentColor" viewBox="0 0 16 16">
<path d="M12.146.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1 0 .708l-10 10a.5.5 0 0 1-.168.11l-5 2a.5.5 0 0 1-.65-.65l2-5a.5.5 0 0 1 .11-.168zM11.207 2.5 13.5 4.793 14.793 3.5 12.5 1.207zm1.586 3L10.5 3.207 4 9.707V10h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.293zm-9.761 5.175-.106.106-1.528 3.821 3.821-1.528.106-.106A.5.5 0 0 1 5 12.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.468-.325" />
</svg>
</div>
<div class="agent-content">
<h3 class="agent-name">conversation</h3>
<p class="agent-description">
<div class="agents-grid">
<label class="agent-card @(SelectedAgentType == 1 ? "selected" : "")" for="agent1">
<input type="radio"
id="agent1"
name="agentType"
value="1"
checked="@(SelectedAgentType == 1)"
@onchange="() => SelectAgent(1)" />
<div class="agent-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="26" height="26" fill="currentColor" viewBox="0 0 16 16">
<path d="M12.146.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1 0 .708l-10 10a.5.5 0 0 1-.168.11l-5 2a.5.5 0 0 1-.65-.65l2-5a.5.5 0 0 1 .11-.168zM11.207 2.5 13.5 4.793 14.793 3.5 12.5 1.207zm1.586 3L10.5 3.207 4 9.707V10h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.293zm-9.761 5.175-.106.106-1.528 3.821 3.821-1.528.106-.106A.5.5 0 0 1 5 12.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.468-.325" />
</svg>
</div>
<div class="agent-content">
<h3 class="agent-name">conversation</h3>
<p class="agent-description">
Discutez avec un agent IA ayant une bonne connaissance de votre secteur d'activité
</p>
</div>
<div class="agent-check">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" viewBox="0 0 16 16">
<path d="M10.97 4.97a.75.75 0 0 1 1.07 1.05l-3.99 4.99a.75.75 0 0 1-1.08.02L4.324 8.384a.75.75 0 1 1 1.06-1.06l2.094 2.093 3.473-4.425z"/>
</svg>
</div>
</label>
</p>
</div>
<div class="agent-check">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" viewBox="0 0 16 16">
<path d="M10.97 4.97a.75.75 0 0 1 1.07 1.05l-3.99 4.99a.75.75 0 0 1-1.08.02L4.324 8.384a.75.75 0 1 1 1.06-1.06l2.094 2.093 3.473-4.425z" />
</svg>
</div>
</label>

<label class="agent-card @(SelectedAgentType == 2 ? "selected" : "")" for="agent2">
<input type="radio"
id="agent2"
name="agentType"
value="2"
checked="@(SelectedAgentType == 2)"
@onchange="() => SelectAgent(2)" />
<div class="agent-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="26" height="26" fill="currentColor" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M5 11.5a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5m0-4a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5m0-4a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5M3.854 2.146a.5.5 0 0 1 0 .708l-1.5 1.5a.5.5 0 0 1-.708 0l-.5-.5a.5.5 0 1 1 .708-.708L2 3.293l1.146-1.147a.5.5 0 0 1 .708 0m0 4a.5.5 0 0 1 0 .708l-1.5 1.5a.5.5 0 0 1-.708 0l-.5-.5a.5.5 0 1 1 .708-.708L2 7.293l1.146-1.147a.5.5 0 0 1 .708 0m0 4a.5.5 0 0 1 0 .708l-1.5 1.5a.5.5 0 0 1-.708 0l-.5-.5a.5.5 0 0 1 .708-.708l.146.147 1.146-1.147a.5.5 0 0 1 .708 0" />
</svg>
</div>
<div class="agent-content">
<h3 class="agent-name">Agent RAG</h3>
<p class="agent-description">
<label class="agent-card @(SelectedAgentType == 2 ? "selected" : "")" for="agent2">
<input type="radio"
id="agent2"
name="agentType"
value="2"
checked="@(SelectedAgentType == 2)"
@onchange="() => SelectAgent(2)" />
<div class="agent-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="26" height="26" fill="currentColor" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M5 11.5a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5m0-4a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5m0-4a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5M3.854 2.146a.5.5 0 0 1 0 .708l-1.5 1.5a.5.5 0 0 1-.708 0l-.5-.5a.5.5 0 1 1 .708-.708L2 3.293l1.146-1.147a.5.5 0 0 1 .708 0m0 4a.5.5 0 0 1 0 .708l-1.5 1.5a.5.5 0 0 1-.708 0l-.5-.5a.5.5 0 1 1 .708-.708L2 7.293l1.146-1.147a.5.5 0 0 1 .708 0m0 4a.5.5 0 0 1 0 .708l-1.5 1.5a.5.5 0 0 1-.708 0l-.5-.5a.5.5 0 0 1 .708-.708l.146.147 1.146-1.147a.5.5 0 0 1 .708 0" />
</svg>
</div>
<div class="agent-content">
<h3 class="agent-name">Agent RAG</h3>
<p class="agent-description">
un agent possédant une excellente connaissance de votre base documentaire
</p>
</div>
<div class="agent-check">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" viewBox="0 0 16 16">
<path d="M10.97 4.97a.75.75 0 0 1 1.07 1.05l-3.99 4.99a.75.75 0 0 1-1.08.02L4.324 8.384a.75.75 0 1 1 1.06-1.06l2.094 2.093 3.473-4.425z"/>
</svg>
</div>
</label>
</div>
<div class="agent-check">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" viewBox="0 0 16 16">
<path d="M10.97 4.97a.75.75 0 0 1 1.07 1.05l-3.99 4.99a.75.75 0 0 1-1.08.02L4.324 8.384a.75.75 0 1 1 1.06-1.06l2.094 2.093 3.473-4.425z" />
</svg>
</div>
</label>

<label class="agent-card @(SelectedAgentType == 3 ? "selected" : "")" for="agent3">
<input type="radio"
id="agent3"
name="agentType"
value="3"
checked="@(SelectedAgentType == 3)"
@onchange="() => SelectAgent(3)" />
<div class="agent-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="26" height="26" fill="currentColor" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M10.854 6.146a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 1 1 .708-.708L7.5 8.793l2.646-2.647a.5.5 0 0 1 .708 0" />
<path d="M3 0h10a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2v-1h1v1a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1H3a1 1 0 0 0-1 1v1H1V2a2 2 0 0 1 2-2" />
<path d="M1 5v-.5a.5.5 0 0 1 1 0V5h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1zm0 3v-.5a.5.5 0 0 1 1 0V8h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1zm0 3v-.5a.5.5 0 0 1 1 0v.5h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1z" />
</svg>
</div>
<div class="agent-content">
<label class="agent-card @(SelectedAgentType == 3 ? "selected" : "")" for="agent3">
<input type="radio"
id="agent3"
name="agentType"
value="3"
checked="@(SelectedAgentType == 3)"
@onchange="() => SelectAgent(3)" />
<div class="agent-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="26" height="26" fill="currentColor" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M10.854 6.146a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 1 1 .708-.708L7.5 8.793l2.646-2.647a.5.5 0 0 1 .708 0" />
<path d="M3 0h10a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2v-1h1v1a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1H3a1 1 0 0 0-1 1v1H1V2a2 2 0 0 1 2-2" />
<path d="M1 5v-.5a.5.5 0 0 1 1 0V5h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1zm0 3v-.5a.5.5 0 0 1 1 0V8h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1zm0 3v-.5a.5.5 0 0 1 1 0v.5h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1z" />
</svg>
</div>
<div class="agent-content">
<h3 class="agent-name">L'agent Audit</h3>
<p class="agent-description">
Un agent IA spécialisé dans l'étude de vos documents et dans la réalisation d'audit financier
</p>
</div>
<div class="agent-check">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" viewBox="0 0 16 16">
<path d="M10.97 4.97a.75.75 0 0 1 1.07 1.05l-3.99 4.99a.75.75 0 0 1-1.08.02L4.324 8.384a.75.75 0 1 1 1.06-1.06l2.094 2.093 3.473-4.425z"/>
</svg>
</div>
</label>
</div>
<div class="agent-check">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" viewBox="0 0 16 16">
<path d="M10.97 4.97a.75.75 0 0 1 1.07 1.05l-3.99 4.99a.75.75 0 0 1-1.08.02L4.324 8.384a.75.75 0 1 1 1.06-1.06l2.094 2.093 3.473-4.425z" />
</svg>
</div>
</label>

<label class="agent-card @(SelectedAgentType == 4 ? "selected" : "")" for="agent4">
<input type="radio"
id="agent4"
name="agentType"
value="4"
checked="@(SelectedAgentType == 4)"
@onchange="() => SelectAgent(4)" />
<div class="agent-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="26" height="26" fill="currentColor" viewBox="0 0 16 16">
<path d="M.05 3.555A2 2 0 0 1 2 2h12a2 2 0 0 1 1.95 1.555L8 8.414zM0 4.697v7.104l5.803-3.558zM6.761 8.83l-6.57 4.027A2 2 0 0 0 2 14h12a2 2 0 0 0 1.808-1.144l-6.57-4.027L8 9.586zm3.436-.586L16 11.801V4.697z" />
</svg>
</div>
<div class="agent-content">
<label class="agent-card @(SelectedAgentType == 4 ? "selected" : "")" for="agent4">
<input type="radio"
id="agent4"
name="agentType"
value="4"
checked="@(SelectedAgentType == 4)"
@onchange="() => SelectAgent(4)" />
<div class="agent-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="26" height="26" fill="currentColor" viewBox="0 0 16 16">
<path d="M.05 3.555A2 2 0 0 1 2 2h12a2 2 0 0 1 1.95 1.555L8 8.414zM0 4.697v7.104l5.803-3.558zM6.761 8.83l-6.57 4.027A2 2 0 0 0 2 14h12a2 2 0 0 0 1.808-1.144l-6.57-4.027L8 9.586zm3.436-.586L16 11.801V4.697z" />
</svg>
</div>
<div class="agent-content">
<h3 class="agent-name">L'agent mail spécialisé</h3>
<p class="agent-description">
un agent IA spécialisé dans le traitement de vos mails avec une approche humaine et experte
</p>
</div>
<div class="agent-check">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" viewBox="0 0 16 16">
<path d="M10.97 4.97a.75.75 0 0 1 1.07 1.05l-3.99 4.99a.75.75 0 0 1-1.08.02L4.324 8.384a.75.75 0 1 1 1.06-1.06l2.094 2.093 3.473-4.425z"/>
</svg>
</div>
</label>
</div>
<div class="agent-check">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" viewBox="0 0 16 16">
<path d="M10.97 4.97a.75.75 0 0 1 1.07 1.05l-3.99 4.99a.75.75 0 0 1-1.08.02L4.324 8.384a.75.75 0 1 1 1.06-1.06l2.094 2.093 3.473-4.425z" />
</svg>
</div>
</label>
</div>
</div>
</div>
</div>
</div>

}
else
@@ -228,7 +240,7 @@ else
<div class="chatroom-empty">
<div class="empty-icon">💬</div>
<h3>Commencez une conversation</h3>
<p>Posez une question ou envoyez un message pour démarrer</p>
<p>Tapez votre premier message ci-dessous</p>
</div>
}
else
@@ -240,8 +252,7 @@ else
@if (msg.IsUser)
{
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" viewBox="0 0 16 16">
<path d="M11 6a3 3 0 1 1-6 0 3 3 0 0 1 6 0" />
<path fill-rule="evenodd" d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8m8-7a7 7 0 0 0-5.468 11.37C3.242 11.226 4.805 10 8 10s4.757 1.225 5.468 2.37A7 7 0 0 0 8 1" />
<path d="M8 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6m2-3a2 2 0 1 1-4 0 2 2 0 0 1 4 0m4 8c0 1-1 1-1 1H3s-1 0-1-1 1-4 6-4 6 3 6 4m-1-.004c-.001-.246-.154-.986-.832-1.664C11.516 10.68 10.289 10 8 10s-3.516.68-4.168 1.332c-.678.678-.83 1.418-.832 1.664z" />
</svg>
}
else
@@ -252,17 +263,15 @@ else
</svg>
}
</div>

<div class="message-content-wrapper">
<div class="bubble @(msg.IsUser ? "bubble-user" : "bubble-assistant")">
@msg.Text
</div>

@if (!msg.IsUser)
{
<div class="message-actions">
<button class="btn-message-action" @onclick="() => CopyMessage(msg.Text)" title="Copier">
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="currentColor" viewBox="0 0 16 16">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
<path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1z" />
<path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0z" />
</svg>
@@ -357,6 +366,16 @@ else
</select>
}

@* Input ID Client pour AUDIT *@
@if (TypeLLM == 3)
{
<input type="text"
class="client-id-input"
@bind="ClientId"
placeholder="ID Client"
aria-label="ID Client" />
}

<!-- Bouton historique -->
<button class="history-button @(IsWithHistorique ? "active" : "desactive")" @onclick="ToggleHistory" title="@(IsWithHistorique ? "Historique activé" : "Historique désactivé")">
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="currentColor" viewBox="0 0 16 16">
@@ -374,7 +393,7 @@ else
<!-- Bouton envoyer -->
<button class="send-button"
@onclick="SendMessage"
disabled="@(string.IsNullOrWhiteSpace(CurrentInput) && !UploadedDocuments.Any())"
disabled="@((string.IsNullOrWhiteSpace(CurrentInput) && !UploadedDocuments.Any()) || (TypeLLM == 3 && string.IsNullOrWhiteSpace(ClientId)))"
aria-label="Envoyer le message">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M8 15a.5.5 0 0 0 .5-.5V2.707l3.146 3.147a.5.5 0 0 0 .708-.708l-4-4a.5.5 0 0 0-.708 0l-4 4a.5.5 0 1 0 .708.708L7.5 2.707V14.5a.5.5 0 0 0 .5.5" />

+ 31
- 7
WebUI/ReAct_PME.WebUI/Pages/ChatRoom/ChatRoom_base.razor.cs Просмотреть файл

@@ -42,6 +42,7 @@ namespace ReAct_PME.WebUI.Pages.ChatRoom

public string CurrentInput { get; set; } = "";
public int SelectedAgentType { get; set; } = 1; // Agent par défaut sélectionné
public string ClientId { get; set; } = ""; // ID Client pour AUDIT

// Options
public List<string> RagDomains { get; set; } = new();
@@ -66,34 +67,35 @@ namespace ReAct_PME.WebUI.Pages.ChatRoom
{
SelectedMode = "llm";
IsWithHistorique = true;
hiddenDomain = true;
hiddenDomain = true;
}
else if (TypeLLM == 2)
{
SelectedMode = "rag";
IsWithHistorique = false;
hiddenDomain = false;
hiddenDomain = false;
await LoadRagDomains();
if (RagDomains.Any())
SelectedDomain = RagDomains[0];
}
else if (TypeLLM == 3)
{
SelectedMode = "code";
IsWithHistorique = true;
hiddenDomain = true;
SelectedMode = "audit";
IsWithHistorique = false;
hiddenDomain = true;
SelectedDomain = "comptabilite"; // Domaine fixe pour AUDIT
}
else if (TypeLLM == 4)
{
SelectedMode = "image";
IsWithHistorique = false;
hiddenDomain = true;
hiddenDomain = true;
}
else
{
SelectedMode = "llm";
IsWithHistorique = true;
hiddenDomain = true;
hiddenDomain = true;
}

if (!string.IsNullOrEmpty(ConversationId))
@@ -205,6 +207,13 @@ namespace ReAct_PME.WebUI.Pages.ChatRoom
if (string.IsNullOrWhiteSpace(CurrentInput) && !UploadedDocuments.Any())
return;

// Vérification de l'ID Client pour AUDIT
if (SelectedAgentType == 3 && string.IsNullOrWhiteSpace(ClientId))
{
ToastService.ShowWarning("Veuillez saisir l'ID Client pour l'audit");
return;
}

try
{
isDisabled = true;
@@ -239,6 +248,10 @@ namespace ReAct_PME.WebUI.Pages.ChatRoom
await LoadRagDomains();
domain = !string.IsNullOrEmpty(SelectedDomain) ? SelectedDomain : (RagDomains.Any() ? RagDomains[0] : "");
}
else if (SelectedAgentType == 3)
{
domain = "comptabilite"; // Domaine fixe pour AUDIT
}

var payload = new SendMessageRequest
{
@@ -301,6 +314,13 @@ namespace ReAct_PME.WebUI.Pages.ChatRoom
}
}

// Vérification de l'ID Client pour AUDIT
if (TypeLLM == 3 && string.IsNullOrWhiteSpace(ClientId))
{
ToastService.ShowWarning("Veuillez saisir l'ID Client pour l'audit");
return;
}

isTyping = true;
StateHasChanged();

@@ -419,6 +439,10 @@ namespace ReAct_PME.WebUI.Pages.ChatRoom
if (RagDomains.Any())
SelectedDomain = RagDomains[0];
}
else if (agentId == 3)
{
SelectedDomain = "compta"; // Domaine fixe pour AUDIT
}

StateHasChanged();
}

Загрузка…
Отмена
Сохранить