Skip to content

Commit

Permalink
updates for parameters prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
DoraDong-2023 committed Mar 16, 2024
1 parent 65376b3 commit 4e1e52d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/deploy/inference_dialog_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -907,8 +907,13 @@ def run_pipeline_after_doublechecking_API_selection(self, user_input):
api_name_tmp = list(api_name_tmp_list.keys())[0]
apis_name+=f"{api_name_tmp}"
apis_description+=f"{self.API_composite[api_name_tmp]['description']}."
api_docstring = json_to_docstring(apis_name, apis_description, api_parameters_information)
parameters_prompt = prepare_parameters_prompt(self.user_query, api_docstring, parameters_name_list)
try:
tmp_api_parameters_information = self.API_composite[apis_name]['Parameters']
api_docstring = json_to_docstring(apis_name, apis_description, tmp_api_parameters_information)###TODO: here only works for one api, if we add compositeAPI or classAPI in the future, we need to buildup a parameters selection for multiple API!!!
parameters_prompt = prepare_parameters_prompt(self.user_query, api_docstring, parameters_name_list)
print('parameters_prompt:', parameters_prompt)
except Exception as e:
print('error for parameters: ', e)
if len(parameters_name_list)==0:
# if there is no required parameters, skip using gpt
response = "[]"
Expand Down

0 comments on commit 4e1e52d

Please sign in to comment.