@@ -2,6 +2,7 @@ import 'package:apidash/services/agentic_services/agent_caller.dart';
2
2
import 'package:apidash/services/agentic_services/agents/agents.dart' ;
3
3
import 'package:apidash/templates/tool_templates.dart' ;
4
4
import 'package:apidash_core/apidash_core.dart' ;
5
+ import 'package:flutter/material.dart' ;
5
6
import 'package:flutter_riverpod/flutter_riverpod.dart' ;
6
7
7
8
Future <String ?> generateSDUICodeFromResponse ({
@@ -22,23 +23,23 @@ Future<String?> generateSDUICodeFromResponse({
22
23
}),
23
24
),
24
25
]);
25
- final SA = step1Res[0 ]? ['SEMANTIC_ANALYSIS' ];
26
- final IR = step1Res[1 ]? ['INTERMEDIATE_REPRESENTATION' ];
26
+ final sa = step1Res[0 ]? ['SEMANTIC_ANALYSIS' ];
27
+ final ir = step1Res[1 ]? ['INTERMEDIATE_REPRESENTATION' ];
27
28
28
- if (SA == null || IR == null ) {
29
+ if (sa == null || ir == null ) {
29
30
return null ;
30
31
}
31
32
32
- print ("Semantic Analysis: $SA " );
33
- print ("Intermediate Representation: $IR " );
33
+ debugPrint ("Semantic Analysis: $sa " );
34
+ debugPrint ("Intermediate Representation: $ir " );
34
35
35
36
final sduiCode = await APIDashAgentCaller .instance.call (
36
37
StacGenBot (),
37
38
ref: ref,
38
39
input: AgentInputs (variables: {
39
40
'VAR_RAW_API_RESPONSE' : apiResponse,
40
- 'VAR_INTERMEDIATE_REPR' : IR ,
41
- 'VAR_SEMANTIC_ANALYSIS' : SA ,
41
+ 'VAR_INTERMEDIATE_REPR' : ir ,
42
+ 'VAR_SEMANTIC_ANALYSIS' : sa ,
42
43
}),
43
44
);
44
45
final stacCode = sduiCode? ['STAC' ]? .toString ();
@@ -62,8 +63,8 @@ Future<String?> modifySDUICodeUsingPrompt({
62
63
'VAR_CLIENT_REQUEST' : modificationRequest,
63
64
}),
64
65
);
65
- final SDUI = res? ['STAC' ];
66
- return SDUI ;
66
+ final sdui = res? ['STAC' ];
67
+ return sdui ;
67
68
}
68
69
69
70
Future <String ?> generateAPIToolUsingRequestData ({
0 commit comments