mirror of
https://github.com/katanemo/plano.git
synced 2026-06-23 15:38:07 +02:00
lint + formating with black (#158)
* lint + formating with black * add black as pre commit
This commit is contained in:
parent
498e7f9724
commit
5c4a6bc8ff
22 changed files with 581 additions and 295 deletions
|
|
@ -13,9 +13,10 @@ def get_device_summary():
|
|||
# Validate 'device_ids' parameter
|
||||
device_ids = data.get("device_ids")
|
||||
if not device_ids or not isinstance(device_ids, list):
|
||||
return jsonify(
|
||||
{"error": "'device_ids' parameter is required and must be a list"}
|
||||
), 400
|
||||
return (
|
||||
jsonify({"error": "'device_ids' parameter is required and must be a list"}),
|
||||
400,
|
||||
)
|
||||
|
||||
# Validate 'time_range' parameter (optional, defaults to 7)
|
||||
time_range = data.get("time_range", 7)
|
||||
|
|
|
|||
|
|
@ -119,9 +119,10 @@ def process_rag():
|
|||
intent_changed = True
|
||||
else:
|
||||
# Invalid value provided
|
||||
return jsonify(
|
||||
{"error": "Invalid value for x-arch-prompt-intent-change header"}
|
||||
), 400
|
||||
return (
|
||||
jsonify({"error": "Invalid value for x-arch-prompt-intent-change header"}),
|
||||
400,
|
||||
)
|
||||
|
||||
# Update user conversation based on intent change
|
||||
memory = update_user_conversation(user_id, client_messages, intent_changed)
|
||||
|
|
|
|||
|
|
@ -13,9 +13,10 @@ def get_device_summary():
|
|||
# Validate 'device_ids' parameter
|
||||
device_ids = data.get("device_ids")
|
||||
if not device_ids or not isinstance(device_ids, list):
|
||||
return jsonify(
|
||||
{"error": "'device_ids' parameter is required and must be a list"}
|
||||
), 400
|
||||
return (
|
||||
jsonify({"error": "'device_ids' parameter is required and must be a list"}),
|
||||
400,
|
||||
)
|
||||
|
||||
# Validate 'time_range' parameter (optional, defaults to 7)
|
||||
time_range = data.get("time_range", 7)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue