Skip to content

Commit e799bd1

Browse files
committed
lint
1 parent 07dadad commit e799bd1

File tree

1 file changed

+0
-5
lines changed
  • supporting-blog-content/serverless-ai-agent

1 file changed

+0
-5
lines changed

supporting-blog-content/serverless-ai-agent/main.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff 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("\nUser: ")
272268
if user_input.strip().lower() in {"exit", "quit"}:
273269
break
274-
275270

276271
response = agent.chat(user_input)
277272
print("\nAgent:", response)

0 commit comments

Comments
 (0)