Spaces:
Paused
Paused
Update flare-ui/src/app/components/environment/environment.component.html
Browse files
flare-ui/src/app/components/environment/environment.component.html
CHANGED
|
@@ -160,6 +160,129 @@
|
|
| 160 |
</mat-form-field>
|
| 161 |
</div>
|
| 162 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 163 |
<div>
|
| 164 |
<!-- STT Settings Panel -->
|
| 165 |
<mat-expansion-panel class="stt-settings-panel" *ngIf="environment.stt_engine !== 'no_stt'">
|
|
|
|
| 160 |
</mat-form-field>
|
| 161 |
</div>
|
| 162 |
|
| 163 |
+
<!-- Parameter Collection Configuration -->
|
| 164 |
+
<mat-expansion-panel class="config-panel">
|
| 165 |
+
<mat-expansion-panel-header>
|
| 166 |
+
<mat-panel-title>
|
| 167 |
+
<mat-icon>psychology</mat-icon>
|
| 168 |
+
Parameter Collection Configuration
|
| 169 |
+
</mat-panel-title>
|
| 170 |
+
<mat-panel-description>
|
| 171 |
+
Configure smart parameter collection behavior
|
| 172 |
+
</mat-panel-description>
|
| 173 |
+
</mat-expansion-panel-header>
|
| 174 |
+
|
| 175 |
+
<div class="panel-content">
|
| 176 |
+
<div class="config-grid">
|
| 177 |
+
<!-- Max Parameters Per Question -->
|
| 178 |
+
<div class="config-field">
|
| 179 |
+
<label>Max Parameters Per Question</label>
|
| 180 |
+
<mat-slider
|
| 181 |
+
min="1"
|
| 182 |
+
max="5"
|
| 183 |
+
step="1"
|
| 184 |
+
discrete
|
| 185 |
+
[displayWith]="formatSliderLabel"
|
| 186 |
+
[(ngModel)]="envForm.parameter_collection_config.max_params_per_question"
|
| 187 |
+
class="full-width">
|
| 188 |
+
<input matSliderThumb>
|
| 189 |
+
</mat-slider>
|
| 190 |
+
<span class="slider-value">{{ envForm.parameter_collection_config.max_params_per_question }}</span>
|
| 191 |
+
</div>
|
| 192 |
+
|
| 193 |
+
<!-- Smart Grouping -->
|
| 194 |
+
<div class="config-field">
|
| 195 |
+
<mat-slide-toggle
|
| 196 |
+
[(ngModel)]="envForm.parameter_collection_config.smart_grouping"
|
| 197 |
+
color="primary">
|
| 198 |
+
Smart Grouping
|
| 199 |
+
</mat-slide-toggle>
|
| 200 |
+
<mat-hint>Automatically group related parameters</mat-hint>
|
| 201 |
+
</div>
|
| 202 |
+
|
| 203 |
+
<!-- Retry Unanswered -->
|
| 204 |
+
<div class="config-field">
|
| 205 |
+
<mat-slide-toggle
|
| 206 |
+
[(ngModel)]="envForm.parameter_collection_config.retry_unanswered"
|
| 207 |
+
color="primary">
|
| 208 |
+
Retry Unanswered Parameters
|
| 209 |
+
</mat-slide-toggle>
|
| 210 |
+
<mat-hint>Re-ask parameters that weren't answered</mat-hint>
|
| 211 |
+
</div>
|
| 212 |
+
</div>
|
| 213 |
+
|
| 214 |
+
<!-- Collection Prompt Template -->
|
| 215 |
+
<div class="prompt-section">
|
| 216 |
+
<h3>Collection Prompt Template</h3>
|
| 217 |
+
<mat-form-field appearance="outline" class="full-width">
|
| 218 |
+
<mat-label>Prompt Template</mat-label>
|
| 219 |
+
<textarea
|
| 220 |
+
matInput
|
| 221 |
+
[(ngModel)]="envForm.parameter_collection_config.collection_prompt"
|
| 222 |
+
rows="12"
|
| 223 |
+
placeholder="Enter the prompt template for generating parameter questions..."
|
| 224 |
+
class="code-textarea">
|
| 225 |
+
</textarea>
|
| 226 |
+
<mat-hint>
|
| 227 |
+
Available variables: {{conversation_history}}, {{intent_name}}, {{intent_caption}},
|
| 228 |
+
{{collected_params}}, {{missing_params}}, {{unanswered_params}}, {{max_params}}, {{project_language}}
|
| 229 |
+
</mat-hint>
|
| 230 |
+
</mat-form-field>
|
| 231 |
+
|
| 232 |
+
<!-- Template Variables Help -->
|
| 233 |
+
<mat-expansion-panel class="help-panel">
|
| 234 |
+
<mat-expansion-panel-header>
|
| 235 |
+
<mat-panel-title>
|
| 236 |
+
<mat-icon>help_outline</mat-icon>
|
| 237 |
+
Template Variables Reference
|
| 238 |
+
</mat-panel-title>
|
| 239 |
+
</mat-expansion-panel-header>
|
| 240 |
+
|
| 241 |
+
<mat-list>
|
| 242 |
+
<mat-list-item>
|
| 243 |
+
<code class="variable">{{conversation_history}}</code>
|
| 244 |
+
<span class="description">Recent conversation between user and assistant</span>
|
| 245 |
+
</mat-list-item>
|
| 246 |
+
<mat-list-item>
|
| 247 |
+
<code class="variable">{{intent_name}}</code>
|
| 248 |
+
<span class="description">Technical name of the detected intent</span>
|
| 249 |
+
</mat-list-item>
|
| 250 |
+
<mat-list-item>
|
| 251 |
+
<code class="variable">{{intent_caption}}</code>
|
| 252 |
+
<span class="description">Human-readable caption of the intent</span>
|
| 253 |
+
</mat-list-item>
|
| 254 |
+
<mat-list-item>
|
| 255 |
+
<code class="variable">{{collected_params}}</code>
|
| 256 |
+
<span class="description">Parameters already collected with their values</span>
|
| 257 |
+
</mat-list-item>
|
| 258 |
+
<mat-list-item>
|
| 259 |
+
<code class="variable">{{missing_params}}</code>
|
| 260 |
+
<span class="description">Parameters still needed to complete the request</span>
|
| 261 |
+
</mat-list-item>
|
| 262 |
+
<mat-list-item>
|
| 263 |
+
<code class="variable">{{unanswered_params}}</code>
|
| 264 |
+
<span class="description">Parameters asked before but not answered by user</span>
|
| 265 |
+
</mat-list-item>
|
| 266 |
+
<mat-list-item>
|
| 267 |
+
<code class="variable">{{max_params}}</code>
|
| 268 |
+
<span class="description">Maximum number of parameters to ask in one question</span>
|
| 269 |
+
</mat-list-item>
|
| 270 |
+
<mat-list-item>
|
| 271 |
+
<code class="variable">{{project_language}}</code>
|
| 272 |
+
<span class="description">Language setting of the current project</span>
|
| 273 |
+
</mat-list-item>
|
| 274 |
+
</mat-list>
|
| 275 |
+
</mat-expansion-panel>
|
| 276 |
+
|
| 277 |
+
<!-- Reset to Default Button -->
|
| 278 |
+
<button mat-button color="accent" (click)="resetCollectionPrompt()">
|
| 279 |
+
<mat-icon>restore</mat-icon>
|
| 280 |
+
Reset to Default Template
|
| 281 |
+
</button>
|
| 282 |
+
</div>
|
| 283 |
+
</div>
|
| 284 |
+
</mat-expansion-panel>
|
| 285 |
+
|
| 286 |
<div>
|
| 287 |
<!-- STT Settings Panel -->
|
| 288 |
<mat-expansion-panel class="stt-settings-panel" *ngIf="environment.stt_engine !== 'no_stt'">
|