Spaces:
Building
Building
Update flare-ui/src/app/components/environment/environment.component.ts
Browse files
flare-ui/src/app/components/environment/environment.component.ts
CHANGED
@@ -303,5 +303,37 @@ export class EnvironmentComponent implements OnInit {
|
|
303 |
|
304 |
onWorkModeChange() {
|
305 |
this.environmentService.updateEnvironment(this.environment);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
306 |
}
|
307 |
}
|
|
|
303 |
|
304 |
onWorkModeChange() {
|
305 |
this.environmentService.updateEnvironment(this.environment);
|
306 |
+
}
|
307 |
+
|
308 |
+
resetCollectionPrompt() {
|
309 |
+
this.parameterCollectionConfig.collection_prompt = getDefaultCollectionPrompt()
|
310 |
+
}
|
311 |
+
|
312 |
+
getDefaultCollectionPrompt(): string {
|
313 |
+
return `You are a helpful assistant collecting information from the user.
|
314 |
+
|
315 |
+
Conversation context:
|
316 |
+
{{conversation_history}}
|
317 |
+
|
318 |
+
Intent: {{intent_name}} - {{intent_caption}}
|
319 |
+
|
320 |
+
Already collected:
|
321 |
+
{{collected_params}}
|
322 |
+
|
323 |
+
Still needed:
|
324 |
+
{{missing_params}}
|
325 |
+
|
326 |
+
Previously asked but not answered:
|
327 |
+
{{unanswered_params}}
|
328 |
+
|
329 |
+
Rules:
|
330 |
+
1. Ask for maximum {{max_params}} parameters in one question
|
331 |
+
2. Group parameters that naturally go together (like from/to cities, dates)
|
332 |
+
3. If some parameters were asked before but not answered, include them again
|
333 |
+
4. Be natural and conversational in {{project_language}}
|
334 |
+
5. Don't repeat information already collected
|
335 |
+
6. Ask in a friendly, human way
|
336 |
+
|
337 |
+
Generate a natural question to collect the missing parameters.`;
|
338 |
}
|
339 |
}
|