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
f"Create HTTPRequests of type {method} considering only the object with id=1 for the endpoint and understand the responses. Ensure that they are correct requests.")
106
-
107
-
106
+
defget_initial_steps(self, common_steps):
107
+
return [
108
+
"Identify all available endpoints via GET Requests. Exclude those in this list: {self.found_endpoints}",
109
+
"Note down the response structures, status codes, and headers for each endpoint.",
110
+
"For each endpoint, document the following details: URL, HTTP method, query parameters and path variables, expected request body structure for requests, response structure for successful and error responses."
111
+
] +common_steps
112
+
113
+
defget_phase_steps(self, phase, common_steps):
114
+
ifphase!="DELETE":
115
+
return [
116
+
f"Identify for all endpoints {self.found_endpoints} excluding {self.endpoint_found_methods[phase]} a valid HTTP method {phase} call.",
117
+
self.get_http_action_template(phase)
118
+
] +common_steps
119
+
else:
120
+
return [
121
+
"Check for all endpoints the DELETE method. Delete the first instance for all endpoints.",
f"For endpoint {first_endpoint} find this missing method: {needed_method}. If all the HTTP methods have already been found for an endpoint, then do not include this endpoint in your search."]
141
+
return []
108
142
defchain_of_thought(self, doc=False, hint=""):
109
143
"""
110
144
Generates a prompt using the chain-of-thought strategy.
111
-
If 'doc' is True, it follows a detailed documentation-oriented prompt strategy based on the round number.
112
-
If 'doc' is False, it provides general guidance for early round numbers and focuses on HTTP methods for later rounds.
113
145
114
146
Args:
115
147
doc (bool): Determines whether the documentation-oriented chain of thought should be used.
"Make the OpenAPI specification available to developers by incorporating it into your API documentation site and keep the documentation up to date with API changes."
f"Identify all available endpoints via GET Requests. Exclude those in this list: {self.found_endpoints}", f"Note down the response structures, status codes, and headers for each endpoint.",
140
-
f"For each endpoint, document the following details: URL, HTTP method, "
141
-
f"query parameters and path variables, expected request body structure for requests, response structure for successful and error responses."
0 commit comments