Spaces:
Running
Running
Update flare-ui/src/app/components/environment/environment.component.ts
Browse files
flare-ui/src/app/components/environment/environment.component.ts
CHANGED
@@ -75,7 +75,7 @@ export class EnvironmentComponent implements OnInit {
|
|
75 |
max_params_per_question: 2,
|
76 |
smart_grouping: true,
|
77 |
retry_unanswered: true,
|
78 |
-
collection_prompt:
|
79 |
};
|
80 |
|
81 |
loading = true;
|
@@ -127,33 +127,6 @@ export class EnvironmentComponent implements OnInit {
|
|
127 |
});
|
128 |
}
|
129 |
|
130 |
-
getDefaultCollectionPrompt(): string {
|
131 |
-
return `You are a helpful assistant collecting information from the user.
|
132 |
-
|
133 |
-
Conversation context:
|
134 |
-
{{conversation_history}}
|
135 |
-
|
136 |
-
Intent: {{intent_name}} - {{intent_caption}}
|
137 |
-
|
138 |
-
Already collected:
|
139 |
-
{{collected_params}}
|
140 |
-
|
141 |
-
Still needed:
|
142 |
-
{{missing_params}}
|
143 |
-
|
144 |
-
Previously asked but not answered:
|
145 |
-
{{unanswered_params}}
|
146 |
-
|
147 |
-
1. Ask for maximum {{max_params}} parameters in one question
|
148 |
-
2. Group parameters that naturally go together (like from/to cities, dates)
|
149 |
-
3. If some parameters were asked before but not answered, include them again
|
150 |
-
4. Be natural and conversational in {{project_language}}
|
151 |
-
5. Don't repeat information already collected
|
152 |
-
6. Ask in a friendly, human way
|
153 |
-
|
154 |
-
Generate a natural question to collect the missing parameters.`;
|
155 |
-
}
|
156 |
-
|
157 |
resetCollectionPrompt(): void {
|
158 |
this.parameterCollectionConfig.collection_prompt = this.getDefaultCollectionPrompt();
|
159 |
this.showSnackBar('Collection prompt reset to default');
|
|
|
75 |
max_params_per_question: 2,
|
76 |
smart_grouping: true,
|
77 |
retry_unanswered: true,
|
78 |
+
collection_prompt: ''
|
79 |
};
|
80 |
|
81 |
loading = true;
|
|
|
127 |
});
|
128 |
}
|
129 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
resetCollectionPrompt(): void {
|
131 |
this.parameterCollectionConfig.collection_prompt = this.getDefaultCollectionPrompt();
|
132 |
this.showSnackBar('Collection prompt reset to default');
|