mirror of
https://github.com/foss42/apidash.git
synced 2025-12-08 05:59:15 +08:00
Feat: Added Generate Test Cases and moved short prompting examples to another function
This commit is contained in:
@@ -38,6 +38,11 @@ class _ChatbotWidgetState extends ConsumerState<ChatbotWidget> {
|
||||
requestModel: requestModel,
|
||||
responseModel: responseModel,
|
||||
);
|
||||
} else if (message == "Generate Test Case") {
|
||||
response = await ollamaService.generateTestCases(
|
||||
requestModel: requestModel,
|
||||
responseModel: responseModel
|
||||
);
|
||||
} else {
|
||||
response = await ollamaService.generateResponse(message);
|
||||
}
|
||||
@@ -91,6 +96,17 @@ class _ChatbotWidgetState extends ConsumerState<ChatbotWidget> {
|
||||
),
|
||||
],
|
||||
const Spacer(),
|
||||
const SizedBox(width: 8),
|
||||
ElevatedButton.icon(
|
||||
onPressed: () => _sendMessage("Generate Test Case"),
|
||||
icon: const Icon(Icons.developer_mode),
|
||||
label: const Text("Test Case"),
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Colors.blueAccent,
|
||||
),
|
||||
),
|
||||
|
||||
const Spacer(),
|
||||
],
|
||||
),
|
||||
Expanded(
|
||||
|
||||
Reference in New Issue
Block a user