From 965c0b33db432ab78aaee3a3a35b993fcc359f87 Mon Sep 17 00:00:00 2001 From: yihong0618 Date: Sun, 22 Dec 2024 08:21:21 +0800 Subject: [PATCH] fix: 'dict_keys' object is not subscriptable error Signed-off-by: yihong0618 --- api/core/tools/provider/app_tool_provider.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/core/tools/provider/app_tool_provider.py b/api/core/tools/provider/app_tool_provider.py index 09f328cd1fe65f..582ad636b1953a 100644 --- a/api/core/tools/provider/app_tool_provider.py +++ b/api/core/tools/provider/app_tool_provider.py @@ -62,7 +62,7 @@ def get_tools(self, user_id: str) -> list[Tool]: user_input_form_list = app_model_config.user_input_form_list for input_form in user_input_form_list: # get type - form_type = input_form.keys()[0] + form_type = list(input_form.keys())[0] default = input_form[form_type]["default"] required = input_form[form_type]["required"] label = input_form[form_type]["label"]