Skip to content

Commit

Permalink
Remove redundant tokens from GPT-handler (#490)
Browse files Browse the repository at this point in the history
No other handler includes this

Co-authored-by: Anish <anish.palakurthi@gmail.com>
  • Loading branch information
hellovai and anish-palakurthi authored Jul 1, 2024
1 parent cb694ea commit d381fe8
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ def inference(self, prompt,functions,test_category):
},
{
"role": "user",
"content": "Questions:"
+ USER_PROMPT_FOR_CHAT_MODEL.format(
"content": USER_PROMPT_FOR_CHAT_MODEL.format(
user_prompt=prompt, functions=str(functions)
),
},
Expand All @@ -55,7 +54,7 @@ def inference(self, prompt,functions,test_category):
functions = language_specific_pre_processing(functions, test_category, True)
if type(functions) is not list:
functions = [functions]
message = [{"role": "user", "content": "Questions:" + prompt}]
message = [{"role": "user", "content": prompt}]
oai_tool = convert_to_tool(
functions, GORILLA_TO_OPENAPI, self.model_style, test_category, True
)
Expand Down

0 comments on commit d381fe8

Please sign in to comment.