Skip to content

Commit

Permalink
linter fix
Browse files Browse the repository at this point in the history
  • Loading branch information
itsmvd committed Feb 4, 2025
1 parent f653145 commit da6aacd
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion timesketch/api/v1/resources/nl2q.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,14 @@ def concatenate_values(self, group):

@login_required
def post(self, sketch_id):
"""Handles POST request to the resource.
Args:
sketch_id: Sketch ID.
Returns:
JSON representing the LLM prediction.
"""
form = request.json
if not form:
abort(HTTP_STATUS_CODE_BAD_REQUEST, "No JSON data provided")
Expand Down Expand Up @@ -197,7 +205,7 @@ def post(self, sketch_id):
feature_name = "nl2q"
try:
llm = manager.LLMManager.create_provider(feature_name=feature_name)
except Exception as e:
except Exception as e: # pylint: disable=broad-except
logger.error("Error LLM Provider: {}".format(e))
result_schema["error"] = (
"Error loading LLM Provider. Please try again later!"
Expand Down

0 comments on commit da6aacd

Please sign in to comment.