File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
packages/dbgpt-app/src/dbgpt_app/scene/chat_dashboard Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,19 @@ async def generate_input_values(self) -> Dict:
9595 "supported_chat_type" : self .dashboard_template ["supported_chart_type" ],
9696 }
9797
98+ # Mapping variable names: compatible with custom prompt template variable names
99+ # Get the input_variables of the current prompt
100+ input_variables = []
101+ if hasattr (self .prompt_template , "prompt" ) and hasattr (
102+ self .prompt_template .prompt , "input_variables"
103+ ):
104+ input_variables = self .prompt_template .prompt .input_variables
105+ # Compatible with question and user_input
106+ if "question" in input_variables :
107+ input_values ["question" ] = self .current_user_input
108+ if "user_input" in input_variables :
109+ input_values ["user_input" ] = self .current_user_input
110+
98111 return input_values
99112
100113 def do_action (self , prompt_response ):
You can’t perform that action at this time.
0 commit comments