You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Service/Agent/Intent/ActionIntent.php
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -81,6 +81,7 @@ public function getMessage(): string
81
81
$hint.= '* Fusio.Adapter.Sql.Connection.SqlAdvanced = Connection from the Doctrine DBAL library' . "\n";
82
82
$hint.= '* Fusio.Adapter.Stripe.Connection.Stripe = StripeClient from the Stripe PHP SDK' . "\n";
83
83
$hint.= "\n";
84
+
$hint.= 'If the business logic needs a database and there is no specific connection mentioned then use as default the "System" connection.' . "\n";
84
85
$hint.= 'If the business logic needs to work with a database table you can get all available tables for a specific connection through the "backend_database_getTables" tool where you need to provide a connection id.' . "\n";
85
86
$hint.= 'If you need to get a concrete table schema you can use the "backend_database_getTable" tool where you need to provide the connection id and table name.' . "\n";
86
87
$hint.= 'To add logging you can use the "$logger" argument which is a PSR-3 compatible logging interface.' . "\n";
@@ -41,10 +41,11 @@ public function __construct(private JsonResultSerializer $resultSerializer)
41
41
publicfunctiongetMessage(): string
42
42
{
43
43
$hint = 'The user has the intent to design new API endpoints to solve the provided task.' . "\n";
44
-
$hint.= 'Therefor you need generate a list of operations following the provided JSON schema.' . "\n";
44
+
$hint.= 'Therefor you need generate a list of operations and optional tables following the provided JSON schema.' . "\n";
45
45
$hint.= 'You should think like an REST API expert which has deep knowledge in describing API endpoints.' . "\n";
46
46
$hint.= 'The action of the operation should be described as text which is used later on by a different agent to generate the actual code.' . "\n";
47
47
$hint.= 'The incoming/outgoing schemas of the operation should be described as text which is used later on by a different agent to generate the actual schema.' . "\n";
48
+
$hint.= 'If the logic needs to persist data you also need to generate a fitting database table schemas.' . "\n";
48
49
$hint.= "\n";
49
50
50
51
return$hint;
@@ -53,12 +54,6 @@ public function getMessage(): string
53
54
publicfunctiongetTools(): array
54
55
{
55
56
return [
56
-
'backend_operation_getAll',
57
-
'backend_operation_get',
58
-
'backend_action_getAll',
59
-
'backend_action_get',
60
-
'backend_schema_getAll',
61
-
'backend_schema_get',
62
57
];
63
58
}
64
59
@@ -124,7 +119,7 @@ public function getResponseSchema(): ?array
124
119
],
125
120
'httpCode' => [
126
121
'description' => 'The HTTP success status code, normally this is 200 but for create operations it should be 201',
127
-
'type' => 'string',
122
+
'type' => 'integer',
128
123
],
129
124
'parameters' => [
130
125
'description' => 'Describes all query parameters for this operation',
@@ -146,10 +141,87 @@ public function getResponseSchema(): ?array
0 commit comments