File tree Expand file tree Collapse file tree 1 file changed +0
-5
lines changed
supporting-blog-content/serverless-ai-agent Expand file tree Collapse file tree 1 file changed +0
-5
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,6 @@ def create_ess_project(project_name: str) -> str:
7272 if not project_id :
7373 return "Error: No project ID returned from the API."
7474
75-
7675 if not re .fullmatch (r"^[a-z0-9]{32}$" , project_id ):
7776 return (
7877 f"Error: Received project ID '{ project_id } ' does not match expected format."
@@ -116,11 +115,9 @@ def delete_ess_project(project_name: str) -> str:
116115 if not api_key :
117116 return "Error: API_KEY is not set in the environment."
118117
119-
120118 url = f"{ env_url } /api/v1/serverless/projects/elasticsearch/{ project_id } "
121119 headers = {"Authorization" : f"ApiKey { api_key } " , "Content-Type" : "application/json" }
122120
123-
124121 try :
125122 response = requests .delete (url , headers = headers )
126123 response .raise_for_status ()
@@ -186,7 +183,6 @@ def get_ess_project_details(project_name: str) -> str:
186183 if not api_key :
187184 return "Error: API_KEY is not set in the environment."
188185
189-
190186 url = f"{ env_url } /api/v1/serverless/projects/elasticsearch/{ project_id } "
191187 headers = {"Authorization" : f"ApiKey { api_key } " }
192188
@@ -271,7 +267,6 @@ def main():
271267 user_input = input ("\n User: " )
272268 if user_input .strip ().lower () in {"exit" , "quit" }:
273269 break
274-
275270
276271 response = agent .chat (user_input )
277272 print ("\n Agent:" , response )
You can’t perform that action at this time.
0 commit comments