mirror of
https://github.com/foss42/apidash.git
synced 2025-12-04 03:46:57 +08:00
Basic Agentic Infrastructure created
This commit is contained in:
18
packages/genai/lib/agentic_engine/blueprint.dart
Normal file
18
packages/genai/lib/agentic_engine/blueprint.dart
Normal file
@@ -0,0 +1,18 @@
|
||||
abstract class APIDashAIAgent {
|
||||
String get agentName;
|
||||
String getSystemPrompt();
|
||||
Future<bool> validator(String aiResponse);
|
||||
Future<dynamic> outputFormatter(String validatedResponse);
|
||||
}
|
||||
|
||||
extension SystemPromptTemplating on String {
|
||||
String substitutePromptVariable(String variable, String value) {
|
||||
return this.replaceAll(":$variable:", value);
|
||||
}
|
||||
}
|
||||
|
||||
class AgentInputs {
|
||||
final String? query;
|
||||
final Map? variables;
|
||||
AgentInputs({this.query, this.variables});
|
||||
}
|
||||
Reference in New Issue
Block a user